REVIEW OF CALCULUS Hera J. Bieres Pesylvaia State Uiversity (Jauary 28, 2004) 1. Suatio Let x 1,x 2,...,x e a sequece of uers. The su of these uers is usually deoted y x 1 % x 2 %...% x ' j x j, or x 1 % x 2 %...% x ' ' x j. The idex j ay e replaced y ay other variale ae. Thus, x 1 % x 2 %...% x ' ' i'1 x i well. Next, let y 1,y 2,...,y e aother sequece of uers. The we ca write as x 1 % x 2 %...% x y 1 % y 2 %...% y ' x 1 % x 2 %...% x j y j ' x 1 j y j % x 2 j y j %...% x j y j (1) ' j x 1 y j % j x 2 y j %...% j x y j ' j j i'1 x i y j. Of course, the order of the suatio does ot atter: j j i'1 x i y j ' j j i'1 x i y j. Moreover, replacig y 1,y 2,...,y i (1) y x 1,x 2,...,x it follows that 2 j x j ' x 1 % x 2 %...% x 2 ' j j i'1 x i x j. (2) Note that the reaso for usig differet idices i ad j is that the suatio i (2) is doe i two steps. First, for each idex i we su up x i x j for j = 1,...,, ad the we su up x i ' x j for i = 1
1,...,. The sae applies to (1). The average of the uers x 1,x 2,...,x is usually deoted y I particular, we have x ' x 1 % x 2 %...% x ' 1 j x i. j (x j & x) ' j x j & j x ' j x j &.x ' j x j &. 1 j x j ' j x j & j x j ' 0. (3) This easy result will prove useful i regressio aalysis. 2. Special sus Cosider the su 1 % 2 % 3 %...% ' ' j. There is a easy forula for this su: j j ' (%1)/2. (4) Rather tha eorizig this forula, it is etter to eorize how it is derived. Sice the order of the suatio does ot atter, we ca write ' j i two ways: j j j ' 1 % 2 % 3 %... %, ad j ' % &1 % &2 %... % 1 Addig up the left ad right-had sides of the two equatios i (5) yields (5) 2 j j ' (%1) % (%1) % (%1) %...% (%1) ' (%1). (6) Dividig (6) y 2, the result (4) follows. Next, cosider the su 1 % x % x 2 % x 3 %...% x ' x 0 % x 1 % x 2 % x 3 %...% x ' ' j'0 x j, 2
where x is ay uer. The forula for this su is: j x j ' 1 & x %1 j'0 1 & x. (7) Agai, it is easier to eorize how this forula is derived tha to eorize the forula itself. First, oserve that ' j'0 x j ' 1 % ' x j. Next, replace the idex j y i-1. The we ca write: &1 &1 j x j ' 1 % j x j ' 1 % j x i%1 ' 1 % x. j j'0 i'0 i'0 ' 1 % x. j x j & x j'0 ' 1 & x %1 % x. j &1 x i ' 1 % x. j x j j'0 j'0 x j. (8) Solvig equatio (8) for ' j'0 x j yields the forula (7). 3. Liits The liit of a sequece y, ' 1,2,3,..., of uers is a uer y such that y approaches y if icreases to ifiity. The foral defiitio of a liit is: A sequece y, ' 1,2,3,..., of uers has a liit y, say, deoted y y ' li 64 y, if ad oly if for every uer g > 0 there exists a idex 0 (which ay deped o g) such that y & y < g for all $ 0. For exaple, if y ' 1/ the li 64 y ' 0. To see this, pick a aritrary g > 0. The y ' 1/ < g if >1/g. Thus i this case the idex 0 is the sallest atural uer $ 1/g. Aother exaple is the case y ' x, where x < 1. Give such a uer x ad a aritrary uer g > 0, it is possile to fid a positive iteger 0 such that for all $ 0. Hece Cosequetly, it follows fro (7) ad (9) that: x 0 < g, ad the y ' x ' x < g li x ' 0 if x <1. (9) 64 3
li j x j ' 1 & li 64 x %1 64 j'0 1 & x ' 1 & x.li 64 x 1 & x ' 1 1 & x if x < 1. (10) The left-had side of this equatio is usually deoted y ' 4 j'0 x j. Thus, 4 j x j ' j'0 1 1 & x if x <1. (11) More geerally, if for a sequece x 0,x 1,x 2,...,x,... of uers, li 64 ' j'0 x j exists, the this liit is deoted y ' 4 j'0 x j. Moreover, it is left as a exercise to verify that 4 If li j x j exists the li j x j ' 0. (12) 64 j'0 64 j' Not every sequece has a liit, though. For exaple, if y ' (&1) the the liit does ot exist, ecause the y ' &1 ' 1 ' 1 for = 1,2,3,..., so that for 0 < g < 1 ad all positive atural uers, y >g. 4. Fuctios 4.1 Liear ad quadratic fuctios ad their roots A real fuctio f(x) assigs a real uer y = f(x) to x. Iportat classes of fuctios are the liear fuctios: f(x) ' α % β.x (13) ad the quadratic fuctios: f(x) ' α % β.x % γ.x 2, (14) where α, β ad γ are give costats. The roots of a fuctio f(x) are the values of x for which f(x) = 0. I the liear case (13) there is oly oe root, aely x =!α/β, provided that β 0. I the quadratic case (14) the uer of roots is either 0, 1 or 2, depedig o what α, β ad γ are. I order to derive these roots, oserve 4
first that (x % a) 2 ' x 2 % 2.a.x % a 2. Next, assue that γ 0. The α % β.x % γ.x 2 ' 0 Y x 2 % β γ.x '&α γ Y x 2 % 2. β 2γ.x '&α γ Y x 2 % 2. β 2γ.x % β 2γ 2 '& α γ % β 2γ 2 (15) Y x % β 2γ 2 ' β 2 & 4αγ 4γ 2. If β 2 & 4αγ >0the the last equality i (15) iplies that the quadratic fuctio (14) has two roots: If β 2 & 4α ' 0 x 1 ' &β & β2 & 4αγ, x 2γ 2 ' &β % β2 & 4αγ. (16) 2γ the the quadratic fuctio (14) has oly oe root: x ' &β 2γ, (17) ad if β 2 & 4α <0the quadratic fuctio (14) has o real roots. 1 4.2 The exp(.) ad l(.) fuctios The expoetial fuctio exp(x) is defied as exp(x) ' e x, where e. 2.7182818285 (18) It ca e show 2 that exp(x) ' j 4 k'0 x k k!, (19) 1 However, the roots are the coplex-valued: x 1 ' &β & i. 4αγ & β2 2γ, x 2 ' &β % i. 4αγ & β2 2γ,wherei ' &1. 2 But that requires advaced calculus! 5
where k! (read: k factorial) is the product of the atural uers 1 to k: k! ' 1 2 3... k, ad 0! is defied as 1: 0! ' 1. The uerical value of the uer e i (18) is oly a approxiatio, though. The true uer e has a ifiite uer of decial digits without a repeatig patter, ad is therefore irratioal. We ca oly express e exactly as a liit: e ' j 4 k'0 1 k! ' li j 64 k'0 1 k!. The atural logarith is the iverse of the expoetial fuctio: The atural logarith, l(x), is for each x > 0 a uer y such that exp(y) = x. Sice exp(y) > 0, the fuctio l(x) is oly defied for x > 0. Iportat properties of the fuctio l(x) are: l(x) <0for 0<x <1, l(x) ' 0 for x ' 1, l(x) >0for x >1, l(x.y) ' l(x) % l(y) for x >0ad y >0, l(x/y) ' l(x) & l(y) for x >0ad y >0, l(x α ) ' α.l(x) for x >0ad ay α. It is left as a exercise to verify these properties fro the defiitio of l(x). (20) 4.3 Cotiuity Cotiuity of a fuctio f(x) i a poit x 0 ca e defied i two (equivalet) ways. The first way is via liits: A fuctio f(x) is cotiuous i x 0 if ad oly if f(x 0 ) = li 64 f(x 0 % 1/) ad f(x 0 ) = li 64 f(x 0 & 1/). 6
This defiitio is equivalet to the followig official defiitio: A fuctio f(x) is cotiuous i x 0 if ad oly if for each g > 0 there exists a > 0 (possily depedig o x 0 ) such that f(x) & f(x 0 ) < g if x & x 0 <. It is ot hard to show that the secod defiitio iplies the first oe. The proof that the other way aroud is also true is harder ad therefore oitted. The secod defiitio gives rise to aother defiitio of a liit: li x6x0 f(x) ' y if ad oly if for each g > 0 there exists a > 0 such that f(x) & y <g x & x 0 <. if Thus, f(x) is cotiuous i x 0 if li x6x0 f(x) ' f(x 0 ). For exaple, the liear fuctio (13) is cotiuous i all x, ad so is the quadratic fuctio (14). The latter ca e show as follows. Let x 0 e aritrary ad fixed, ad let x & x 0 <1. The f(x) & f(x 0 ) ' β(x & x 0 ) % γ(x 2 & x 2 0 ) ' β(x & x 0 ) % γ(x & x 0 )(x % x 0 ) ' β(x & x 0 ) % γ(x & x 0 ) 2 % 2x 0 γ(x & x 0 ) (21) # β x & x 0 % γ x & x 0 2 % 2 x 0 γ x & x 0 <( β % γ % 2 x 0 γ ) x & x 0, where the last iequality i (21) follows fro the fact that x & x 0 2 < x & x 0 if x & x 0 < 1. Next, choose a aritrary g > 0, ad let (21) that f(x) & f(x 0 ) < g if i all x > 0. x & x 0 <. ' i[1,g/( β % γ % 2 x 0 γ )]. The it follows fro Also the expoetial fuctio (18) is cotiuous i all x, ad the l(x) fuctio is cotiuous 7
5. Derivatives 5.1 What is a derivative? The derivative of a fuctio f(x) is deoted y f ) (x), ad is defied y f ) f(x % ) & f(x) (x) ' li 60. (22) A alterative otatio for a derivative is df(x)/dx. I order for a derivative to exist, the liit i (22) ust exist ad e the sae regardless whether > 0 (so that 90) or < 0 (so that 8 0). If so, the fuctio ivolved is said to e differetiale i x. The derivatio of f ) (x) is illustrated i the followig figure. Figure 1: Derivative The curved lie i Figure 1 represets the fuctio f(x). The legth of the lie piece etwee the poits P ad A, P6A say, is the value of the fuctio f(x) i x at poit P, ad Q6C is equal to f(x%). Moreover, P6Q = A6B =. Thus, f(x % ) & f(x) ' C6B A6B, which is the tagets 3 of the agle etwee the legs A6B ad A6C of the triagle ABC. Now if we let 6 0 the this agle approaches the agle of the lie through the poits R ad A with the 3 The tagets of a agle is defied as: ta() ' si()/cos(). 8
horizotal axis. This lie is called the taget lie of f(x) i poit A. Thus, the derivative of f(x) i x at poit P is: f ) (x) ' A6P R6P. This ratio is called the slope of the fuctio f(x) i x at poit P. The quadratic fuctio (14) is differetiale i every x: f(x) ' α % β.x % γ.x 2 Y f ) (x) ' β % 2γ.x. (23) To see this, oserve that i the case (14), ' li 60 li 60 f(x % ) & f(x) β. % 2γ.x % γ 2 ' li 60 β. % γ.(x % ) 2 & γ.x 2 ' li (β % 2γx % γ) ' β % 2γx. 60 (24) Of course, the derivative of the liear fuctio (13) follows fro (23) y settig γ = 0. The expoetial fuctio has itself as derivative: f(x) ' e x Y f ) (x) ' e x, (25) ecause it follows fro (19) that li 60 f(x%) & f(x) ' li 60 e x% & e x ' e x.li 60 e & 1 ' e x.li 60 ' 4 k'0 k /k! & 1 ' e x.li 60 1 % ' 4 k'1 k /k! & 1 ' e x.li ' 4 k'1 k&1 /k! ' e x.li ' 4 k'0 k /(k%1)! 60 60 (26) ' e x. 1 % li ' 4 k'1 k /(k%1)! ' e x. 60 Moreover, the derivative of l(x) is 1/x: f(x) ' l(x) Y f ) (x) ' 1/x, for all x >0, (27) 9
To prove (27), let y = l(x). The x = exp(y), hece it follows fro (25) that dx/dy ' dexp(y)/dy ' exp(y) ' x. (28) Takig the reciprocal of (28) it follows that dy/dx ' dl(x)/dx ' 1/x. (29) It should e oted that there are ay fuctio that are ot differetiale i soe poits, eve fuctios that are cotiuous i every poit. For exaple, the asolute value fuctio f(x) ' x is cotiuous i every x, ut is ot differetiale i x = 0. 5.2 The chai rule Next, cosider two differetiale fuctios f(x) adg(x), ad let h(x) ' f(g(x)). The questio is: Give the derivatives f ) (x) adg ) (x), what is the derivative h ) (x) ' df(g(x))/dx? The aswer is the chai rule: h ) (x) ' df(g(x)) dx ' df(g(x)) dg(x) dg(x) dx ' f ) (g(x)).g ) (x). (30) For exaple, let f(x) ' l(x) adg(x) ' x 2 %1. The h(x) ' f(g(x)) ' l(x 2 %1), f ) (x) ' 1/x, ad g ) (x) ' 2x, hece it follows fro (30) that h ) (x) ' The proof of (30) is left as a exercise. 2x x 2 %1. 10
6. Itegrals 6.1 What is a itegral? The cocept of a itegral is illustrated i Figure 2: Figure 2: The itegral a f(x)dx = grey area. The itegral of a fuctio f(x) over a iterval [a,], deoted y f(x)dx, is the grey area i Figure a 2. This area ca e (roughly) approxiated y a su 4 of rectagle areas with height f(x) ad width dx, as illustrated i Figure 3: Figure 3: Approxiatio of f(x)dx The first rectagle has area f(a) (c&a), the secod has area f(c) (d&c), the third has area a 4 Therefore, the itegral syol is actually a stylized versio of the letter S i "Su". 11
f(d) (e&d), ad the last oe has area f(e) (d&). Assuig that the itervals [a,c], [c,d], [d,e] ad [e,] have equal legth ( & a)/4 ' dx, say, so that c ' a % (&a)/4, d ' a % 2(&a)/4, e % 3(&a)/4, the total grey area i Figure 3 is: &1 j f(a % k(&a)/) (&a)/ ' k'0 j x'a%k(&a)/ dx'(&a)/ k'0,1,...,&1 f(x)dx, for ' 4. Lettig 6 4, the liit of this su is the grey area i Figure 2: f(x)dx. a Note that if f(x) <0o[a,] the f(x)dx <0, as follows y flippig the pictures i a Figures 2 ad 3 vertically 180 degrees. Therefore, the itegral of f(x) o[a,] i Figure 4 elow is the differece of the darker grey area aove the horizotal axis, ad the lighter grey area elow the horizotal axis. Moreover, Figure 4: Itegral f(x)dxif f(x) flips sig a a a f(x)dx '& f(x)dx. (31) ecause the latter itegral should e iterpreted as the grey area i Figure 1 lookig fro the ack (the egative side) of the picture: If we flip Figure 1 horizotally 180 degrees, the poit will e at the left of poit a, ad the ew viewpoit is ow ehid Figure 1: 12
Figure 5: Back side of Figure 1 6.2 Derivative of a itegral Let poit e i Figure 3 e!, where > 0 is very sall. The the approxiatio will e close, ad so will e & f(x)dx. f(&). f() & f(x)dx. f(). Therefore, li 90 & f(x)dx ' f(). Siilarly it follows that li 90 % f(x)dx ' f(). (32) More geerally, we have: x Let F(x) ' f(u)du, where x > a. The F ) (x) ' f(x). (33) a 13
I order to verify this, oserve that F ) (x) ' li 60 F(x%) & F(x) ' li 60 a x% x f(u)du & f(u)du a ' li 60 x x% f(u)du ' f(x), (34) where the last equality follows fro (32). Moreover, it follows fro (31): Let F(x) ' f(u)du, where x <. The F ) (x) '&f(x). (35) The proof of (35) is left as a exercise. x 7. Fuctios of two variales, ad their partial derivatives A real fuctio f(x,y) with two arguets, x ad y, assigs a real uer z = f(x,y) to a pair (x,y). These fuctios are called ivariate fuctios. For exaple, cosider the ivariate quadratic fuctio f(x,y) ' x 2 % y 2. (36) The shape of this fuctio is a hyperola: Figure 6: The fuctio f(x,y) ' x 2 % y 2 &1 <x <1,&1 <y <1. o the square 14
If the fuctio f(x,y) is differetiale i oth arguets, the we ca take the derivative of f(x,y) to x, treatig y as a costat. This derivative is called the partial derivative of f(x,y) to x, ad is deoted y Mf(x,y)/Mx or Mf(x,y) : Mx Mf(x,y) Mx f(x%,y) & f(x,y) ' li. (37) 60 Siilarly, we ca also take the derivative of f(x,y) to y, treatig x as a costat. This derivative is called the partial derivative of f(x,y) to y, ad is deoted y Mf(x,y)/My or Mf(x,y) : My Mf(x,y) My f(x,y%) & f(x,y) ' li. (38) 60 For exaple, i the case (36) we have Mf(x,y)/Mx ' 2x, Mf(x,y)/My ' 2y. The geeral ivariate quadratic fuctio takes the for f(x,y) ' γ 1 (x & β 1 ) 2 % γ 2 (y & β 2 ) 2, (39) where α 1,β 1,γ 1,α 2,β 2,γ 2 are costats. The Mf(x,y) Mx Mf(x,y) My ' 2γ 1 (x & β 1 ) & 2γ 2 β 2 (y & β 2 ) ' 2γ 2 (y & β 2 ) & 2γ 1 β 1 (x & β 1 ) (40) 8. The iiu or axiu of a ivariate quadratic fuctio Clearly, the fuctio (36) is iial zero for x = 0 ad y = 0. I this poit the partial derivatives ivolved are zero. This ca easily e verified directly, ut also fro Figure 5: I the poit (0,0) the hyperola touches the horizotal plae at zero level, ad is aove zero level for ay other poit (x,y). Thus, the poit (x,y) for which the fuctio f(x,y) ' x 2 % y 2 is iial ca e foud y solvig the so-called first-order coditios: 15
Mf(x,y)/Mx ' 2x ' 0, Mf(x,y)/My ' 2y ' 0. Next, let us have a look at the geeral ivariate quadratic fuctio (39). If γ 2 >0the (39) ca e writte as γ 1 >0 ad f(x,y) ' γ 1 x & β 1 γ 1 γ 2 1 % γ 2 y & β 2 γ 2 γ 2 2. (41) The shape of this fuctio is siilar to Figure 5, except that the hyperola ivolved will e shifted, squeezed ad/or tured horizotally. Also, it is clear that this fuctio is iial if x ad y are such that γ 1 x & β 1 γ 1 γ 1 ' 0 Y x & β 1 ' 0 γ 2 y & β 2 γ 2 γ 2 ' 0 Y y & β 2 ' 0 (42) However, the sae coditios ca e derived y settig the partial derivatives (40) equal to zero: Mf(x,y) Mx Mf(x,y) My ' 2γ 1 (x & β 1 ) & 2γ 2 β 2 (y & β 2 ) ' 0 ' 2γ 2 (y & β 2 ) & 2γ 1 β 1 (x & β 1 ) ' 0 (43) Y x & β 1 ' 0 x ' (α 1 % α 2 β 1 )/(1&β 1 β 2 ) y & β 2 ' 0 Y y ' (α 2 % α 1 β 2 )/(1&β 1 β 2 ) provided that β 1 β 2 1. If γ 1 <0ad γ 2 <0the (39) ca e writte as f(x,y) '& &γ 1 x & β 1 &γ 1 &γ 1 2 & &γ 2 y & β 2 &γ 2 &γ 2 2. (44) It is easy to verify that ow the ivariate quadratic fuctio (39) takes a axiu, ad that the poit (x,y) where it is axial ca e otaied y solvig the first-order coditios (43), provided that β 1 β 2 1. 16
9. Exercises 1. Prove (12). 2. Prove (20). 3. Prove that exp(x) is cotiuous i all x. 4. Prove that l(x) is cotiuous i all x > 0, usig oe or ore of the properties (20). 5. Prove the chai rule (30). Hit: Write g(x%) ' g(x) % (g(x%) & g(x)), ad use the fact that y the cotiuity of g(x) i x, li 60 (g(x%) & g(x)) ' 0. 6. Prove (35) y odifyig (34) to this case. 7. Deterie the set of poits (x,y) where the ivariate quadratic fuctio (39) is iial or axial, for the case β 1 β 2 ' 1adγ 1 > γ 2 /β 1. 17