Lecture 5 Some ifferentiation rules Trigonometric functions (Relevant section from Stewart, Seventh Eition: Section 3.3) You all know that sin = cos cos = sin. () But have you ever seen a erivation of these results? We ll prove the first result below. In what follows, we let Once again, to fin f () we must resort to the Newton quotient, f() = sin. (2) f f( + h) f() () = lim h 0 h sin( + h) sin() = lim h 0 h sin cos h + cos sin h sin = lim (from aition formula for sin function) h 0 { [ ] h [ ]} sin h cos h = lim cos + sin h 0 h h [ ] [ ] sinh cos h = cos lim + sin lim, (3) h 0 h h 0 h where we have written the last step, provie that the limits eist. It now remains to prove that sinh lim h 0 h cos h = an lim = 0. (4) h 0 h The proofs of these limits were one in class but will not be printe here. They can be foun in Stewart s tet, pp. 90-93. It is important to note that the above limits are vali only for the case that h is measure in raians. Substitution into (3) yiels the esire result, sin = cos. (5) 95
Once again, this result is vali only if is measure in raians. The proof for the erivative of the cosine function is given as a problem in Stewart s tetbook (Eercise 20, p. 97). We can use these results to etermine the erivative of the tangent function: tan = [ ] sin cos = (sin ) cos sin(cos ) cos 2 cos cos sin ( sin) = cos 2 = cos2 + sin 2 cos 2 = cos 2 = sec 2. (6) In fact, the erivatives of all of the trigonometric functions can be erive from a knowlege of the erivatives of the sine an cosine functions. The Chain Rule (Relevant section from Stewart, Seventh Eition: Section 3.4) The Chain Rule, with which most, if not all, of you are familiar eals with the ifferentiation of composite functions. If you have a function of a function of, then how oes this composite function change with respect to. Mathematically, what is (f g)() = f(g())? (7) I think that all of you woul be able to perform the following ifferentiation, The answer is An the same goes for the following ifferentiation, (2 + 5) 3/2. (8) 3 2 (2 + 5) /2 (2) = 3( 2 + 5) /2. (9) (sin 2)7. (0) 96
The answer is 7(sin 2) 6 (2cos 2) = 4(sin 6 2)(cos 2). () Going back to the first eample, you all know somehow that you have to multiply the epression by the eponent 3 2, then reuce the eponent of the term 2 + 5 by one, an then multiply by the erivative of the insie. In terms of composite functions, we can epress this function in the form f(g()), where f() = 3/2 an g() = 2 + 5. (2) But the occurrence of as arguments in both functions may be a bit confusing. For this reason, it is stanar practice to o the following: We let u = g() = 2 + 5 (3) an then efine The Chain Rule may then be written as To check, the terms on the RHS are Then y = f(u) where f(u) = u 3/2. (4) y = f u u. (5) f u = 3 2 u/2 an u = 2. (6) y = f u which agrees with our earlier result when we substitute u = 2 + 5. Likewise, in the secon eample, we have u = 3 2 u/2 (2), (7) y = f(u), u = g(), (8) where f(u) = u 7, g() = sin 2. (9) Then y = f u u = 7u6 (2cos 2), (20) 97
in agreement with our earlier result when we substitute u = sin 2. In summary, the Chain Rule may be written as y = f u u, where u = g(). (2) You have probably seen the Chain Rule written in the following, equivalent way, f(g()) = f (g())g (). (22) These formulas are state with the assumption that f an g are ifferentiable functions. We now prove the Chain Rule. Proof of Chain Rule: We ll have to consier the Guess what? Newton quotient for the composite function f g, i.e., f(g()) = lim h 0 We assume that f is ifferentiable at g() an g() is ifferentiable at. f(g( + h)) f(g()). (23) h With an eye to the esire result in Eq. (22), us write the Newton quotient as follows, f(g( + h)) f(g()) h = f(g( + h)) f(g()) g( + h) g() g( + h) g(). (24) h The secon term on the RHS looks like it will become g () in the limit h 0, without any problem. The first term on the RHS looks like it might become f (g()), but a little more work is require. First we efine u = g() (25) an k = g( + h) g() g( + h) = g() + k = u + k. (26) Then the RHS of Eq. (24) becomes f(u + k) f(u) k g( + h) g(). (27) h Once again, in the limit h 0, we woul like the first term to become f (u). But there is a slight complication: 98
. As h 0, k = g( + h) g() 0 because g is continuous at. 2. However, it is possible that k = 0 for nonzero values of h, i.e., h 0. This is because of the presence of the function g we have no control on what it is oing for h near zero. As such, it is possible that the enominator of the first term in (27) will be zero for nonzero values of h. The question is whether this term will then blow up for nonzero h. Note: This was as far the iscussion in class went. The following material, representing a completion of the proof of the Chain Rule, was not presente in class but is inclue here for aitional information to those intereste. In orer to unerstan this potential problem, an eventually show that everything is, in fact, fine, we ll consier two cases. (Note: This is not the proceure employe by Stewart in his tetbook.) We o this by efining the following two sets:. Let H = {h near 0 k = g( + h) g() 0}. 2. Let H 2 = {h near 0 k = g( + h) g() = 0}. (This set is the complement of H.) Case : The set H represents the nice case. The enominator k of the first term in (27) never vanishes. Therefore, if we consier values of h only in this set as we take the limit h 0, we have f(u + k) f(u) lim h 0,h H k g( + h) g() h f(u + k) f(u) g( + h) g() = lim lim h 0,h H k h 0,h H h = f (u)g (), (28) in agreement with the Chain Rule. Case 2: Now assume that the set H 2 is nonempty an, in particular, there eists at least one sequence {h k } in H 2 such that h k 0 as k 0. It is along such sequences that we ll eamine the terms in (27). First of all, for all values h H 2, it follows that k = g( + h) g() = 0 g( + h) = g(). (29) That means that we can actually go back an use the original Newton quotient in (23) to compute the erivative: f (g()) = f(g( + h)) f(g()) 0 lim = lim = 0. (30) h 0,h H 2 h h 0,h H 2 h 99
In other wors, we conclue, from our limit involving h-values from H 2 that the erivative of the composite function is zero. We now show that the limits involving h-values from H must also be zero. Returning to (29), i.e., g( + h) = g(), we have g( + h) g() 0 lim = lim h 0,h H 2 h h 0,h H 2 h = 0 = g (). (3) This limit which is zero has to be g () because of our assumption that g () is efine at : If it is efine there, then the limit of the Newton quotient of any sequence of h-values must be g () = 0. Looking back at Eq. (28), this implies that the erivative for h-values from H must be zero, i.e., This completes the proof of the Chain Rule. f(g()) = f (u)g () = f (u) 0 = 0. (32) Implicit ifferentiation (Relevant section from Stewart, Seventh Eition: Section 3.5) wors, So far, we ve been taking erivatives of functions for which there is an eplicit formula, in other y = f() y = f (). (33) There are situations in which functions cannot be efine eplicitly, but rather implicitly. Before we eamine more complicate eamples, let us consier a rather simple eample that illustrates the point. Suppose that an y satisfy the equation, 2 + y 2 = 25. (34) Of course, set the of (,y) values satisfying this equation forms a circle of raius 5 centere at (0,0). This relation oes not efine a function y() because for every -value, there are two y-values. That being sai, we can etract two functions from this relation, namely, y = f() = 25 2 y = g() = 25 2. (35) 00
f an g correspon to the upper y 0 an lower y 0 halves of the circle, for, as shown below, y y = f() = 25 2 5 2 + y 2 = 25-5 0 5 y = f() = 25 2-5 The circle 2 + y 2 = 25, which is compose of two functions f() an g(), efine in the tet An, of course, we may ifferentiate these two eplicit functions of : f () = 2 ( 2) = 25 2 25 2 g () = 2 ( 2) =. (36) 25 2 25 2 Another way of fining erivatives is to treat y as a function of in (34) an ifferentiate implicitly with respect to using the Chain Rule. If we ifferentiate both sies of (34) with respect to, i.e., we obtain (2 + y 2 ) = (25) = 0, (37) 2 + 2y y = 0. (38) We can rearrange this equation to epress the erivative y in terms of an y: y = y. (39) This epression gives the slope of the tangent line to the circle 2 + y 2 = 25 at any point (,y) on the circle. For eample, ( 5 5. (,y) = 2, ): The slope of the tangent is y 2 =. 2. (,y) = ( 5 2, 5 2 ): The slope of the tangent is y =. 0
y 5 2 + y 2 = 25-5 0 5-5 These two tangents are illustrate in the figure. We can go back an check that this result is in agreement with those of our eplicit ifferentiation in (36):. Case : y = f() = 25 2. Then, from (36), f () = = 25 2 y, (40) in agreement with (39). 2. Case 2: y = f() = 25 2. Then, from (36), f () = 25 2 = y, (4) once again in agreement with (39). 02
Lecture 6 Differentiation rules (cont ) Implicit ifferentiation (cont ) The previous eample of implicit ifferentiation was probably not very convincing. Let s now consier a more complicate eample. Suppose that y, consiere as a function of, satisfies the following equation, 2 y 2 + y 3 = 3. (42) This is a cubic equation in y, an the roots of a cubic equation are known in close form so, in principle, one coul solve for y in terms of the epression woul be quite complicate. If we increase the eponent from 3 to 0, then no close form epressions are generally possible. First, ifferentiate both sies w.r.t. : (2 y 2 + y 3 ) = 0. (43) Then perform the iniviual ifferentiations, treating y as a function of an using the Chain Rule, We now collect terms in the unknown erivative, 2y 2 + 2 2 y y + y3 + 3y 2 y = 0. (44) y [22 y + 3y 2 ] = [2y 2 + y 3 ], (45) an solve for it, An that s it! y 2y + y2 = 2 2 + 3y. (46) Derivatives of inverse trigonometric functions We now show how implicit ifferentiation is very useful in the etermination of erivatives of inverse trigonometric functions. For eample, what is sin? (47) 03
Is it cos? (48) In orer to answer this question, we first write own the usual relations involving inverse functions, y = sin = sin y. (49) We now ifferentiate both sies of the secon equation w.r.t., an then use the Chain Rule to compute the erivative on the RHS, This means that our unknown (implicit) erivative is given by = (sin y), (50) = cos y y. (5) y = cos y. (52) The net step is to rewrite the RHS in terms of after all, we are treating y as a function of. Why not epress its erivative in terms of? From the relation = sin y, we may raw the triangle below, y 2 It follows that cos y = 2. (53) We coul also have etermine this result from = sin y by using Pythagoras Theorem, i.e., sin 2 y + cos 2 y =. (54) Substitution into (52) yiels the important result, sin =, < <. (55) 2 04
y y = / 2-0 Graph of the arcsin erivative function f() = / 2. Perhaps the most striking feature of this result is that the erivative blows up as or +. It is quite natural to ask if this result is consistent with the graph of y = sin. First of all, a graph of the the erivative function is sketche below. Recall that the function arcsin is efine for. Its graph is also sketche below. (Also recall that its graph is obtaine by reflecting the graph of sin for π/2 π/2 about the line y =.) At = 0, the slope of the arcsin function is, which is consistent with the above graph. As from the left, the slope of the graph is positive an getting larger an larger, approaching. This is also consistent with the blowing up of the erivative function. An as from the right, the slope of the graph is also positive an getting larger an larger, approaching, once again consistent with the blowing up of the erivative function. In summary, the behaviour of the erivative function / 2 is consistent with the graph of arcsin shown below. y π/2 y = arcsin - 0 π/2 Graph of the function arcsin. 05
An interesting sie note on the arcsin erivative function The erivative of the arcsin function, which we ll write again as follows, f() = 2, (56) is important in physics. Consier a very thin an straight metal wire which can conuct electricity. Such a wire can be moelle as a line segment of length L in which are to be foun N electrons that are free to move an therefore prouce an electric current in the wire. Here N is very large, i.e., on the orer of a mole 0 23 or fraction thereof. Now suppose that the wire is stationary an that there is no eternal electric fiel acting on it. As you know, since electrons have the same (negative) charge, they repel each other. As such, the N electrons on the segment will be istribute in such a way that the total potential energy of electronic repulsion the sum of repulsive potential energies between all possible pairs is minimize. The fascinating result is that the electrons will be istribute along the wire accoring to the function f() most of the electrons will be locate at the ens of the wire. In fact, if the line segment representing the wire is mappe to the interval [,], then up to a constant, the electronic charge ensity (number of charges per unit length) is f(). We shall be iscussing the iea of charge ensity very shortly. However, the erivation of the above result is quite complicate. The subject of equilibrium charge ensities is part of a larger fiel of stuy known as potential theory. You will encounter some of these ieas in avance courses in electricity an magnetism. Let us now consier the arccos function, i.e. Once again, we start with the efinition of the arcsin function, cos. (57) y = cos = cos y. (58) We ifferentiate both sies of the secon equation w.r.t,, the RHS, an use the Chain Rule to compute the erivative on the RHS, = (cos y), (59) = siny y. (60) 06
Rearranging, we have y = siny. (6) Once again, we remove the y. From the relation = cos y (see triangle below), it follows that sin y = 2, (62) so that cos =. (63) 2 2 y Finally, we consier the arctan function, i.e., We start with the efinition of the arctan function, tan. (64) y = tan = tan y. (65) Differentiating implicitly w.r.t., followe by the Chain Rule yiels, Solving for y yiels From the fact that = tan y, we have the following triangle, which implies that = (tan y), (66) = sec 2 y y. (67) y = sec 2 y = cos2 y. (68) cos y = + 2. (69) 07
+ 2 y The final result is tan = + 2. (70) As we ll see later in this course, this result implies that the inverse tangent function is an antierivative of the right han sie, i.e., + 2 = tan + C. (7) If you haven t seen this before, on t worry we ll erive these ieas from the beginning when we iscuss integrals later in this course. Derivatives of eponential an logarithmic functions We start with our earlier efinition of eponential functions, y = f a () = a, a > 0. (72) Recall that we showe that the erivatives of these functions are given by y = f a(0)a a h = lim a. (73) h 0 h In the special case a = e, the constant f e(0) = an we ha e = e. (74) The problem with the formula in (73) is that the multiplicative constant, f a(0) a h = lim, (75) h 0 h is still rather mysterious it s not clear how this coefficient is connecte to the base a. 08
We now show that the Chain Rule can provie us with the answer to this question. Let us first use the laws of eponentials to write f a () in the following way, y = a = (e ln a) (by efinition, a = e ln a ) = e (ln a) (76) We now use the Chain Rule, epressing y as y = e u, u = (ln a). (77) Then, by the Chain Rule, implying that y = y u u, (78) a) e(ln = e (ln a) ln a = a ln a. (79) In summary, we have the result, Comparing this equation to Eq. (73), we see that a = (ln a)a. (80) a h lim = ln a. (8) h 0 h This provies a little more unerstaning of the behaviour of the LHS as a is increase, as we reporte earlier, on the basis of numerical evience. There is only one value of a such that ln a =, an that is a = e. In this special case, Eq. (80) becomes the well-known result in (74). We ll now use the above results to compute the erivatives of the logarithmic functions introuce earlier. Recall that y = f a () = a, (82) implies that = f a (y) = log a y. (83) 09
The inverse logarithmic function y = log a, > 0. (84) is obtaine by reflecting the graph of y = a about the line y =. In the special case a = e, this function is the natural log function, Our goal is to compute the erivative As always, we start with the basic efinition, y = ln, > 0. (85) log a. (86) y = log a = a y. (87) Now ifferentiate both sies w.r.t., i.e., From the Chain Rule, Now rearrange to give, Recalling that = a y, this becomes In summary, In the special case a = e, this equation becomes = ay. (88) = a y (ln a) y. (89) y = a y ln a (90) y = ln a. (9) log a =, > 0. (92) ln a ln =, > 0. (93) 0
Lecture 7 Differentiation rules (cont ) An important result involving the logarithm function Consier the following function, ln, > 0 f() = ln = ln( ), < 0. (94) Since f( ) = f(), this function is an even function. Its graph for < 0 is obtaine by simply reflecting the graph of y = ln about the y-ais. We now compute the erivative of f().. Case : > 0. The erivative is straightforwar, f () = ln =. (95) 2. Case 2: < 0. We have to use the formula for < 0, along with the Chain Rule, the same epression as for > 0! f () = ln( ) = ( ) =, (96) In summary, we have ln = 0. (97) The fact that the same formula, i.e.,, is use for both < 0 an > 0 may be puzzling. But let s eamine what it says:. Case : > 0. Then 2. Case 2: < 0. Then > 0, implying that ln is increasing for > 0. < 0, implying that ln is ecreasing for < 0. These two properties are consistent with the graph of f() = ln, sketche below. This result will be important in our later stuy of integration. It tells us that the antierivative of the function, i.e., the function g() for which g () = other wors, is f() = ln an not simply ln. In = ln + C. (98)
y y = ln (If you re not familiar with this notation, on t worry. We ll evelop this concept later in the course.) Logarithmic ifferentiation This metho can be very helpful for calculating erivatives of complicate epressions involving combinations of proucts, quotients, square roots, etc.. It eploits the aitive property of logarithms, i.e., as well as the eponential property, lnab = ln a + ln b, (99) ln a c = cln a. (00) We simply illustrate with an eample. Suppose that we have the function y = 3/4 ( 2 + 9) 5/2 (3 + 0) 6. (0) We coul try to use the quotient rule, along with the prouct rule, etc.. But the resulting epression will be quite complicate, an susceptible to error. Instea, let s take logarithms of both sies, i.e., [ ] 3/4 ( 2 + 9) 5/2 ln y = ln (3 + 0) 6 = 3 4 ln + 5 2 ln(2 + 9) 6ln(3 + 0). (02) Now ifferentiate both sies w.r.t.. We ll have to ifferentiate the LHS implicitly as follows, ln y = y y. (03) 2
Substitution yiels y y = 3 4 = 3 4 + + 5 2 2 + 9 (2) 6 3 + 0 (3) 5 2 + 9 8 3 + 0 (04) We now solve for the esire erivative, y = y We coul substitute for y if necessary, [ 3 4 + y = 3/4 ( 2 + 9) 5/2 (3 + 0) 6 5 2 + 9 8 ]. (05) 3 + 0 [ 3 4 + 5 2 + 9 8 ], (06) 3 + 0 an if we really wante to, we coul epan the RHS, but we won t o that here. Logarithmic ifferentiation allows us to treat functions that woul present great ifficulty using our stanar methos of ifferentiation. We illustrate with the following eample. Eample: The function f() =, > 0. (07) Note that f() =, f(2) = 4, f(3) = 27,..., f(0) = 0 0. Obviously, this function is growing very quickly! After computing the erivative, we ll return to answer the very natural question, What happens to f() in the limit 0 +? In orer to compute the erivative of this function, we take its logarithm: y = lny = ln. (08) We now ifferentiate both sies of the secon equation w.r.t.. Once again, the LHS will have to be ifferentiate implicitly, y y = ln + = ln +. (09) This implies that y = y(ln + ) = (ln + ). (0) 3
In summary, = (ln + ). () The erivative of is a multiple of, but a nonconstant multiple the coefficient ln + also grows with. This inicates that, as perhaps epecte, the function grows faster than e. From Eq. () we note that the erivative is zero when ln + = 0 ln = = e 0.368. (2) As well, f () < 0 for < e an f () > 0 for > e, inicating that = e is a local minimum. Finally, there remains the question about the behaviour of f() = as 0 +. If we take logarithms again, y = lny = ln. (3) Later in this course, we ll show that even though ln, the prouct ln 0 as 0 +. (It coul also be prove using l Hopital s Rule, but we ll avoi this at present.) Since lim 0 0 ln y = lim ln = 0, (4) + + it follows, from eponentiation of the leftmost an rightmost parts of this equation, that e lim 0 + lny = e 0 =. (5) But since the function e is continuous at all, we may move the limit outsie, i.e., e lim 0 + lny = lim 0 eln y = lim y =. (6) + 0 + A plot of the graph of this function (generate by MAPLE) over the interval [0, 2] is presente below. We see that the plot illustrates the qualitative features euce above, e.g., local maimum at 0.4. The number e as a limit We now erive an important an quite well-known (you may have seen it in high school) formula that epresses the number e as the limit of an infinite prouct. First consier the logarithm function, f() = ln, > 0, (7) 4
4 3 2 0.0 0.5.0.5 2.0 Graph of f() = for [0,2]. for which we know that f () =, an f () =. (8) From the Newton quotient efinition of the erivative at = (we ll use instea of h for the limiting variable), Since f () =, it then follows that f f( + ) f() () = lim 0 ln( + ) ln() = lim 0 ln( + ) = lim. 0 = lim 0 ln( + ) / (since bln a = ln a b ). (9) Now take eponentials of both sies, lim ln( + 0 )/ =. (20) e lim 0 ln(+) / = e = e. (2) Because e is a continuous function, we can take the limit outsie the function, i.e., e lim 0 ln(+) / = lim e ln(+)/. (22) 0 5
(This is the reverse of what we saw in an earlier theorem involving limits an continuous functions, i.e., lim f(g()) = f(lim g()).) From the efinition of the logarithm, the RHS of the above equation a a is Combining this result with Eq. (2), we have lim eln(+)/ = lim( + ) /. (23) 0 0 lim ( + 0 )/ = e. (24) We may now let = n so that 0 implies that n. This yiels the result, e = lim n ( + n) n. (25) In the case that n is a positive integer, this formula involves finite proucts, for eample,. n = : + = 2. 2. n = 2: 3. n = 3: 4. n = 4: 5. n = 00: ( + 2) 2 = ( + 3) 3 = ( + 4) 4 = ( ) 3 2 = 9 2 4 = 2.25. ( ) 4 3 = 64 3 27 2.307. ( ) 5 4 = 625 4 256 2.44. ( + ) 00 2.705. 00 It appears that these proucts form an increasing sequence an that they will approach e from below. 6