Math 1c TA: Padraic Bartlett Recitatio 4: Lagrage Multipliers ad Itegratio Week 4 Caltech 211 1 Radom Questio Hey! So, this radom questio is pretty tightly tied to today s lecture ad the cocept of cotet zero: so, eve if you usually skip these, do read this oe so that the later bits of the lecture make sese, ad uderstad the first questio (the oe that asks why the Cator set is cotet zero.) So, as we ll discuss later today, a set A is said to have cotet zero if ad oly if for ay ɛ > there is some fiite collectio of rectagles R 1... R such that A i=1 R i i= vol(r i) < ɛ. I other words, a set has cotet zero iff you ca squeeze it iside a fiite set of rectagles of arbitrarily small volume; i.e. it s ot takig up ay space i R, i a sese. With that i mid, cosider the followig defiitio of the Cator set: Defiitio. We defie the Cator set C i stages, as follows: C = [, 1]. C 1 = C with its middle-third removed: i.e. C 1 = [, 1 3 ] [ 2 3, 1]. C 2 = C 1 with the middle-third of each of its itervals removed: i.e. C 2 = [, 1 9 ] [ 2 9, 1 3 ] [ 2 3, 7 9 ] [ 8 9, 1].. C +1 = C with the middle-third of each of the itervals i C removed.. C = =1 C. Prove the followig claims about the Cator set: 1. Show that each set C has legth = 2 /3. Use this to prove that C is cotet zero. 2. Show that the iterior of the Cator set is the empty set i.e. show that the Cator set cotais o ope iterval of ay legth. 3. Despite the above statemet, show that the Cator set has, i a sese, as may poits as [, 1]: i.e. that you ca fid a bijectio from C to [, 1]. (Hit: what do elemets of C look like whe you write them i terary?) 1
4. Defie the followig Cator-like set as follows: C = [, 1]. C 1 = C with its middle-quarter removed. C 2 = C 1 with the middle-( 1 8 4 3 ) of each of its itervals removed. C 3 = C 2 with the middle-( 1 ) of each of its itervals removed.. 16 8 7 C +1 = C with the middle-( 1 2 +1 2 2 1 ) of each of the itervals i C removed.. C = =1 C. Show that the iterior of this set is also empty. Show, however, that i some certai well-defied way, this set has legth 1/2. Today s lecture is isaely log, because we have a absurd amout of material to cover; as a result, i Thursday s recitatio we did t get to make it through a large amout of the itegratio sectio. I ve tried to pick the problems there so that they will be helpful to thik about whe attackig your HW, so do look there whe you re workig o your problems! 2 Lagrage Multipliers 2.1 Statemet of the method. I last week s recitatio, we talked about how to use the derivatives to fid extremal poits of a fuctios o some regio D. However, i real life, we ofte wo t be oly attemptig to maximize a fuctio o some ice ope rectagle D; we ll ofte have fuctios we wat to maximize give some set of weird costraits, like restrictig its poits to the surface of the uit ball (i.e. x 2 1 +... + x2 = 1) or makig sure that the first ad third coördiates are reciprocals of each other, or some sort of odd coditios like that. How ca we fid maxima o such strage sets, that do t have iteriors? As it turs out, the method of Lagrage multipliers is precisely the tool that does that for us. We state the method here: Propositio 1 Suppose that f : R R is a fuctio whose extremal values {x} we would like to fid, give the costraits g 1 (x) = c 1,... g m (x) = c m, for some collectio of fuctios g 1,... g m : R R. The, we have the followig result: if a is a extremal value of f restricted to the set S = {x : i, g i (x) = c i }, ad all of the gradiets g 1 (a),... g m (a) are liearly idepedet, the f(a) is liearly depedet o the g i (a) s. I other words, there are costats λ i such that f(a) = λ 1 g 1 (a) +... λ m g m (a). 2
2.2 A visual example. Here s a visual example, to illustrate what s goig o: Questio 2 Suppose that we wat to maximize the fuctio f(x, y) = y o the set of costraits g(x, y) = x 2 + y 2 = 1. What values of x ad y do this for us? Solutio. So, before we start, we graph the situatio at had, so we ca visually see what s goig o: Visually, we ca see that the maxima of our fuctio f(x, y) = y (the plae draw as a grid i the above picture) o the set g(x, y) = 1 (the red circle i the above picture) occur at the poits (, 1, 1) ad (, 1, 1); there, we ca see visually that the gradiets of these two fuctios are liear multiples of each other, as the gradiet of g there is (, ±2), ad the gradiet of f is (, 1). Ideed: if we check all of the possible poits (x, y) ad costats λ where (f)(x, y) = λ (g)(x, y), we ca see that λ x =, y = ±1, λ = ±y (f)(x, y) = (, 1) = (g)(x, y) = (2x, 2x) = λ 2x, 1 = λ 2y 3
ad thus that the oly extremal poits of our fuctio f o this set are (x, y) = (, ±1). (We are justified i claimig that these are the oly extremal poits because the method of Lagrage multipliers detects extrema wheever the set of g i s are all liearly idepedet: so, because g(x, y) = (2x, 2y) is ever (,) o the uit circle, this set of oe g is liearly idepedet, ad therefore the Lagrage multipler method will fid all of our extrema.) 2.3 A more detailed example. The above is a kid-of trivial example of whe we use Lagrage multipliers: whe the f ad g are as clearly spelled out as above, it s usually ot too hard to apply our method. I may problems, it s usually a bit more ambiguous tha this; the ext example provides more of a real-world use of the method of Lagrage multipliers, wherei we prove a famous iequality: Questio 3 Ca you prove that the arithmetic mea of a collectio of positive umbers is always greater tha or equal to their geometric mea, usig the method of Lagrage multipliers? I other words, ca you prove that for ay x 1,... x, we have x 1 +... x (x 1... x ) 1/? Solutio. So: how ca we prove such a statemet with the method of Lagrage multipliers? Well: let s thik about what we re tryig to prove. We wat the claim x 1 +... x (x 1... x ) 1/ to hold for ay vector x with all positive coördiates. So: to make thigs easier o ourselves, suppose that we re specifically lookig at a vector x with arithmetic mea = c; the, we re tryig to prove that x 1 +...x (x 1... x ) 1/ is bouded above, by this costat c, wheever the vector x is subject to the costrait x 1+...x = c! So: if we ca simply fid the maximum of (x 1... x ) 1/ uder this costrait x 1 +...x = c, we will kow whether or ot our iequality holds because if the maximum is c, the surely all of the values of our fuctio must be c! To phrase this i the laguage of Lagrage multipliers, we have f(x) = (x 1... x ) 1/, g(x) = x 1+...x, costraied to equal some c, ad we wat to fid the maximum of f uder the costrait g(x) = c. 4
With this setup, we ca ote that sice g = ( 1,... 1 ) is ever the zero vector, it costitutes a liearly idepedet set of oe vector, ad thus that the oly extremal values of f uder our costrait will occur at poits where f = λ g: i.e. x such that ( 1, 1 ),... ( ( = (x 1 ) 1/ (x 2... x ) 1/), x 1 ( 1 ( = (x 1 ) 1/ 1 (x 2... x ) 1/), 1 1 = 1 ( (x 1 ) 1/ 1 (x 2... x ) 1/), 1 = 1. ( (x 2 ) 1/ 1 (x 1 x 3... x ) 1/), x 1 = x 1/ 1 (x 2... x ) 1/, x 2 = x 1/ 2 (x 1 x 3... x ) 1/,. x i = (x 1... x ) 1/, for every i. (x 2 ) 1/ (x 1 x 3... x ) 1/) ),... ( (x 2 ) 1/ 1 (x 1 x 3... x ) 1/) ),... ( x 2 So, the oly critical poit of our fuctio f o the level set g(x) = c occurs whe all of the coördiates x i are equal. This is clearly a maximum, as it is the oly critical poit o our etire set g(x) = c, f evaluated at ay poit o the boudary of g(x) = c (those where oe coördiate x i is ) is idetically, ad < f(x 1,... x 1 ) = (x 1 )1/ = x 1. Thus, because f(x 1,... x 1 ) = x 1 = g(x 1,... x 1 ) = c, we have that f(x) c at f s maximum, ad thus that f(x) c for all values of x such that g(x) = c. I other words, for ay costat c, we ve prove that if the arithmetic mea of a umber is c, its geometric mea must be c: which is precisely what we wated to prove. 3 Itegratio of Fuctios from R 2 to R. Chagig tacks etirely, we ow move to discussig itegratio i higher dimesios. Recall the followig defiitios ad theorems: 3.1 Basic defiitios ad theorems. Defiitio. We say that a fuctio f : R 2 R is a step fuctio o some rectagle R iff there is a subdivisio of R ito smaller rectagles R 1,... R, such that f is costat o each of the R i s. 5
Example. The fuctio draw below is a step fuctio o [, 3] [, 3]: Defiitio. The itegral of a step fuctio f over some rectagle R is simply the sum of the volumes of all of the boxes formed by the R i s ad f s costat value o these R i s. Example. The itegral of the fuctio draw above o [, 3] [, 3] is simply 2 + 1 + + 1 + + 1 + + 1 + 2 =. Defiitio. A fuctio f is itegrable over some rectagle R iff there is some uique value L such that for ay two step fuctios s, t o R such that s(x, y) f(x, y) t(x, y) o all of R, we have s(x, y)da L t(x, y)da. R (Note that there will always be some value of L: what you re always tryig to prove wheever you use this defiitio is that this value of L is *uique*.) Theorem 4 Suppose that a fuctio f : R 2 R is itegral over some rectagle [a, b] [c, d]; suppose, furthermore, that for ay y [c, d], the sigle-variable calculus itegral b a R f(x, y)dx 6
exists. The we ca fid [a,b] [c,d] with respect to y: i other words, we have [a,b] [c,d] f(x, y)da by simply itegratig first with respect to x ad the f(x, y)da = d c ( b a ) f(x, y)dx dy. Practically speakig, the above theorem is how you re goig to calculate most itegrals; the defiitios are really oly used i pathological cases, or where you have a fuctio with a lot of discotiuities. However, to use the above theorem, you have to kow ahead of time that your fuctio *is* itegrable! The followig defiitio ad theorem tells us whe this happes: Defiitio. A set A is said to have cotet zero if, for ay ɛ >, there is some fiite collectio of rectagles R 1... R such that A i=1 R i i= vol(r i) < ɛ. I other words, a set has cotet zero iff you ca squeeze it iside a fiite set of rectagles of arbitrarily small volume; i.e. it s ot takig up ay space i R, i a sese. Theorem 5 Let S be the set of discotiuities of a fuctio f : R 2 R o some rectagle R. If S has cotet zero, the f is itegrable o R. As a special case, cotiuous fuctios are itegrable over ay rectagle, as their set of discotiuities is the empty set (which trivially has cotet zero). 3.2 A series of examples. We work a series of examples, to give a feel for the material: Questio 6 Does the itegral exist? What is it? [,1] [,1] mi(x, y)da Solutio. So: first, otice that this is a cotiuous fuctio, ad therefore by our above theorem this itegral exists. 7
The, otice that for ay fixed y [, 1], we have 1 mi(x, y)dx = = y y = x2 2 mi(x, y)dx + xdx + 1 y + xy 1 y = y2 2 + y y2 = y y2 2, y ydx 1 y mi(x, y)dx ad therefore that the itegral 1 mi(x, y)dx exists for all y. The, by our earlier theorem, we ca evaluate mi(x, y)da by simply itegratig with respect to x ad the with respect to y: [,1] [,1] [,1] [,1] mi(x, y)da = = 1 1 1 = y2 = 1 3. mi(x, y)dxdy (y y2 2 y3 6 1 2 ) dy So, if you take two radom umbers i [, 1] ad look at the smaller of the two, the average value you d see is 1/3. Questio 7 Suppose that f(x, y) is the fuctio equal to 1 wheever x ad y are both i the Cator set C, ad otherwise. Does the itegral f(x, y)da exist? What is it? [,1] [,1] Solutio. So: otice first that C C is cotaied withi each the followig sets: C C = [, 1] 2. C 1 C 1 = [, 1 3 ]2 ([, 1 3 ] [ 2 3, 1]) ([ 2 3, 1] [, 1 3 ]) [ 2 3, 1]2 C 2 C 2 = [, 1 9 ]2 [, 1 9 ] [ 2 9, 1 3 ]... 8
. ad that for ay C C, we have 2 2 parts, each with volume 1/3 2 : therefore, each of these sets has volume ( 2 3 )2, which goes to as gets large. As well, we kow that our fuctio f is cotiuous o the complemet of each of the C C s, as each of these C C s are closed sets, so their complemet is ope, ad therefore we ca fid a ope ball aroud ay poit i the complemet that has o poits i C C, o which our fuctio is idetically ad therefore cotiuous at that poit. So our fuctio is cotiuous o the complemet of each C C ; this meas that our fuctio is discotiuous, at worst, at the poits that are i every C C : i.e. our fuctio is discotiuous at worst o the set C C. But this set is of cotet zero, as it s cotaied withi each of the C C s! So our fuctio is itegrable. Furthermore, we kow that if s is the step fuctio idetically equal to, ad t is the step fuctio equal to 1 o C C, ad otherwise, we have that s(x, y) f(x, y) t (x, y) for all, ad also [,1] [,1] s(x, y)da =, [,1] [,1] t (x, y)da = ( ) 2 2 3 the right-had part of which coverges to as. Therefore, the oly umber betwee these two step fuctios for all is. Therefore, by defiitio, the itegral of this fuctio is. Questio 8 Suppose that f(x, y) is the fuctio equal to 1 qs wheever x = p q ad y = r s are both ratioal umbers i writte i lowest terms, ad otherwise. Does the itegral f(x, y)da exist? What is it? [,] [,] Solutio. So: where is this fuctio discotiuous? Well: take ay poit (x, y) where oe of x, y / Q. The, f(x, y) =. What happes for poits i the plae that are very close to (x, y)? Well, if it s x that s irratioal, we claim that ay value x very close to x will have to either be irratioal or have very large deomiator. Why is that? Well, pick large eough that the -th decimal place of x disagrees with the 1-th decimal place of x. The, if x is withi 1 (+1) of x, we must have that x 9
ad x agree o their 1 first decimal places. (This is because if the -th decimal place ad the 1th decimal place of x disagree, the specifically they re ot both 9 or both : therefore, both x 1 (+1) ad x + 1 (+1) agree o their first 1 decimal places, as you re at most addig or subtractig 1 from the + 1-th decimal place. The same is therefore true for ay umber withi 1 (+1) of x.) But x is irratioal, ad irratioal umbers caot be expressed as ratioal umbers: therefore, for very large values of, i order to agree with the first 1 digits of x, our umber x will either have to be irratioal or be the ratio of ever-icreasigly-large umbers. Therefore, the deomiatory grows arbitrarily large! Upshot of this: if we take a ball of radius 1 (+1) aroud the poit (x, y) where oe of these coördiates is irratioal, ad let, the values of f take o i this ball go to. Therefore, our fuctio is cotiuous at ay such poit (x, y) where oe (or both) of x, y are irratioal! However, where both x, y are ratioal, our fuctio is equal to some fixed costat 1 qs. I ay ball aroud (x, y), we kow (from HW #1) that there are poits with irratioal coördiates i that ball, ad therefore poits o which our fuctio is ; therefore, because there are poits arbitrarily close to (x, y) where our fuctio is, ad f(x, y), we kow our fuctio is discotiuous at all poits (x, y) Q 2 [, 1] 2. So, this tells us etirely where our fuctio is cotiuous ad discotiuous! As such, you might be tempted to try to show that this set of discotiuities is cotet zero, to use our earlier theorems. IT IS NOT. The set Q 2 [, 1] 2 is ot of cotet zero: ay *fiite* collectio of rectagles that covers it has to have total volume 1! (If you allow a ifiite collectio of rectagles, you ca make the volume arbitrarily small; this is a otio of measure, which we will talk about later.) Thus, the oly tool we have at had is resortig to the defiitio to fid this fuctio s itegral. However, this is ot too awful! I specific, do the followig: Let {(p 1, q 1 ),... (p m, q m )} be the collectio of all ratioal pairs i [, 1] 2 where the deomiators of both ratioal umbers are. There are clearly fiitely may such pairs. Aroud each poit (p i, q i ), put a rectagle R i with area ɛ/2 i. Let t be the step fuctio that is 1 o each such rectagle, ad 1/ 2 otherwise. The, at every poit ot i such a rectagle, we have f(x, y) 1/ 2 = t (x, y), because the deomiators of x ad y are both (or oe of x, y are irratioal); as well, at ay poit i such a rectagle, f(x, y) 1 t (x, y), trivially. As well, we have that f(x, y), the step fuctio that s idetically, trivially. 1
The, because = ad t (x, y)da = t (x, y)da + t (x, y)da [,1] [,1] R 1... R m everythig else 1 = 1dA + 2 da R 1... R m everythig else ( m ) 1 vol(r i ) + 1 2 vol([, 1]2 ) = 1 1 i=1 ( m 2 i i=1 ( = ɛ + 1 2 i=1 ) ɛ + 1 2 ɛ 2 i ) + 1 2 we kow that the itegral of t ca be made as close to as we wat it to be, by pickig arbitrarily small ɛ ad lettig. Therefore, the oly value betwee these two itegrals is, ad thus the itegral of this fuctio exists ad is. 11