text
stringlengths
1
7.76k
source
stringlengths
17
81
CHAPTER 3 Topics in Differential Calculus 3.1 Tangent Lines Everyone knows that the Earth is not flat, but locally, e.g. in your immediate vicinity, isn’t the Earth effectively flat? In other words, “flat” is a fairly good approximation of the Earth’s surface “near” you, and it simplifies matters enough for you to do some useful things. This idea of approximating curved shapes by straight shapes is a frequent theme in calculus. Recall from Chapter 1 that by the Microstraightness Property a differentiable curve y = f (x) actually is a straight line over an infinitesimal interval, having slope dy dx. The extension of that line to all values of x is called the tangent line: For a curve y = f (x) that is differentiable at x = a, the tangent line to the curve at the point P = (a, f (a)) is the unique line through P with slope m = f ′(a). P is called the point of tangency. The equation of the tangent line is thus given by: y −f (a) = f ′(a)·(x−a) (3.1) y x P y = f (x) tangent line a slope = f ′(a) Figure 3.1.1 Tangent line Figure 3.1.1 on the right shows the tangent line to a curve y = f (x) at a point P. If you were to look at the curve near P with a microscope, it would look almost identical to its tangent line through P. Why is this line—of all pos- sible lines through P—such a good approximation of the curve near P? It is because at the point P the tangent line and the curve both have the same rate of change, namely, f ′(a). So the curve’s values and the line’s values change by roughly the same amount slightly away from P (where the line and curve have the same value), making their values nearly equal. 56
ElementaryCalculus_Page_66_Chunk3601
Tangent Lines • Section 3.1 57 Example 3.1 x y 1 1 −1 0 (1,1) y = x2 y = 2x−1 Figure 3.1.2 Find the tangent line to the curve y = x2 at x = 1. Solution: By formula (3.1), the equation of the tangent line is y −f (a) = f ′(a)·(x−a) with a = 1 and f (x) = x2. So f (a) = f (1) = 12 = 1. Both the curve y = x2 and the tangent line pass through the point (1, f (1)) = (1,1). The derivative of f (x) = x2 is f ′(x) = 2x, so f ′(a) = f ′(1) = 2(1) = 2, which is the slope of the tangent line at (1,1). Hence, the equation of the tangent line is y−1 = 2(x−1), or (in slope-intercept form) y = 2x−1. The curve and tangent line are shown in Figure 3.1.2. Near the point (1,1) the curve and tangent line are close together, but the separation grows farther from that point, especially in the negative x direction. In trigonometry you probably learned about tangent lines to circles, where a tangent line is defined as the unique line that touches the circle at only one point, as in the figure on the right. In this case the tangent line is always on one side of the circle, namely, the exterior of the circle; it does not cut through the interior of the circle. In fact, that definition is a special case of the calculus definition. In general, though, the tangent line to any other type of curve will not necessarily be on only one side of the curve, as it was in Example 3.1. Example 3.2 x y (0,0) y = x3 y = 0 Figure 3.1.3 Find the tangent line to the curve y = x3 at x = 0. Solution: Use formula (3.1) with a = 0 and f (x) = x3. Then f (a) = f (0) = 03 = 0. The derivative of f (x) = x3 is f ′(x) = 3x2, so f ′(a) = f ′(0) = 3(0)2 = 0. Hence, the equation of the tangent line is y−0 = 0(x−0), which is y = 0. In other words, the tangent line is the x-axis itself. As shown in Figure 3.1.3, the tangent line cuts through the curve. In general it is possible for a tangent line to intersect the curve at more than one point, depending on the function. Example 3.3 x y y = sin x y = x (0,0) Figure 3.1.4 Find the tangent line to the curve y = sin x at x = 0. Solution: Use formula (3.1) with a = 0 and f (x) = sin x. Then f (a) = f (0) = sin 0 = 0. The derivative of f (x) = sin x is f ′(x) = cos x, so f ′(a) = f ′(0) = cos 0 = 1. Hence, the equation of the tangent line is y−0 = 1(x−0), which is y = x, as in Figure 3.1.4. Near x = 0, the tangent line y = x is close to the line y = sin x, which was shown in Section 1.3 (namely, sin dx = dx, so that sin x ≈x for x ≪1).
ElementaryCalculus_Page_67_Chunk3602
58 Chapter 3 • Topics in Differential Calculus §3.1 There are several important things to note about tangent lines: • The slope of a curve’s tangent line is the slope of the curve. Since the slope of a tangent line equals the derivative of the curve at the point of tangency, the slope of a curve at a particular point can be defined as the slope of its tangent line at that point. So curves can have varying slopes, depending on the point, unlike straight lines, which have a constant slope. An easy way to remember all this is to think “slope = derivative.” • The tangent line to a straight line is the straight line itself. This follows easily from the definition of a tangent line, but is also easy to see with the “slope = derivative” idea: a straight line’s slope (i.e. derivative) never changes, so its tangent line— having the same slope—will be parallel and hence must coincide with the straight line (since they have the points of tangency in common). For example, the tangent line to the straight line y = −3x+2 is y = −3x+2 at every point on the straight line. • The tangent line can be thought of as a limit of secant lines. A secant line to a curve is a line that passes through two points on the curve. Figure 3.1.5 shows a secant line LPQ passing through the points P = (x0, f (x0)) and Q = (w, f (w)) on the curve y = f (x), y x y = f (x) LPQ P Q TP x0 f (x0) w f (w) Figure 3.1.5 Secant line LPQ approaching the tangent line TP as Q →P As the point Q moves along the curve toward P, the line LPQ approaches the tangent line TP at the point P, provided the curve is smooth at P (i.e. f ′(x0) exists). This is because the slope of LPQ is (f (w)−f (x0))/(w−x0), and so lim Q→P ¡ slope of LPQ ¢ = lim w→x0 f (w) −f (x0) w −x0 = f ′(x0) = slope of TP which means that as Q approaches P the “limit” of the secant line LPQ has the same slope and goes through the same point P as the tangent line TP.
ElementaryCalculus_Page_68_Chunk3603
Tangent Lines • Section 3.1 59 • Smooth curves have tangent lines, nonsmooth curves do not. For example, think of the absolute value function f (x) = |x|. Its graph has a sharp edge at the point (0,0), making it nonsmooth there, as shown in Figure 3.1.6(a) below. There is no real way to define a tangent line at (0,0), because as mentioned in Section 1.2, the derivative of f (x) does not exist at x = 0. The same holds true for curves with cusps, as in Figure 3.1.6(b). x y 0 y = |x| (a) f (x) = |x| y = f (x) (b) Curve with a cusp Figure 3.1.6 Nonsmooth curves: no tangent line at the nonsmooth points Many lines go through the point of nonsmoothness, some of which are indicated by the dashed lines in the above figures, but none of them can be the tangent line. Sharp edges and cusps have to be “smoothed out” to have a tangent line. As a point moves along a smooth curve, the corresponding tangent lines to the curve make varying angles with the positive x-axis—the angle is thus a function of x. Let φ = φ(x) be the smallest angle that the tangent line L to a curve y = f (x) makes with the positive x-axis, so that −90◦< φ(x) < 90◦for all x (see Figure 3.1.7). x x1 x2 x3 y y = f (x) L φ(x2) = 0◦ L φ(x3) L φ(x1) Figure 3.1.7 The angle φ(x) between the tangent line and positive x-axis run rise L φ(x) As Figure 3.1.7 shows, −90◦< φ(x) < 0◦when the tangent line L has negative slope, 0◦< φ(x) < 90◦when L has positive slope, and φ(x) = 0◦ when L is horizontal (i.e. has zero slope). The slope of a line is usually defined as the rise divided by the run in a right triangle, as shown in the figure on the right. The figure shows as well that by definition of the tangent of an angle, tan φ(x) also equals the rise (opposite) over run (adjacent). Thus, since the slope of L is f ′(x), this means that tan φ(x) = f ′(x). In other words:
ElementaryCalculus_Page_69_Chunk3604
60 Chapter 3 • Topics in Differential Calculus §3.1 The tangent line to a curve y = f (x) makes an angle φ(x) with the positive x-axis, given by φ(x) = tan−1 f ′(x) . (3.2) Example 3.4 y x y = e2x ¡ −1 2, 1 e ¢ L φ Find the angle φ that the tangent line to the curve y = e2x at x = −1 2 makes with the positive x-axis, such that −90◦< φ < 90◦. Solution: The angle is φ = φ(−1/2) = tan−1 f ‘(−1/2), where f (x) = e2x. Since f ′(x) = 2e2x, then φ = φ(−1/2) = tan−1 f ‘(−1/2) = tan−12e−1 = tan−1 0.7358 = 36.3◦. The figure on the right shows the tangent line L to the curve at x = −1 2 and the angle φ. y x P y = f (x) L N normal line a tangent line Figure 3.1.8 Normal line N You learned about perpendicular lines in elementary geome- try. Figure 3.1.8 shows the natural way to define how a line N can be perpendicular to a curve y = f (x) at a point P on the curve: the line is perpendicular to the tangent line of the curve at P. Call this line N the normal line to the curve at P. Since N and L are perpendicular, their slopes are neg- ative reciprocals of each other (provided neither slope is 0). The equation of the normal line follows easily: The equation of the normal line to a curve y = f (x) at a point P = (a, f (a)) is y −f (a) = − 1 f ′(a) ·(x −a) if f ′(a) ̸= 0. (3.3) If f ′(a) = 0, then the normal line is vertical and is given by x = a. Example 3.5 Find the normal line to the curve y = x2 at x = 1. (Note: This is the curve from Example 3.1.) Solution: The equation of the normal line is y −f (a) = − 1 f ′(a) ·(x−a) with a = 1, f (x) = x2, and f ′(x) = 2x. So f (a) = 1 and f ′(a) = 2. Hence, the equation of the normal line is y−1 = −1 2(x−1), or (in slope-intercept form) y = −1 2 x+ 3 2.
ElementaryCalculus_Page_70_Chunk3605
Tangent Lines • Section 3.1 61 Exercises A For Exercises 1-12, find the equation of the tangent line to the curve y = f (x) at x = a. 1. f (x) = x2 + 1; at x = 2 2. f (x) = x2 −1; at x = 2 3. f (x) = −x2 + 1; at x = 3 4. f (x) = 1; at x = −1 5. f (x) = 4x; at x = 1 6. f (x) = ex; at x = 0 7. f (x) = x2 −3x + 7; at x = 2 8. f (x) = x + 1 x −1; at x = 0 9. f (x) = (x3 + 2x −1)3; at x = −1 10. f (x) = tan x; at x = 0 11. f (x) = sin 2x; at x = 0 12. f (x) = p 1 −x2; at x = 1/ p 2 13. Find the equations of the tangent lines to the curve y = x3 −2x2 +4x +1 which are parallel to the line y = 3x−5. 14. Draw an example of a curve having a tangent line that intersects the curve at more than one point. For Exercises 15-17, find the angle φ that the tangent line to the curve y = f (x) at x = a makes with the positive x-axis, such that −90◦< φ < 90◦. 15. f (x) = x2; at x = 2 16. f (x) = cos 2x; at x = π/6 17. f (x) = x2 + 2x −3; at x = −1 18. Show that if φ(x) is the angle that the tangent line to a curve y = f (x) makes with the positive x-axis such that 0◦≤φ(x) < 180◦, then φ(x) =              cos−1 Ã 1 p 1 + (f ′(x))2 ! when f ′(x) ≥0 cos−1 Ã −1 p 1 + (f ′(x))2 ! when f ′(x) < 0. (Hint: Draw a right triangle.) For Exercises 19-21, find the angle φ that the tangent line to the curve y = f (x) at x = a makes with the positive x-axis, such that 0◦≤φ < 180◦. 19. f (x) = x2; at x = −1 20. f (x) = e−x; at x = 1 21. f (x) = ln2x; at x = 10 For Exercises 22-24, find the equation of the normal line to the curve y = f (x) at x = a. 22. f (x) = px; at x = 4 23. f (x) = x2 + 1; at x = 2 24. f (x) = x2 −7x + 4; at x = 3 25. Find the equations of the normal lines to the curve y = x3 −2x2 −11x+3 which have a slope of −1 4. B 26. Show that the area of the triangle formed by the x-axis, the y-axis, and the tangent line to the curve y = 1/x at any point P is constant (i.e. the area is the same for all P). 27. For a constant a > 0, let P be a point on the curve y = ax2, and let Q be the point where the tangent line to the curve at P intersects the y-axis. Show that the x-axis bisects the line segment PQ. 28. Let P be a point on the curve y = 1/x in the first quadrant, and let Q be the point where the tangent line to the curve at P intersects the x-axis. Show that the triangle ∆POQ is isosceles, where O is the origin.
ElementaryCalculus_Page_71_Chunk3606
62 Chapter 3 • Topics in Differential Calculus §3.2 3.2 Limits: Formal Definition So far only the intuitive notion of a limit has been used, namely: A real number L is the limit of f (x) as x approaches a if the values of f (x) can be made arbitrarily close to L by picking values of x sufficiently close to a. That notion can be put in terms of a formal definition as follows: Let L and a be real numbers. Then L is the limit of a function f (x) as x approaches a, written as lim x→a f (x) = L , if for any given number ǫ > 0, there exists a number δ > 0, such that | f (x)−L| < ǫ whenever 0 < |x−a| < δ . A visual way of thinking of this definition is shown in Figure 3.2.1 below: y x y = f (x) a−δ ( a a+δ ) L +ǫ L L −ǫ 0 < |x−a| < δ | f (x)−L| < ǫ Figure 3.2.1 lim x→a f (x) = L Figure 3.2.1 says that for any interval around L on the y-axis, you will be able to find at least one small interval around x = a (but excluding a) on the x-axis that the function y = f (x) maps completely inside that interval on the y-axis. Choosing smaller intervals around L on the y-axis could force you to find smaller intervals around a on the x-axis. In Figure 3.2.1, f (x) is made arbitrarily close to L (within any distance ǫ > 0) by picking x sufficiently close to a (within some distance δ > 0). Since 0 < |x−a| < δ means that x = a itself is excluded, the solid dot at (a,L) could even be a hollow dot. That is, f (a) does not have to equal L, or even be defined; f (x) just needs to approach L as x approaches a. Thus–perhaps counter-intuitively—the existence of the limit does not actually depend on what happens at x = a itself.
ElementaryCalculus_Page_72_Chunk3607
Limits: Formal Definition • Section 3.2 63 Example 3.6 Show that lim x→a x = a for any real number a. Solution: Though the limit is obvious, the following “epsilon-delta” proof shows how to use the formal definition. The idea is to let ǫ > 0 be given, then “work backward” from the inequality | f (x)−L| < ǫ to get an inequality of the form |x−a| < δ, where δ > 0 usually depends on ǫ. In this case the limit is L = a and the function is f (x) = x, so since | f (x)−a| < ǫ ⇔ |x−a| < ǫ , then choosing δ = ǫ means that 0 < |x−a| < δ ⇒ |x−a| < ǫ ⇒ | f (x)−a| < ǫ , which by definition means that lim x→a x = a. Calculating limits in this way might seem silly since—as in Example 3.6—it requires extra effort for a result that is obvious. The formal definition is used most often in proofs of general results and theorems. For example, the rules for limits—listed in Section 1.2—can be proved by using the formal definition. Example 3.7 Suppose that lim x→a f (x) and lim x→a g(x) both exist. Show that lim x→a (f (x)+ g(x)) = ³ lim x→a f (x) ´ + ³ lim x→a g(x) ´ Solution: Let lim x→a f (x) = L1 and lim x→a g(x) = L2. The goal is to show that lim x→a (f (x)+ g(x)) = L1 + L2. So let ǫ > 0. Then ǫ/2 > 0, and so by definition there exist numbers δ1 > 0 and δ2 > 0 such that 0 < |x−a| < δ1 ⇒ | f (x) −L1| < ǫ/2 , and 0 < |x−a| < δ2 ⇒ |g(x) −L2| < ǫ/2 . Now let δ = min(δ1,δ2). Then δ > 0 and 0 < |x−a| < δ ⇒ 0 < |x−a| < δ1 and 0 < |x−a| < δ2 ⇒ | f (x) −L1| < ǫ/2 and |g(x) −L2| < ǫ/2 Since |A +B| ≤|A|+|B| for all real numbers A and B, then | f (x) + g(x) −(L1 + L2)| = |(f (x) −L1) + (g(x) −L2)| ≤| f (x) −L1| + |g(x) −L2| and thus 0 < |x−a| < δ ⇒ | f (x) + g(x) −(L1 + L2)| < ǫ/2 + ǫ/2 = ǫ which by definition means that lim x→a (f (x)+ g(x)) = L1 + L2. ✓
ElementaryCalculus_Page_73_Chunk3608
64 Chapter 3 • Topics in Differential Calculus §3.2 The proofs of the other limit rules are similar.1 In general, using the formal definition will not be necessary for evaluating limits of specific functions—in many cases a simple analysis of the function is all that is needed, often from its graph. Example 3.8 x y 1 1 2 0 y = f (x) Figure 3.2.2 Evaluate lim x→1 f (x) for the following function: f (x) =      x if x > 1 2 if x = 1 1 if x < 1 Solution: From the graph of f (x) in Figure 3.2.2, it is clear that as x approaches 1 from the right (i.e. for x > 1) f (x) approaches 1 along the line y = x, whereas as x approaches 1 from the left (i.e. for x < 1) f (x) approaches 1 along the horizontal line y = 1. Thus, lim x→1 f (x) = 1 . Note that the limit did not depend on the value of f (x) at x = 1. As Example 3.8 shows, what matters for a limit is what happens to the value of f (x) as x gets near a, not at x = a itself. Figure 3.2.3(a) below shows how as x approaches a, f (x) approaches a number different from f (a). Figure 3.2.3(b) shows that x = a does not even need to be in the domain of f (x), i.e. f (a) does not have to be defined. So it will not always be the case that lim x→a f (x) = f (a). y x y = f (x) a L f (a) (a, f (a)) (a) lim x→a f (x) = L ̸= f (a) y x y = f (x) a L (b) lim x→a f (x) = L, f (x) not defined at x = a Figure 3.2.3 Excluding x = a from lim x→a f (x) In Example 3.8 the direction in which x approached the number 1 did not affect the limit. But what if f (x) had approached different values depending on how x approached 1? In that case the limit would not exist. The following definitions and notation for one-sided limits will make situations like that simpler to state. 1For example, see Section 2.2 in PROTTER, M.H. AND C.B. MORREY, A First Course in Real Analysis, New York: Springer-Verlag, 1977.
ElementaryCalculus_Page_74_Chunk3609
Limits: Formal Definition • Section 3.2 65 Call L the right limit of a function f (x) as x approaches a, written as lim x→a+ f (x) = L , if f (x) approaches L as x approaches a for values of x larger than a. Call L the left limit of a function f (x) as x approaches a, written as lim x→a−f (x) = L , if f (x) approaches L as x approaches a for values of x smaller than a. The following statement follows immediately from the above definitions: The limit of a function exists if and only if both its right limit and left limit exist and are equal: lim x→a f (x) = L ⇔ lim x→a−f (x) = L = lim x→a+ f (x) Example 3.9 x y 1 −1 1 2 0 y = f (x) Figure 3.2.4 Evaluate lim x→0−f (x), lim x→0+ f (x), and lim x→0 f (x) for the following function: f (x) = ( x2 if x < 0 2−x if x ≥0 Solution: From the graph of f (x) in Figure 3.2.4, it is clear that as x approaches 0 from the left (i.e. for x < 0) f (x) approaches 0 along the parabola y = x2, whereas as x approaches 0 from the right (i.e. for x > 0) f (x) approaches 2 along the line y = 2−x. Hence, lim x→0−f (x) = 0 and lim x→0+ f (x) = 2 . Thus, lim x→0 f (x) does not exist since the left and right limits do not agree at x = 0. Example 3.10 x y 0 1 −1 y = sin(1/x) Figure 3.2.5 Evaluate lim x→0+ sin µ1 x ¶ . Solution: For x > 0 the function f (x) = sin(1/x) is defined, and its graph is shown in Figure 3.2.5. As x approaches 0 from the right, sin(1/x) will be 1 for the numbers x = 2/π, 2/5π, 2/9π, 2/13π, ... (which approach 0), and sin(1/x) will be −1 for the numbers x = 2/3π, 2/7π, 2/11π, 2/15π, ... (which also approach 0). So as x approaches 0 from the right, sin(1/x) will oscillate between 1 and −1. Thus, lim x→0+ sin µ1 x ¶ does not exist .
ElementaryCalculus_Page_75_Chunk3610
66 Chapter 3 • Topics in Differential Calculus §3.2 So far only finite limits have been considered, that is, L = lim x→a f (x) where L is a real (i.e. finite) number. Define an infinite limit, with L = ∞or −∞, as follows: For a real number a, the limit of a function f (x) equals infinity as x approaches a, written as lim x→a f (x) = ∞, if f (x) grows without bound as x approaches a, i.e. f (x) can be made larger than any positive number by picking x sufficiently close to a: For any given number M > 0, there exists a number δ > 0, such that f (x) > M whenever 0 < |x−a| < δ . For a real number a, the limit of a function f (x) equals negative infinity as x approaches a, written as lim x→a f (x) = −∞, if f (x) grows negatively without bound as x approaches a, i.e. f (x) can be made smaller than any negative number by picking x sufficiently close to a: For any given number M < 0, there exists a number δ > 0, such that f (x) < M whenever 0 < |x−a| < δ . The above definitions can be modified accordingly for one-sided limits. If lim x→a f (x) = ∞or lim x→a f (x) = −∞, then the line x = a is a vertical asymptote of f (x), and f (x) approaches the line x = a asymptotically. The formal definitions are rarely needed. Example 3.11 x y 0 y = 1 x Figure 3.2.6 Evaluate lim x→0 1 x . Solution: For x ̸= 0 the function f (x) = 1 x is defined, and its graph is shown in Figure 3.2.6. As x approaches 0 from the right, 1/x approaches ∞, that is, lim x→0+ 1 x = ∞. As x approaches 0 from the left, 1/x approaches −∞, that is, lim x→0− 1 x = −∞. Since the right limit and the left limit are not equal, then lim x→0 1 x does not exist . Note that the y-axis (i.e. the line x = 0) is a vertical asymptote for f (x) = 1 x.
ElementaryCalculus_Page_76_Chunk3611
Limits: Formal Definition • Section 3.2 67 Example 3.12 x y 0 y = 1 x2 Figure 3.2.7 Evaluate lim x→0 1 x2 . Solution: For x ̸= 0 the function f (x) = 1 x2 is defined, and its graph is shown in Figure 3.2.7. As x approaches 0 from either the right or the left, 1/x2 approaches ∞, that is, lim x→0+ 1 x2 = ∞= lim x→0− 1 x2 . Since the right limit and the left limit both equal ∞, then lim x→0 1 x2 = ∞. Note that the y-axis (i.e. the line x = 0) is a vertical asymptote for f (x) = 1 x2 . In the limit lim x→a f (x) so far only real values of a have been considered. However, a could be either ∞or −∞: For a real number L, the limit of a function f (x) equals L as x approaches ∞, written as lim x→∞f (x) = L , if f (x) can be made arbitrarily close to L for x sufficiently large and positive: For any given number ǫ > 0, there exists a number N > 0, such that | f (x) −L| < ǫ whenever x > N . For a real number L, the limit of a function f (x) equals L as x approaches −∞, written as lim x→−∞f (x) = L , if f (x) can be made arbitrarily close to L for x sufficiently small and negative: For any given number ǫ > 0, there exists a number N < 0, such that | f (x) −L| < ǫ whenever x < N . The above definitions can be modified accordingly for L replaced by either ∞or −∞. One way to interpret the statement lim x→∞f (x) = L is: the long-term behavior of f (x) is to approach a steady-state at L. If lim x→∞f (x) = L or lim x→−∞f (x) = L, then the line y = L is a horizontal asymptote of f (x), and f (x) approaches the line y = L asymptotically. Again, for most limits of specific functions, only the intuitive notions are needed.
ElementaryCalculus_Page_77_Chunk3612
68 Chapter 3 • Topics in Differential Calculus §3.2 Example 3.13 From Figures 3.2.6 and 3.2.7, it is clear that lim x→∞ 1 x = 0 = lim x→−∞ 1 x and lim x→∞ 1 x2 = 0 = lim x→−∞ 1 x2 Note that the x-axis (i.e. the line y = 0) is a horizontal asymptote for f (x) = 1 x and f (x) = 1 x2 . Some limits are obvious, and you can use them to calculate other limits: lim x→∞xn = ( ∞ for any real n > 0 0 for any real n < 0 lim x→−∞xn = ( ∞ for n = 2,4,6,8,... −∞ for n = 1,3,5,7,... lim x→∞ex = ∞ lim x→−∞ex = 0 lim x→∞e−x = 0 lim x→−∞e−x = ∞ lim x→∞ln x = ∞ lim x→0+ ln x = −∞ A related notion is that of Big O notation (that is the capital letter O, not a zero): Say that f (x) = O(g(x)) as x →∞, spoken as “f is big O of g”, if there exist positive numbers M and x0 such that | f (x)| ≤M |g(x)| for all x ≥x0. For example, obviously 2x3 = O(x3), by picking M = 2, with x0 any positive number. In general, f (x) = O(g(x)) means that f exhibits the same long-term behavior as g, up to a constant multi- ple. You can think of g as the more basic “type” of function that describes f , as far as long-term behavior. Example 3.14 Show that 5x4 −2 = O(x4). Solution: First, recall from algebra that |a+ b| ≤|a|+|b| for all real numbers a and b. Thus, ¯¯5x4 −2 ¯¯ ≤ ¯¯5x4¯¯ + |−2| = 5 ¯¯x4¯¯ + 2 for all x. So since ¯¯x4¯¯ = x4 ≥1 for all x ≥1, then ¯¯5x4 −2 ¯¯ ≤5 ¯¯x4¯¯ + 2 ≤5 ¯¯x4¯¯ + 2 ¯¯x4¯¯ ⇒ ¯¯5x4 −2 ¯¯ ≤7 ¯¯x4¯¯ for all x ≥1, which shows that 5x4 −2 = O(x4), with M = 7 and x0 = 1.
ElementaryCalculus_Page_78_Chunk3613
Limits: Formal Definition • Section 3.2 69 Some limits need algebraic manipulation before they can be evaluated. Example 3.15 Evaluate lim x→∞ ³p x+1 −px ´ . Solution: Note that both p x+1 and px approach ∞as x goes to ∞, resulting in a limit of the form ∞−∞. This is an example of an indeterminate form, which can equal anything (as will be discussed shortly); it does not have to equal 0 (i.e. the ∞’s do not necessarily “cancel out”). The trick here is to use the conjugate of p x+1 −px, so that lim x→∞ ³p x+1 − p x ´ = lim x→∞ ³p x+1 − p x ´ · p x+1 + px p x+1 + px = lim x→∞ (x+1) −x p x+1 + px = lim x→∞ 1 p x+1 + px = 0 since the numerator is 1 and both terms in the sum in the denominator approach ∞(i.e. 1 ∞= 0). Some other indeterminate forms are ∞/∞, 0/0 and ∞·0. How would you handle such limits? One way is to use L’Hôpital’s Rule2; a simplified form is stated below: L’Hôpital’s Rule: If f and g are differentiable functions and lim x→a f (x) g(x) = ±∞ ±∞or 0 0 then lim x→a f (x) g(x) = lim x→a f ′(x) g′(x) . The number a can be real, ∞, or −∞. Example 3.16 Evaluate lim x→∞ 2x−1 ex . Solution: This limit is of the form ∞/∞: lim x→∞ 2x−1 ex →∞ ∞ = lim x→∞ 2 ex by L’Hôpital’s Rule = 0 since the numerator is 2 and ex →∞as x →∞. Note that one way of interpreting the limit being 0 is that ex grows much faster than 2x −1. In fact, using L’Hôpital’s Rule it can be shown that ex grows much faster than any polynomial, i.e. exponential growth outstrips polynomial growth. 2For a proof, see pp.89-91 in PROTTER, M.H. AND C.B. MORREY, A First Course in Real Analysis, New York: Springer-Verlag, 1977.
ElementaryCalculus_Page_79_Chunk3614
70 Chapter 3 • Topics in Differential Calculus §3.2 Example 3.17 Evaluate lim x→∞ x ln x . Solution: This limit is of the form ∞/∞: lim x→∞ x ln x →∞ ∞ = lim x→∞ 1 1 x by L’Hôpital’s Rule = lim x→∞x = ∞ Note that one way of interpreting the limit being ∞is that x grows much faster than ln x. In fact, using L’Hôpital’s Rule it can be shown that any polynomial grows much faster than ln x, i.e. polynomial growth outstrips logarithmic growth. Example 3.18 Evaluate lim x→∞xe−2x . Solution: This limit is of the form ∞·0, which can be converted to ∞/∞: lim x→∞xe−2x = lim x→∞ x e2x →∞ ∞ = lim x→∞ 1 2e2x by L’Hôpital’s Rule = 0 Note that the limit is another consequence of exponential growth outstripping polynomial growth. Example 3.19 Evaluate lim x→∞ 2x2 −7x −5 3x2 + 2x −1 . Solution: This limit is of the form ∞/∞: lim x→∞ 2x2 −7x −5 3x2 + 2x −1 →∞ ∞ = lim x→∞ 4x −7 6x + 2 by L’Hôpital’s Rule →∞ ∞ , so use L’Hôpital’s Rule again = 4 6 = 2 3 Note that the limit ended up being the ratio of the leading coefficients of the polynomials in the numer- ator and denominator of the original limit. Note also that the lower-order terms (degree less than 2) ended up not mattering. In general you can always discard the lower-order terms when taking the limit of a ratio of polynomials (i.e. a rational function).
ElementaryCalculus_Page_80_Chunk3615
Limits: Formal Definition • Section 3.2 71 Example 3.20 Evaluate lim x→0 1 −cos x x . Solution: This limit is of the form 0/0: lim x→0 1 −cos x x →0 0 = lim x→0 sin x 1 by L’Hôpital’s Rule = sin0 1 = 0 There is an intuitive justification for L’Hôpital’s Rule: since the limit limx→a f (x) g(x) uses a ratio to compare how f changes relative to g as x approaches a, then it is really the rates of change of f and g—namely f ′ and g′, respectively—that are being compared in that ratio, which is what L’Hôpital’s Rule says. The following result provides another way to calculate certain limits: Squeeze Theorem: Suppose that for some functions f , g and h there is a number x0 ≥0 such that g(x) ≤f (x) ≤h(x) for all x > x0 and that lim x→∞g(x) = lim x→∞h(x) = L. Then lim x→∞f (x) = L. Similarly, if g(x) ≤f (x) ≤h(x) for all x ̸= a in some interval I containing a, and if lim x→a g(x) = lim x→a h(x) = L, then lim x→a f (x) = L. Intuitively, the Squeeze Theorem says that if one function is “squeezed” between two func- tions approaching the same limit, then the function in the middle must also approach that limit. The theorem also applies to one-sided limits (x →a+ or x →a−). Example 3.21 Evaluate lim x→∞ sin x x . Solution: Since −1 ≤sin x ≤1 for all x, then dividing all parts of those inequalities by x > 0 yields −1 x ≤sin x x ≤1 x for all x > 0 ⇒ lim x→∞ sin x x = 0 by the Squeeze Theorem, since lim x→∞ −1 x = 0 = lim x→∞ 1 x.
ElementaryCalculus_Page_81_Chunk3616
72 Chapter 3 • Topics in Differential Calculus §3.2 Exercises A For Exercises 1-18 evaluate the given limit. 1. lim x→2 x2 +3x−10 x2 −x−2 2. lim x→∞ x2 +3x−10 2x2 −x−2 3. lim x→∞ x2 +3x−10 2x3 −x−2 4. lim x→∞ x3 +3x−10 2x2 −x−2 5. lim x→π/2 cos x x−π/2 6. lim x→∞ x2 ex 7. lim x→−∞x2ex 8. lim x→0+ ln x e1/x 9. lim x→0 tan x −x x −sin x 10. lim x→0 sin 3x sin 4x 11. lim x→∞ cos x x 12. lim x→0 x sin µ1 x ¶ 13. lim x→0 ln(1−x) −sin2 x 1 −cos2 x 14. lim x→1 µ 1 ln x − 1 x−1 ¶ 15. lim x→π/2 (sec x −tan x) 16. lim x→0+ e−1/x x 17. lim x→∞ ³p x2 +4 −x ´ 18. lim x→0 cot x csc x B 19. The famous “twin paradox,” a result of Einstein’s special theory of relativity, says that if one of a pair of twins leaves the earth in a rocket traveling at a high speed, then he will be younger than his twin upon returning to earth.3 This is due to the phenomenon of time dilation, which says that a clock moving with a speed v relative to a clock at rest in some inertial reference frame counts time slower relative to the clock at rest, by a factor of γ = 1 p 1−β2 , called the Lorentz factor, where β = v c is the fraction of the speed of light c at which the clock is moving (c ≈2.998 × 108 m/sec). Notice that 0 ≤β < 1 (why?). For example, a clock moving at half the speed of light, so that β = 0.5, would have γ = 1.1547, meaning that the clock runs about 15.47% slower than the clock on earth. (a) Evaluate lim β→1−γ . What is the physical interpretation of this limit? (b) Suppose an astronaut and his twin just turned 30 years old when the astronaut leaves earth on a high-speed journey through space. Upon returning to earth the astronaut is 35 and his twin is 70. At roughly what fraction of the speed of light must the astronaut have been traveling? 20. Show that lim x→∞ p(x) ex = 0 for all polynomials p(x) of degree n ≥1 with a positive leading coefficient. 21. Show that lim x→∞ p(x) ln x = ∞for all polynomials p(x) of degree n ≥1 with a positive leading coefficient. 22. Show that 5x3 +6x2 −4x+3 = O(x3). 23. Show that 2x2 +1 x+1 = O(x). (Hint: Consider x ≥1) 24. Call h(x) an infinitesimal function as x →a if lim x→a h(x) = 0. That is, an infinitesimal function approaches zero near some point. Prove the following result, where a and L are real numbers: lim x→a f (x) = L ⇔ f (x) = L + h(x) for all x, where h(x) is an infinitesimal function as x →a 3See p.154-159 in FRENCH, A.P., Special Relativity, Surrey, U.K.: Thomas Nelson & Sons Ltd., 1968.
ElementaryCalculus_Page_82_Chunk3617
Continuity • Section 3.3 73 3.3 Continuity Recall from the previous section that a limit limx→a f (x) can exist without being equal to f (a), or with f (a) not even being defined. Many functions encountered in applications, however, will meet those conditions, and they have a special name: A function f is continuous at x = a if lim x→a f (x) = f (a) . (3.4) A function is continuous on an interval I if it is continuous at every point in the interval. For a closed interval I = [a,b], a function f is continuous on I if it is continuous on the open interval (a,b) and if limx→a+ f (x) = f (a) (i.e. f is right continuous at x = a) and limx→b−f (x) = f (b) (i.e. f is left continuous at x = b). A function is discontinuous at a point if it is not continuous there. A continuous function is one that is continuous over its entire domain. Equation (3.4) in the above definition implies that f (a) is defined, i.e. x = a is in the domain of f . Figure 3.3.1 below shows some examples of continuity and discontinuity: y x x1 x2 x3 x4 y = f (x) Figure 3.3.1 Continuous at x1, discontinuous at x2, x3 and x4 In the above figure, f is not continuous at x = x2 because limx→x2 f (x) ̸= f (x2); f is not contin- uous at x = x3 because limx→x3 f (x) does not exist (the right and left limits do not agree—f is said to have a jump discontinuity at x = x3); and f is not continuous at x = x4 because f (x4) is not defined. However, f is continuous at x = x1. A function is continuous if its graph is one unbroken piece over its entire domain. Poly- nomials, rational functions, trigonometric functions, exponential functions, and logarithmic functions are all continuous on their domains. For example, tan x is continuous over its do- main, which is broken into disjoint intervals (−π/2,π/2), (π/2,3π/2), (3π/2,5π/2), and so forth; the graph is unbroken on each of those intervals. However, tan x is not continuous over all of R, since the function is not defined at all points in R. In the language of infinitesimals, a function f is continuous at x = a if f (a + dx)−f (a) is an infinitesimal for any infinitesimal dx. This definition is rarely used. Physical examples of continuous functions are position, speed, velocity, acceleration, temper- ature, and pressure. Some discontinuous functions do arise in applications.
ElementaryCalculus_Page_83_Chunk3618
74 Chapter 3 • Topics in Differential Calculus §3.3 Example 3.22 The floor function ⌊x⌋is defined as ⌊x⌋= the largest integer less than or equal to x . In other words, ⌊x⌋rounds a non-integer down to the previous integer, and integers stay the same. For example, ⌊0.1⌋= 0, ⌊0.9⌋= 0, ⌊0⌋= 0, and ⌊−1.3⌋= −2. The graph of ⌊x⌋is shown in Figure 3.3.2(a). x y −2 −1 2 3 0 1 −1 −2 1 2 y = ⌊x⌋ (a) Floor function ⌊x⌋ x y −3 −2 −1 2 0 1 −1 −2 1 2 y = ⌈x⌉ (b) Ceiling function ⌈x⌉ Figure 3.3.2 Floor and ceiling functions Similarly, the ceiling function ⌈x⌉is defined as ⌈x⌉= the smallest integer greater than or equal to x . In other words, ⌈x⌉rounds a non-integer up to the next integer, and integers stay the same. For example, ⌈0.1⌉= 1, ⌈0.9⌉= 1, ⌈1⌉= 1, and ⌈−1.3⌉= −1. The graph of ⌈x⌉is shown in Figure 3.3.2(b). Clearly both ⌊x⌋and ⌈x⌉have jump discontinuities at the integers, but both are continuous at all non-integer values of x. Both functions are also examples of step functions, due to the staircase appearance of their graphs. Step functions are useful in situations when you want to model a quantity that takes only a discrete set of values. For example, in a car with a 4-gear transmission, f (x) could be the gear the transmission has shifted to while the car travels at speed x. Up to a certain speed the car remains in first gear (f = 1) and then shifts to second gear (f = 2) after attaining that speed, then it remains in second gear until reaching another speed, upon which the car then shifts to third gear (f = 3), and so on. In general, discrete changes in state are often modeled with step functions. Example 3.23 For an extreme case of discontinuity, consider the function f (x) = ( 0 if x is rational 1 if x is irrational This function is discontinuous at every value of x in R, since within any positive distance δ of a real number x—no matter how small δ is—there will be an infinite number of both rational and irrational
ElementaryCalculus_Page_84_Chunk3619
Continuity • Section 3.3 75 numbers. This is a property of R. So the value of f will keep jumping between 0 and 1 no matter how close you get to x. In other words, for any number a in R, f (a) exists but it will never equal limx→a f (x) because that limit will not exist. By the various rules for limits, it is straightforward to show that sums, differences, con- stant multiples, products and quotients of continuous functions are continuous. Likewise a continuous function of a continuous function (i.e. a composition of continuous functions) is also continuous. In addition, a continuous function of a finite limit of a function can be passed inside the limit: If f is a continuous function and lim x→a g(x) exists and is finite, then: f ³ lim x→a g(x) ´ = lim x→a f (g(x)) (3.5) The same relation holds for one-sided limits. The above result is useful in evaluating the indeterminate forms 00, ∞0, and 1∞. The idea is to take the natural logarithm of the limit by passing the continuous function ln x inside the limit and evaluate the resulting limit. Example 3.24 Evaluate lim x→0+ xx . Solution: This limit is of the form 00, so let y = lim x→0+ xx and then take the natural logarithm of y: ln y = ln µ lim x→0+ xx ¶ = lim x→0+ ln xx (pass the natural logarithm function inside the limit) = lim x→0+ x ln x → 0·(−∞) = lim x→0+ ln x 1/x → −∞ ∞ = lim x→0+ 1/x −1/x2 by L’Hôpital’s Rule ln y = lim x→0+ (−x) = 0 Thus, lim x→0+ xx = y = e0 = 1.
ElementaryCalculus_Page_85_Chunk3620
76 Chapter 3 • Topics in Differential Calculus §3.3 There is an important relationship between differentiability and continuity: Every differentiable function is continuous. Proof: If a function f is differentiable at x = a then f ′(a) = lim x→a f (x)−f (a) x−a exists, so lim x→a (f (x)−f (a)) = lim x→a (f (x)−f (a))· x−a x−a = lim x→a f (x)−f (a) x−a · lim x→a (x−a) = f ′(a)·0 = 0 which means that lim x→a f (x) = f (a), i.e. f is continuous at x = a. ✓ x y 0 y = |x| Note that the converse is not true. For example, the absolute value function f (x) = |x| is continuous everywhere—its graph is unbroken, as shown in the picture on the right—but recall from Example 1.3 in Section 1.2 that it is not differentiable at x = 0. Continuous curves can have sharp edges and cusps, but differentiable curves cannot. Two other important theorems4 about continuous functions are: Extreme Value Theorem: If f is a continuous function on a closed interval [a,b] then f attains both a maximum value and a minimum value on that interval. Intermediate Value Theorem: If f is a continuous function on a closed interval [a,b] then f attains every value between f (a) and f (b). y x a b c d y = f (x) Figure 3.3.3 Extreme Value Theorem y x a b c d x0 k 1 2 y = f (x) Figure 3.3.4 Intermediate Value Theorem Figure 3.3.3 shows why a closed interval is required for the Extreme Value Theorem, as f attains neither a maximum nor minimum on the open interval (c,d). The Intermediate Value Theorem says that continuous functions cannot “skip over” intermediate values between two other function values. In Figure 3.3.4 the function f skips the value k between f (c) = 1 and f (d) = 2 because f is not continuous over all of [c,d]. On [a,b] the value k is attained by f at x = x0, i.e. f (x0) = k, since f is continuous on [a,b]. 4The full proofs require some advanced results. See pp.97-98 and p.558 in TAYLOR, A.E. AND W.R. MANN, Advanced Calculus, 2nd ed., New York: John Wiley & Sons, Inc., 1972.
ElementaryCalculus_Page_86_Chunk3621
Continuity • Section 3.3 77 Example 3.25 Show that there is a solution to the equation cos x = x. Solution: Let f (x) = cos x −x. Since f is continuous for all x, in particular it is continuous on [0,1]. So since f (0) = 1 > 0 and f (1) = −0.459698 < 0, then by the Intermediate Value Theorem there is a number c in the open interval (0,1) such that f (c) = 0, since 0 is between the values f (0) and f (1). Hence, cos c −c = 0, which means that cos c = c. That is, x = c is a solution of cos x = x. Note in the above example that the Intermediate Value Theorem does not tell you how to find the solution, just that the solution exists. To find the solution you can use the bisection method: divide the interval [0,1] in half and apply the Intermediate Value Theorem to each half-interval to determine which one contains the solution; repeat this procedure on that half- interval, resulting in a smaller interval containing the solution, then repeat the procedure over and over, until you eventually obtain an interval so small that the midpoint of that interval can be taken as the solution. Listing 3.1 below shows one way of implementing the bisection method for Example 3.25 to find the root of f (x) = cos x −x, using the Python programming language. Listing 3.1 Bisection method in Python 1 import math 2 3 def f(x): 4 return math.cos(x) - x 5 6 def bisect(a, b): 7 midpt = (a+b)/2.0 8 tol = 1e-15 9 if b - a > tol: 10 val = f(midpt) 11 if val*f(a) < 0: 12 bisect(a, midpt) 13 elif val*f(b) < 0: 14 bisect(midpt, b) 15 else: 16 print("Root = %.13f" % (midpt)) 17 else: 18 print("Root = %.13f" % (midpt)) 19 20 bisect(0, 1) Line 8 sets the tolerance to 10−15: the program terminates upon reaching an interval whose length is smaller than that. The output is shown below: Root = 0.7390851332152 This is the number obtained by taking the cosine of a number (in radians) repeatedly.
ElementaryCalculus_Page_87_Chunk3622
78 Chapter 3 • Topics in Differential Calculus §3.3 Exercises A For Exercises 1-18, indicate whether the given function f (x) is continuous or discontinuous at the given value x = a by comparing f (a) with limx→a f (x). 1. f (x) = |x|; at x = 0 2. f (x) = |x−1|; at x = 0 3. f (x) = ⌊x⌋; at x = 0 4. f (x) = ⌊x⌋; at x = 0.3 5. f (x) = ⌈x⌉; at x = 0 6. f (x) = ⌈x⌉; at x = 0.5 7. f (x) = x −⌊x⌋; at x = 0 8. f (x) = x −⌊x⌋; at x = 1.1 9. f (x) = x −|x|; at x = 0 10. f (x) = ( 0 if x ≤0, 1 if x > 0; at x = 0 11. f (x) = ( 0 if x ≤0, 1 if x > 0; at x = 1 12. f (x) = ( x2 if x ≤0, 1 if x > 0; at x = 0 13. f (x) = ( x+1 if x ≤0, 1 if x > 0; at x = 1 14. f (x) = ( sin(x2) if x ̸= 0, 0 if x = 0; at x = 0 15. f (x) = ( sin(1/x) if x ̸= 0, 0 if x = 0; at x = 0 16. f (x) = ( 0 if x is rational, 1 if x is irrational; at x = p 3 17. f (x) = ( 0 if x is rational, x if x is irrational; at x = 0 18. f (x) = ( 0 if x is rational, x if x is irrational; at x = 1 19. Evaluate lim x→0+ xx2 . 20. Evaluate lim x→∞x1/x . 21. Evaluate lim x→0 (1−x)1/x . 22. If f (x) = x2 + x−2 x−1 for x ̸= 1, how should f (1) be defined so that f (x) is continuous at x = 1 ? 23. If f (x) = 1/x for x ̸= 0, is there a way to define f (0) so that f (x) is continuous for all x ? B 24. Can a function that is not continuous over a closed interval attain a maximum value and a mini- mum value in that interval? If so, then give an example; if not then explain why. 25. Show that there is a number x such that x5 −x = 3. 26. Prove that f (x) = x8 +3x4 −1 has at least two distinct real roots. 27. Suppose that a function f is continuous on the interval [0,3], f has no roots in [0,3], and f (1) = 1. Prove that f (x) > 0 for all x in [0,3]. 28. Show that an object whose average speed is vavg over the time interval a ≤t ≤b will move with speed vavg at some time t in [a,b]. 29. Let f (x) = 1/(x −1). Then f (0) = −1 < 0 and f (2) = 1 > 0. Can you conclude by the Intermediate Value Theorem that f (x) must be 0 for some x in [0,2] ? Explain. 30. Show that if f ′ and f ′′ exist and are continuous at x then f ′′(x) = lim h→0 f (x) −2f (x−h) + f (x−2h) h2 . 31. Show that if f ′, f ′′ and f ′′′ exist and are continuous at x then f ′′′(x) = lim h→0 f (x) −3f (x−h) + 3f (x−2h) −f (x−3h) h3 .
ElementaryCalculus_Page_88_Chunk3623
Implicit Differentiation • Section 3.4 79 3.4 Implicit Differentiation A function y = f (x) is usually given by an explicit formula, such as y = x2. It is then straight- forward to find dy dx using the differentiation rules you have learned so far. But suppose instead that you were given merely an equation involving x and y, such as x3y2esin(xy) = x2 + xy + y3 . The set of points (x, y) satisfying this equation describes some sort of curve in the xy-plane, but it might not be possible to solve for y in terms of x—that is, there might not be an explicit formula for y as a function of the variable x. So in this case does the derivative dy dx even have any meaning, and if so then how would you find it? It turns out that dy dx does make sense in such a case, because an equation involving x and y such as the one above implicitly defines y in terms of x in the following sense: as x varies so does y. Hence it should be possible to find the rate of change of y with respect to the variable x (i.e. dy dx). To do so, take d dx of both sides of the equation, then assume that y really is a function of x so that you can use the Chain Rule to solve for dy dx. The example below illustrates this procedure, called implicit differentiation. Example 3.26 −4 −2 0 2 4 6 −10 −5 0 5 10 x y Find dy dx given the equation x3 +3x+2 = y2. Solution: The above equation implicitly defines an elliptic curve, and its graph is shown on the right. This curve is not a function y = f (x), since it violates the vertical line test, but y still varies with x. To find dy dx take d dx of both sides of the equation then solve for dy dx : d dx (x3 + 3x + 2) = d dx (y2) 3x2 + 3 = 2y· dy dx by the Chain Rule, so dy dx = 3x2 + 3 2y At first this might seem unsatisfying—or confusing—since dy dx is given in terms of both x and y. However, the derivative can still be evaluated at specific points (x, y) on the curve, i.e. any (x, y) satis- fying the original equation. For example, it is easy to check that (x, y) = (1, p 6) satisfies the equation x3 +3x+2 = y2, so dy dx(1, p 6) = 3(1)2+3 2 p 6 = p 6 2 . Note that dy dx is not defined when y = 0. Notice that taking the square root of both sides of the original equation does not result in an explicit formula for y, since y = ± p x3 +3x+2 defines two functions, not just one. The beauty of implicit differen- tiation is that the derivative dy dx = 3x2+3 2y calculated above gives you a single expression for the derivative of both those functions.
ElementaryCalculus_Page_89_Chunk3624
80 Chapter 3 • Topics in Differential Calculus §3.4 An algebraic curve is defined as the set of all points (x, y) satisfying a polynomial equation in the variables x and y, such as x2 −3xy4 + 1 = x5 −y2. An elliptic curve is a special case of an algebraic curve, where the polynomial has the specific form x3 + ax + b = y2, such as the equation x3 +3x+2 = y2 from Example 3.26. Elliptic curves have certain properties that have found applications in cryptography.5 Example 3.27 −3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3 x y Find dy dx given the equation x+ y = x3 + y3. Solution: The above equation implicitly defines an algebraic curve and its graph is shown on the right. To find dy dx take d dx of both sides of the equation then solve for dy dx: d dx (x + y) = d dx (x3 + y3) 1 + dy dx = 3x2 + 3y2 · dy dx by the Chain Rule, so dy dx = 3x2 −1 1 −3y2 Notice that the curve consists of an oval shape (an ellipse, actually) with a line through it. In fact, that line is y = −x, as can be verified by replacing each instance of y in the equation x + y = x3 + y3 by −x (resulting in the equation 0 = 0). You might be wondering how dy dx is defined at the points where that line intersects the ellipse: is it the slope of the line y = −x (i.e. −1), or is it the slope of the tangent line to the ellipse at those points (which would not equal −1)? This is discussed in the exercises. The graph was created with the free open-source graphing program Gnuplot6 using the following Gnuplot commands (which give an idea of how to plot implicit functions in general): set size square set view 0,0 set isosamples 500,500 set contour base set cntrparam levels discrete 0 unset surface set grid unset key unset ztics set xlabel ’x’ set ylabel ’y’ f(x,y) = x + y - x**3 - y**3 splot [-3:3][-3:3] f(x,y) lw 3 5For example, see Section 12.2 in BUCHMANN, J.A., Introduction to Cryptography, New York: Springer-Verlag, 2001. 6See the documentation at http://www.gnuplot.info/documentation.html
ElementaryCalculus_Page_90_Chunk3625
Implicit Differentiation • Section 3.4 81 Example 3.28 x y 0 1 x2 + y2 = 1 (4/5,3/5) Find the tangent line to the curve x2 + y2 = 1 at the point (4/5,3/5). Solution: This curve is the unit circle, shown in the picture on the right. First use implicit differentiation to find dy dx : d dx (x2 + y2) = d dx (1) ⇒ 2x + 2y· dy dx = 0 by the Chain Rule ⇒ dy dx = −x y The slope m of the tangent line to the curve at (4/5,3/5) is then m = dy dx (4/5,3/5) = −4/5 3/5 = −4/3. Thus, the equation of the tangent line is y−3 5 = −4 3 ¡ x−4 5 ¢ . Exercises A For Exercises 1-9, use implicit differentiation to find dy dx . 1. x3y −4xy2 = y + x2 2. xy = (x+ y)3 3. (x+ y)3 = (x−y+1)2 4. x2/3 + y2/3 = a2/3 5. (x2 −y2)2 = 2x2 + y2 6. x+ y x−y = x2 + y2 7. cos(xy) = sin(x2y2) 8. x3 −x = y2 9. x3y2esin(xy) = x2 + xy + y3 10. In Example 3.28 is it possible to solve the equation x2+y2 = 1 explicitly for y in terms of x? Explain. 11. In Example 3.28 what happens to the tangent line at the point (1,0)? Why does this make sense geometrically? 12. Find the equation of the tangent line to the curve x3 +3x2y+ y3 = 8 at the point (2,0). B 13. Find d2 y dx2 for the curve x2 + y2 = 1. You may use the results from Example 3.28. 14. Show that at every point (x0, y0) on the curve y2 = 4ax, the equation of the tangent line to the curve is yy0 = 2a(x+ x0). 15. Show that at every point (x0, y0) on the ellipse x2 a2 + y2 b2 = 1, the equation of the tangent line to the ellipse is xx0 a2 + yy0 b2 = 1. 16. Show that at every point (x0, y0) on the hyperbola x2 a2 −y2 b2 = 1, the equation of the tangent line to the hyperbola is xx0 a2 −yy0 b2 = 1. 17. Show that dy dx is not defined at the points of intersection of the line and ellipse described by the curve x+ y = x3 + y3 from Example 3.27. (Hint: Factor the equation x+ y = x3 + y3.) 18. Show that the points P = (2,4) and Q = (−31/64,−337/512) are on the elliptic curve x3 +3x +2 = y2 from Example 3.26, and that the tangent line to the curve at P also goes through Q.
ElementaryCalculus_Page_91_Chunk3626
82 Chapter 3 • Topics in Differential Calculus §3.5 3.5 Related Rates If several quantities are related by an equation, then differentiating both sides of that equation with respect to a variable (usually t, representing time) produces a relation between the rates of change of those quantities. The known rates of change are then used in that relation to determine an unknown related rate. Example 3.29 100 300 10 h Suppose that water is being pumped into a rectangular pool at a rate of 60,000 cubic feet per minute. If the pool is 300 ft long, 100 ft wide, and 10 ft deep, how fast is the height of the water inside the pool changing? Solution: Let V be the volume of the water in the pool. Since the volume of a rectangular solid is the product of the length, width, and height of the solid, then V = (300)(100)h = 30000h ft3 where h is the height of the water, as in the picture on the right. Both V and h are functions of time t (measured in minutes), and dV dt = 60000 ft3/min was given. The goal is to find dh dt . Since dV dt = d dt (30000h) = 30000 dh dt then dh dt = 1 30000 dV dt = 1 30000 ·60000 = 2 ft/min. Example 3.30 100 ✸ x θ θ Suppose that the angle of inclination from the top of a 100 ft pole to the sun is decreasing at a rate of 0.05 radians per minute. How fast is the length of the pole’s shadow on the ground increasing when the angle of inclination is π/6 radians? You may assume that the pole is perpendicular to the ground. Solution: Let θ be the angle of inclination and let x be the length of the shadow, as in the picture on the right. Both θ and x are functions of time t (measured in minutes), and dθ dt = −0.05 rad/min was given (the derivative is negative since θ is decreasing). The goal is to find dx dt when θ = π/6, denoted by dx dt ¯¯¯¯ θ=π/6 (the vertical bar means “evaluated at” the value of the subscript to the right of the bar). Since x = 100 cot θ ⇒ dx dt = −100 csc2 θ · dθ dt = −100 csc2 θ ·(−0.05) = 5 csc2 θ then dx dt ¯¯¯¯ θ=π/6 = 5 csc2(π/6) = 5 (2)2 = 20 ft/min.
ElementaryCalculus_Page_92_Chunk3627
Related Rates • Section 3.5 83 Example 3.31 The radius of a right circular cylinder is decreasing at the rate of 3 cm/min, while the height is increas- ing at the rate of 2 cm/min. Find the rate of change of the volume of the cylinder when the radius is 8 cm and the height is 6 cm. Solution: Let r, h, and V be the radius, height, and volume, respectively, of the cylinder. Then V = πr2 h. Since dr dt = −3 cm/min and dh dt = 2 cm/min, then by the Product Rule: dV dt = d dt (πr2 h) = µ 2πr · dr dt ¶ h + πr2 · dh dt ⇒ dV dt ¯¯¯¯r = 8 h = 6 = 2π(8)(−3)(6) + π(82)(2) = −160π cm3 min Exercises A 1. A stone is dropped into still water. If the radius of the circular outer ripple increases at the rate of 4 ft/s, how fast is the area of the circle of disturbed water increasing when the radius is 10 ft? 2. The radius of a sphere decreases at a rate of 3 mm/hr. Determine how fast the volume and surface area of the sphere are changing when the radius is 5 mm. 3. A kite 80 ft above level ground moves horizontally at a rate of 4 ft/s away from the person flying it. How fast is the string being released at the instant when 100 ft of string have been released? 4. A 10-ft ladder is leaning against a wall on level ground. If the bottom of the ladder is dragged away from the wall at the rate of 5 ft/s, how fast will the top of the ladder descend at the instant when it is 8 ft from the ground? 5. A person 6 ft tall is walking at a rate of 6 ft/s away from a light which is 15 ft above the ground. At what rate is the end of the person’s shadow moving along the ground away from the light? 6. An object moves along the curve y = x3 in the xy-plane. At what points on the curve are the x and y coordinates of the object changing at the same rate? 7. The radius of a right circular cone is decreasing at the rate of 4 cm/min, while the height is increasing at the rate of 3 cm/min. Find the rate of change of the volume of the cone when the radius is 6 cm and the height is 7 cm. 8. Two boats leave the same dock at the same time, one goes north at 25 mph and the other goes east at 30 mph. How fast is the distance between the boats changing when they are 100 miles apart? 9. Repeat Exercise 8 with the angle between the boats being 110◦. B 10. An angle θ changes with time. For what values of θ do sin θ and tan θ change at the same rate? 11. Repeat Example 3.30 but with the ground making a 100◦angle with the pole to the left of the pole. C 12. An upright cylindrical tank full of water is tipped over at a constant angular speed. Assume that the height of the tank is at least twice its radius. Show that at the instant the tank has been tipped 45◦, water is leaving the tank twice as fast as it did at the instant the tank was first tipped. (Hint: Think of how the water looks inside the tank as it is being tipped.)
ElementaryCalculus_Page_93_Chunk3628
84 Chapter 3 • Topics in Differential Calculus §3.6 3.6 Differentials An ideal gas satisfies the equation PV = RT, where R is a constant and P, V, and T are the pressure, volume per mole, and temperature, respectively, of the gas. It will be proved that dP P + dV V = dT T . (3.6) Recall that dP, dV, and dT represent infinitesimal changes in the quantities P, V, and T, respectively. Notice that none of the quotients in Equation (3.6) have an infinitesimal in the denominator. For example, dP is divided not by dx or dt, as it would be in a derivative such as dP dx or dP dt . Instead it is divided by P, which is not an infinitesimal. So Equation (3.6) is an equation that relates infinitesimals themselves, i.e. infinitesimal changes, not infinitesimal rates of change. This is, in fact, how many physical laws are stated, for reasons that will be discussed shortly. Though infinitesimals have been used throughout this text, many calculus textbooks7 do not even mention them, instead preferring to call them differentials.8 For compatibility, the definition is given here: For a differentiable function f (x), the differential of f (x) is df = f ′(x) dx (3.7) where dx is an infinitesimal change in x. Note that this is identical to Equation (1.9) in Section 1.3. Example 3.32 Find the differential df of f (x) = x3. Solution: By definition, df = f ′(x) dx = 3x2 dx Equivalently, this can be written as d(x3) = 3x2 dx , which is often the way it would appear in textbooks in the sciences. All the rules for derivatives (e.g. sum rule, product rule) apply to differentials, and can be proved simply by multiplying the corresponding derivative rule by dx on both sides of the equation: 7More accurately, many current calculus textbooks never mention them. Calculus texts up through the 1930s or so not only mentioned infinitesimals but used them extensively, even to the point of the texts themselves having titles such as Introduction to Infinitesimal Calculus. 8Though often in an unclear and sometimes confusing and misleading manner, as will be seen later in this section.
ElementaryCalculus_Page_94_Chunk3629
Differentials • Section 3.6 85 Let f and g be differentiable functions, and let c be a constant. Then: (a) d(c) = 0 (b) d(cf ) = c df (Constant Multiple Rule) (c) d(f + g) = df + dg (Sum Rule) (d) d(f −g) = df −dg (Difference Rule) (e) d(f g) = f dg + g df (Product Rule) (f) d µ f g ¶ = g df −f dg g2 (Quotient Rule) (g) d(f n) = nf n−1 df (Power Rule) (h) d(f (g)) = df dg dg (Chain Rule) For example, to prove (e), multiply both sides of the usual Product Rule by dx so that d(f g) dx = f dg dx + g df dx ⇒ d(f g) = ✚✚ dx µ f dg ✚✚ dx + g df ✚✚ dx ¶ ⇒ d(f g) = f dg + g df ✓ since the dx terms all cancel. The proofs of the other rules are similar. The differential version of the ideal gas law in Equation (3.6) dP P + dV V = dT T can now be proved by taking the differential of both sides of the equation PV = RT: d(PV) = d(RT) = R · dT by the Constant Multiple Rule V dP + P dV = PV T dT by the Product Rule and since R = PV T V dP PV + P dV PV = dT T after dividing both sides by PV dP P + dV V = dT T ✓ Notice that dP P , dV V and dT T represent the relative infinitesimal changes in P, V, and T, respec- tively. The differential formulation is useful for finding one relative infinitesimal change when the other two are known.
ElementaryCalculus_Page_95_Chunk3630
86 Chapter 3 • Topics in Differential Calculus §3.6 Example 3.33 Suppose that M is the total mass of a rocket and its unburnt fuel at any time t (so M is a function of t). Over an infinitesimal time dt a mass dm of fuel is burnt and the gas byproducts are expelled out the rear of the rocket at a velocity vE relative to the rocket. Using the law of conservation of momentum over the interval dt, show that vE dm = M dv where m and v are the mass of burnt fuel and the velocity of the rocket, respectively, at the beginning of the time dt. Solution: Momentum is defined as mass times velocity. The momentum of the rocket at the beginning of the time dt is thus Mv. At the end of the time dt, the momentum of the rocket consists of two parts, namely the momentum of the rocket and its remaining unburnt fuel, which is ((mass before dt) −(increase in burnt fuel)) × ((velocity before dt) + (increase in velocity)) (3.8) (M −dm)(v+ dv) (3.9) and the momentum of the fuel that was burnt and expelled out the rear, which is (v−vE)dm . So by conservation of momentum, Mv = (M −dm)(v+ dv) + (v−vE)dm Mv = Mv −vdm + M dv −(dm)(dv) + vdm −vE dm, so vE dm = M dv −(dm)(dv) = M dv since (dm)(dv) = (m′(t)dt)(v′(t)dt) = m′(t)v′(t)(dt)2 = m′(t)v′(t)·0 = 0. Dividing both sides of vE dm = M dv by dt yields the equation M ˙v = ˙mvE using the dot notation—mentioned in Section 1.3—for the derivative with respect to the time variable t, which is still popular with physicists. Since ˙v is just acceleration a, this formulation is the classic equation for the acceleration of a rocket.9 Letting f be the natural logarithm function and letting g = u in the differential version of the Chain Rule yields the following useful result: d(ln u) = du u This is often used in a differential version of the technique of logarithmic differentiation dis- cussed in Section 2.3. 9For other formulations see Chapter 1 in ROSSER, J.B., R.R. NEWTON AND G.L. GROSS, Mathematical Theory of Rocket Flight, New York: McGraw-Hill Book Company, Inc., 1947.
ElementaryCalculus_Page_96_Chunk3631
Differentials • Section 3.6 87 Example 3.34 Prove the relation dP P + dV V = dT T using logarithmic differentiation. Solution: Take the natural logarithm and then the differential of both sides of the equation PV = RT: ln(PV) = ln(RT) ⇒ ln P + ln V = ln R + ln T ⇒ d(ln P + ln V) = d(ln R + ln T) ⇒ dP P + dV V = 0 + dT T = dT T (since ln R is a constant) Example 3.35 The derivative of the area πr2 of a circle of radius r, as a function of r, equals its circumference 2πr. Use the notion of a differential as an infinitesimal change to explain why this makes sense geometrically. Solution: Let A = πr2 be the area of a circle of varying radius r. Then A′(r) = 2πr, which is equivalent to saying dA = 2πr dr. To see why this makes sense geometrically, imagine increasing the radius by dr, as in the picture below on the left. This increases the area A of the circle to A + dA, with dA the infinitesimal area of the shaded ring in the picture. r dr slice and roll flat dA 2πr 2π(r + dr) dr area = dA π dr dr area = 0 Slice that ring along the dashed line then roll it flat, yielding a trapezoid with height dr, top length 2πr (from the circumference of the inner circle of the ring), and bottom length 2π(r + dr) (from the circumference of the outer circle of the ring), as shown in the picture above on the right. The triangular edges of the trapezoid contribute nothing to the area of the trapezoid, since (by the Microstraightness Property) the hypotenuse of each is indeed a straight line, so each is a right triangle with height dr and (by symmetry) base πdr, thus having area 1 2π(dr)2 = 0. Hence the entire area dA of the trapezoid comes from the rectangular portion of height dr and base 2πr, which means dA = 2πr dr, as expected. The above example answers the question of whether it is a happy coincidence that the deriva- tive of a circle’s area turns out to be the circle’s circumference—no, it is not! Some other such cases (e.g. the derivative of a sphere’s volume is its surface area) are left to the exercises. Note that a similar “coincidence” does not occur for a square: if x is the length of each side then the area is x2, but the derivative of x2 is 2x, which is not the perimeter of the square (i.e. 4x). Why does this not follow the same pattern as the circle? Think about a key difference in the shape of a square in comparison to a circle, keeping differentiability in mind.
ElementaryCalculus_Page_97_Chunk3632
88 Chapter 3 • Topics in Differential Calculus §3.6 There are many benefits to using differentials—i.e. infinitesimals—in calculus.10 For exam- ple, recall Example 3.31 in Section 3.5 on related rates, where the volume V of a right circular cylinder with radius r and height h changes with time t as dV dt = µ 2πr · dr dt ¶ h + πr2 · dh dt . The above equation forces you to consider only the derivative with respect to the time variable t. What if you wanted to see the rates of change with respect to another variable, such as r, h, or some other quantity? In that case using the differential version of the above equation, namely dV = 2πrh dr + πr2 dh provides more flexibility—you are free to divide both sides by any differential, not just by dt. Many related rates problems would likely benefit from this approach. Present-day calculus textbooks confuse the notion of a differential (infinitesimal) dx with the idea of a small but real value ∆x. The two are not the same. An infinitesimal is not a real number and cannot be assigned a real value, no matter how small; ∆x can be assigned real values. Using dx and ∆x interchangeably is a source of much confusion for students (likewise for dy and ∆y). This confusion rears its head in exercises involving the linear approximation of a curve by its tangent line near a point x0, namely f (x) ≈f (x0) + f ′(x0)(x −x0) when x −x0 is “small” (e.g. p 63 ≈7.9375, by using f (x) = px, x = 63, x0 = 64, and x −xo = ∆x = −1). Such exercises have nothing to do with differentials, not to mention having dubious value nowadays. They are remnants of a bygone era, before the advent of modern computing obviated the need for such (generally) poor approximations. Exercises A 1. Find the differential df of f (x) = x2 −2x+5. 2. Find the differential df of f (x) = sin2(x2). 3. Show that d ¡ tan−1(y/x) ¢ = xdy −ydx x2 + y2 4. Given y2 −xy+2x2 = 3, find dy. 5. The elasticity of a function y = f (x) is E(y) = x y · dy dx . Show that E(y) = d(ln y) d(ln x) . 6. Prove the differential version of the Quotient Rule: d µ f g ¶ = gdf −f dg g2 10For an excellent overview on this subject, see DRAY, T. AND C.A. MANOGUE, Putting Differentials Back into Calculus, College Math. J. 41 (2010), 90-100. Some of the material in this section is indebted to that paper, which is available at http://www.math.oregonstate.edu/bridge/papers/differentials.pdf
ElementaryCalculus_Page_98_Chunk3633
Differentials • Section 3.6 89 7. Let y = cun, where c and n are constants. Show that dy y = n du u . 8. Obviously the derivative of the constant π2 is not 2π. But is d(π2) = 2πd(π) true? Explain. B 9. The continuity relation for an ideal gas is PM p T = constant where P and T are the pressure and temperature, respectively, of the gas, and M is the Mach number. Show that dP P + dM M = dT 2T . 10. For an ideal gas, satisfying the equation PV = RT as before, the Gibbs energy G is defined as G = H −TS, where H and S are the enthalpy and entropy, respectively, of the gas. (a) Show that d µ G RT ¶ = 1 RT dG − G RT2 dT . (b) One of the fundamental property relations for an ideal gas (which you do not need to prove) is dG = V dP −S dT . Use this and part (a) to show that d µ G RT ¶ = V RT dP − H RT2 dT . 11. The derivative of the volume πr2h of a right circular cylinder of radius r and height h, as a function of r, equals its lateral surface area 2πrh. Use the notion of a differential as an infinitesimal change to explain why this makes sense geometrically. 12. The derivative of the volume 4π 3 r3 of a sphere of radius r, as a function of r, equals its surface area 4πr2. Use the notion of a differential as an infinitesimal change to explain why this makes sense geometrically. 13. In quantum calculus the q-differential of a function f (x) is dq f (x) = f (qx) −f (x) , and the q-derivative of f (x) is Dq f (x) = dq f (x) dqx = f (qx) −f (x) qx −x = f (qx) −f (x) (q−1)x . (a) Show that for all positive integers n, Dq ¡ xn¢ = [n]xn−1 , where [n] = 1+ q+ q2 +···+ qn−1. (b) Use part (a) to show that for all positive integers n, lim q→1 Dq ¡ xn¢ = d dx ¡ xn¢ .
ElementaryCalculus_Page_99_Chunk3634
CHAPTER 4 Applications of Derivatives 4.1 Optimization Many physical problems involve optimization: finding either a maximum or minimum value of some quantity. Optimization problems often have a constraint involving two variables which allows you to rewrite the objective function—the function to optimize—as a function of a single variable: use the constraint to solve for one variable in terms of another, then substitute that expression into the objective function. First, the intuitive notions of maximum and minimum need clarifying. A function f has a global maximum at x = c if f (c) ≥f (x) for all x in the domain of f . Similarly, f has a global minimum at x = c if f (c) ≤f (x) for all x in the domain of f . Say that f has a local maximum at x = c if f (c) ≥f (x) for all x “near” c, i.e. for all x such that |x−c| < δ for some number δ > 0. Likewise, f has a local minimum at x = c if f (c) ≤f (x) for all x such that |x−c| < δ for some number δ > 0. In other words, a global maximum is the largest value everywhere (“globally”), whereas a local maximum is only the largest value “locally.” Likewise for a global vs local minimum. The picture below illustrates the differences. y x a c1 c2 b y = f (x) In the picture, on the interval [a,b] the function f has a global minimum at x = a, a global maximum at x = c1, a local minimum at x = c2, and a local maximum at x = b. 90
ElementaryCalculus_Page_100_Chunk3635
Optimization • Section 4.1 91 Every global maximum [minimum] is a local maximum [minimum], but not vice versa. In physical applications global maxima or minima1 are the primary interest. The Extreme Value Theorem in Section 3.3 guarantees the existence of at least one global maximum and at least one global minimum for continuous functions defined on closed intervals (i.e. intervals of the form [a,b]). All the functions under consideration here will be differentiable, and hence contin- uous. So the only issues will be how to find the global maxima or minima, and how to handle intervals that are not closed. Consider again the picture from the previous page, this time looking at how the derivative f ′ changes over [a,b]. Intuitively it is obvious that near an internal maximum (i.e. in the open interval (a,b)) such as at x = c1, the function should increase before that point and then decrease after that point. That means that f ′(x) > 0 before x = c1 and f ′(x) < 0 after the “turning point” x = c1, as shown below. y x a c1 c2 b f ′ = 0 f ′ = 0 y = f (x) f ′ > 0 f ′ < 0 f ′ > 0 Assuming that f ′ is continuous (which will be the case for all the functions in this section), then this means that f ′ = 0 at x = c1, that is, f ′(c1) = 0. Similarly, near the internal minimum at x = c2, f ′(x) < 0 before x = c2 and f ′(x) > 0 after x = c2, so that f ′(c2) = 0. Points at which the derivative is zero are called critical points (or stationary points) of the function. So x = c1 and x = c2 are critical points of f . Note in the picture that f ′ goes from positive to zero to negative around x = c1, so that f ′ is decreasing around x = c1, i.e. f ′′ = (f ′)′ < 0. Similarly, f ′ is increasing around x = c2, i.e. f ′′ > 0. This leads to the following test for local maxima and minima:2 Second Derivative Test: Let x = c be a critical point of f (i.e f ′(c) = 0). Then: (a) If f ′′(c) > 0 then f has a local minimum at x = c. (b) If f ′′(c) < 0 then f has a local maximum at x = c. (c) If f ′′(c) = 0 then the test fails. To see why the test fails when f ′′(c) = 0, consider f (x) = x3: f ′(0) = 0 and f ′′(0) = 0, yet x = 0 is neither a local minimum nor maximum in any open interval containing x = 0. Section 4.2 will present an alternative for when the Second Derivative Test fails. 1The words “maxima” and “minima” are the traditional plural forms of maximum and minimum, respectively. 2A formal proof requires the Mean Value Theorem, which will be presented in Section 4.4.
ElementaryCalculus_Page_101_Chunk3636
92 Chapter 4 • Applications of Derivatives §4.1 There is a simple visual mnemonic device for remembering the Second Derivative Test, due to a generic minimum or maximum resembling a smile or frown, respectively: + + f ′′ > 0 local min. − − f ′′ < 0 local max. o o f ′′ = 0 test fails The “eyes” in the faces represent the sign of f ′′ at a critical point, while the “mouths” indicate the nature of that point (when f ′′ = 0 nothing is known). The procedure for finding a global maximum or minimum can now be stated: How to find a global maximum or minimum Suppose that f is defined on an interval I. There are two cases: 1. The interval I is closed: The global maximum of f will occur either at an interior local maximum or at one of the endpoints of I whichever of these points provides the largest value of f will be where the global maximum occurs. Similarly, the global minimum of f will occur either at an interior local minimum or at one of the endpoints of I; whichever of these points provides the smallest value of f will be where the global minimum occurs. 2. The interval I is not closed and has only one critical point: If the only critical point is a local maximum then it is a global maximum. If the only critical point is a local minimum then it is a global minimum. In each case of the above procedure try to use the Second Derivative Test to verify that a critical point is a local minimum or maximum, unless it is obvious from the nature of the problem that there can be only a minimum or only a maximum. Example 4.1 x y x y Figure 4.1.1 Show that the rectangle with the largest area for a fixed perimeter is a square. Solution: Let L be the perimeter of a rectangle with sides x and y. The idea is that L is a fixed constant, but x and y can vary. Figure 4.1.1 shows that there are many possible shapes for the rectangle, but in all cases L = 2x +2y. Let A be the area of such a rectangle. Then A = xy, which is a function of two variables. But L = 2x + 2y ⇒ y = L 2 −x ,
ElementaryCalculus_Page_102_Chunk3637
Optimization • Section 4.1 93 and hence A = x µ L 2 −x ¶ = Lx 2 −x2 is now a function of x alone, on the open interval (0,L/2) (since the length x is positive). Now find the critical points of A: A′(x) = 0 ⇒ L 2 −2x = 0 ⇒ x = L 4 is the only critical point This problem is thus the case of a function defined on an open interval having only one critical point. Use the Second Derivative Test to verify that the sole critical point x = L/4 is a local maximum for A: A′′(x) = −2 ⇒ A′′(L/4) = −2 < 0 ⇒ A has a local maximum at x = L/4 Thus, A has a global maximum at x = L/4. Also, y = L/2−x = L/2−L/4 = L/4, which means that x = y, i.e. the rectangle is a square. Note: The constraint in this example was L = 2x+2y and the objective function was A = xy. Example 4.2 h r Figure 4.1.2 Suppose a right circular cylindrical can with top and bottom lids will be assembled to have a fixed volume. Find the radius and height of the can that minimizes the total surface area of the can. Solution: Let V be the fixed volume of the can with radius r and height h, as in Figure 4.1.2. The volume V is a constant, with V = πr2h. Let S be the total surface area of the can, including the lids. Then S = 2πr2 + 2πrh where the first term in the sum on the right side of the equation is the combined area of the two circular lids and the second term is the lateral surface area of the can. So S is a function of r and h, but h can be eliminated since V = πr2h ⇒ h = V πr2 and so S = 2πr2 + 2πr · V πr2 = 2πr2 + 2V r making S a function of r alone. Now find the critical points of S (i.e. solve S′(r) = 0): S′(r) = 0 ⇒ 4πr −2V r2 = 0 ⇒ r3 = V 2π ⇒ r = 3 s V 2π is the only critical point
ElementaryCalculus_Page_103_Chunk3638
94 Chapter 4 • Applications of Derivatives §4.1 Since both r and h are lengths and have to be positive, then 0 < r < ∞. So this is another case of a function defined on an open interval having only one critical point. Use the Second Derivative Test to verify that this critical point r = 3q V 2π is a local minimum for S: S′′(r) = 4π + 4V r3 ⇒ S′′ Ã 3 s V 2π ! = 4π + 4V V 2π = 12π > 0 ⇒ S has a local minimum at r = 3 s V 2π Thus, S has a global minimum at r = 3q V 2π, and r · r2 = r3 = V 2π ⇒ 2r = V πr2 = h . Hence, r = 3q V 2π and h = 2 3q V 2π will minimize the total surface area, i.e. the height should equal the diameter. Note that this result can be applied to soda cans, where the volume is V = 12 fluid ounces ≈21.6 cubic inches: both a diameter and height of about 3.8 inches will minimize the amount (and hence the cost) of the aluminum used for the can. Yet soda cans are not that wide and short—they are usually thinner and taller. So why is a non-optimal size used in practice? Other factors—e.g. packing requirements, the need for small children to hold the can in one hand—might override the desire to minimize the cost of the aluminum. The lesson is that an optimal solution for one factor (material cost) might not always be truly optimal when all factors are considered; compromise is often necessary. Example 4.3 v0 L θ v0 v0 sin θ v0 cos θ θ Figure 4.1.3 Suppose that a projectile is launched from the ground with a fixed initial velocity v0 at an angle θ with the ground. What value of θ would maximize the horizontal distance traveled by the projectile, assuming the ground is flat and not sloped (i.e. horizontal)? Solution: Let x and y represent the horizontal position and vertical position, respectively, of the projectile at time t ≥0. From the trian- gle at the bottom of Figure 4.1.3, the horizontal and vertical com- ponents of the initial velocity are v0 cos θ and v0 sin θ, respectively. Since distance is the product of velocity and time, then the horizon- tal and vertical distances traveled by the projectile by time t due to the initial velocity are (v0 cos θ)t and (v0sin θ)t, respectively. Ignor- ing wind and air resistance, the only other force on the projectile will be the downward force g due to gravity, so that the equations of motion for the projectile are: x = (v0cos θ)t y = −1 2 gt2 + (v0sin θ)t The goal is to find θ that maximizes the length L shown in Figure 4.1.3. First write y as a function of x: x = (v0cos θ)t ⇒ t = x v0 cos θ ⇒ y = −1 2 g µ x v0 cos θ ¶2 + (v0 sin θ)· x v0cos θ ⇒ y = − gx2 2v2 0 cos2 θ + xtan θ
ElementaryCalculus_Page_104_Chunk3639
Optimization • Section 4.1 95 Then L is the value of x > 0 that makes y = 0: 0 = − gL2 2v2 0 cos2 θ + Ltan θ ⇒ L = 2v2 0 sin θ cos θ g = v2 0 sin 2θ g So L is now a function of θ, with 0 < θ < π/2 (why?). So if there is a single local maximum then it must be the global maximum. Now get the critical points of L: L′(θ) = 0 ⇒ 2v2 0 cos 2θ g = 0 ⇒ cos 2θ = 0 ⇒ 2θ = π 2 ⇒ θ = π 4 is the only critical point Use the Second Derivative Test to verify that L has a local maximum at θ = π/4: L′′(θ) = − 4v2 0 sin 2θ g ⇒ L′′(π/4) = − 4v2 0 g < 0 ⇒ L has a local maximum at θ = π 4 Thus, L has a global maximum at θ = π 4 , i.e. the projectile travels the farthest horizontally when launched at a 45◦angle with the ground (with L ¡ π 4 ¢ = v2 0 g being the maximum horizontal distance). Note that once the formula for L as a function of θ was found to be L = v2 0 sin 2θ g , calculus was not actually needed to solve this problem. Why? Since v2 0 and g are positive constants (recall g = 9.8m/s2), L would have its largest value when sin 2θ has its largest value 1, which occurs when θ = π/4. Example 4.4 Fermat’s Principle states that light always travels along the path that takes the least amount of time. So suppose that a ray of light is shone from a point A onto a flat horizontal reflective surface at an angle θ1 with the surface and then reflects off the surface at an angle θ2 to a point B. Show that Fermat’s Principle implies that θ1 = θ2. Solution: Let L be the horizontal distance between A and B, let d1 be the distance the light travels from A to the point of contact C with the surface a horizontal distance x from A, let d2 be the distance from C to B, and let y1 and y2 be the vertical distances from A and B, respectively, to the surface, as in the picture below. d1 d2 A B C y1 y2 θ1 θ2 x L −x L
ElementaryCalculus_Page_105_Chunk3640
96 Chapter 4 • Applications of Derivatives §4.1 Since time is distance divided by speed, and since the speed of light is constant, then minimizing the total time elapsed is equivalent to minimizing the total distance traveled, namely D = d1+d2. The basic idea here is that Fermat’s Principle implies that for the light to go from A to B in the shortest time, the unknown point C—and hence the unknown distance x—will have to be at a point that makes θ1 = θ2. The distances L, y1 and y2 are constants, so the goal is to write the total distance D as a function of x, find the x that minimizes D, then show that that value of x makes θ1 = θ2. First, note that C has to be between A and B as in the picture, otherwise the total distance D would be larger than if C were directly below either A or B. This ensures that θ1 and θ2 are between 0 and π/2, and that 0 ≤x ≤L. Next, by the Pythagorean Theorem and the above picture, d1 = q x2 + y2 1 and d2 = q (L −x)2 + y2 2 and so the total distance D = d1 + d2 traveled by the light is a function of x: D(x) = q x2 + y2 1 + q (L −x)2 + y2 2 To find the critical points of D, solve the equation D′(x) = 0: D′(x) = x q x2 + y2 1 − L −x q (L −x)2 + y2 2 = 0 ⇒ x d1 = L −x d2 ⇒ sin θ1 = sin θ2 ⇒ θ1 = θ2 since the sine function is one-to-one over the interval [0, π 2 ]. This seems to prove the result, except for one remaining issue to resolve: verifying that the minimum for D really does occur at the x between 0 and L where D′(x) = 0, not at the endpoints x = 0 or x = L of the closed interval [0,L]. Note that using the Second Derivative Test in this case does not matter, since you would have to check the value of D at the endpoints anyway and compare those values to the values of D at the critical points. To find expressions for the critical points, note that D′(x) = 0 ⇒ x q x2 + y2 1 = L −x q (L −x)2 + y2 2 ⇒ x2 x2 + y2 1 = (L −x)2 (L −x)2 + y2 2 ⇒ ✘✘✘✘✘ (L −x)2x2 + x2y2 2 = ✘✘✘✘✘ (L −x)2x2 + (L −x)2y2 1 ⇒ xy2 = (L −x)y1 ⇒ x = Ly1 y1 + y2 is the only critical point, and x is between 0 and L. Now compare the values of D2(x) at x = 0, x = L, and x = Ly1 y1+y2 : D2(0) = L2 + y2 1 + y2 2 + 2y1 q L2 + y2 2 D2(L) = L2 + y2 1 + y2 2 + 2y2 q L2 + y2 1 D2³ Ly1 y1+y2 ´ = L2 + y2 1 + y2 2 + 2y1y2 Since y2 < q L2 + y2 2 and y1 < q L2 + y2 1, then D2 ³ Ly1 y1+y2 ´ is the smallest of the three values above, so that D2(x) has its minimum value at x = Ly1 y1+y2 , which means D(x) has its minimum value there. ✓
ElementaryCalculus_Page_106_Chunk3641
Optimization • Section 4.1 97 Example 4.5 A man is in a boat 4 miles off a straight coast. He wants to reach a point 10 miles down the coast in the minimum possible time. If he can row 4 mi/hr and run 5 mi/hr, where should he land the boat? p x2 +16 4 x 10−x 10 Y Solution: Let T be the total time traveled. The goal is to minimize T. From the picture on the right, since time is distance divided by speed, break the total time into two parts: the time rowing in the water and the time running on the coast, so that T = timerow + timerun = distrow speedrow + distrun speedrun = p x2 +16 4 + 10−x 5 , where 0 ≤x ≤10 is the distance along the coast where the boat lands. Then T′(x) = x 4 p x2 +16 −1 5 = 0 ⇒ 5x = 4 p x2 +16 ⇒ 25x2 = 16(x2 +16) ⇒ x = 16 3 , so x = 16 3 is the only critical point. Thus, the (global) minimum of T will occur at x = 16 3 , x = 0, or x = 10. Since T(0) = 3 , T(10) = p 29 2 ≈2.693 , T µ16 3 ¶ = 13 5 = 2.6 then T( 16 3 ) < T(10) < T(0). Hence, the global minimum occurs when landing the boat x = 16 3 ≈5.33 miles down the coast. Note that this example shows the importance of checking the endpoints. It was quite close between landing about 5.33 miles down the coast (2.6 hours) or simply rowing all the way to the destination (about 2.693 hours)—the difference is only about 5.6 minutes. With just a slight change in a few of the numbers, the minimum could have occurred at an endpoint. Moral: always check the endpoints!3 Example 4.6 Find the point (x, y) on the graph of the curve y = px that is closest to the point (1,0). x y 0 D (x, y) (1,0) y = px Solution: Let (x, y) be a point on the curve y = px. Then (x, y) = (x,px ), so by the distance formula the distance D between (x, y) and (1,0) is given by D2 = (x−1)2 + (y−0)2 = (x−1)2 + (px)2 = (x−1)2 + x , which is a function of x ≥0 alone. Note that minimizing D is equivalent to minimizing D2. Since d(D2) dx = 2(x−1) + 1 = 2x −1 = 0 ⇒ x = 1 2 is the only critical point, and since d2(D2) dx2 = 2 > 0 for all x, then by the Second Derivative Test x = 1/2 is a local minimum. Hence, the global minimum for D2 must occur at the endpoint x = 0 or at x = 1/2. But D2(0) = 1 > D2(1/2) = 3/4, so the global minimum occurs at x = 1/2. Hence, the closest point is (x, y) = (1/2, p 1/2). 3Another possible lesson is that optimal in the mathematical sense might, again, not mean optimal in a practical sense. After all, presumably after the man is finished with whatever he had to do at the destination 10 miles down the coast, he then has the inconvenience of going back about 4.67 miles to retrieve his boat. At his running speed of 10 mph this would take 28 minutes, wiping out the 5.6 minutes he gained with his “optimal” landing spot!
ElementaryCalculus_Page_107_Chunk3642
98 Chapter 4 • Applications of Derivatives §4.1 Example 4.7 Find the width and height of the rectangle with the largest possible perimeter inscribed in a semicircle of radius r. h r w 2 w Solution: Let w be the width of the rectangle and let h be the height, as in the picture. Then the perimeter is P = 2w +2h. By symmetry and the Pythagorean Theorem, h2 = r2 − ³w 2 ´2 ⇒ h = 1 2 p 4r2 −w2 and so P = 2w+ p 4r2 −w2 for 0 < w < 2r. Find the critical points of P: P′(w) = 2 − w p 4r2 −w2 = 0 ⇒ w = 2 p 4r2 −w2 ⇒ w2 = 16r2 −4w2 ⇒ w = 4r p 5 is the only critical point, and since P′′(w) = − 4r2 (4r2 −w2)3/2 ⇒ P′′ ³ 4r p 5 ´ = −53/2 2r < 0 then P has a local maximum at w = 4r p 5, by the Second Derivative Test. Since P(w) is defined for w in the open interval (0,2r), the local maximum is a global maximum. For the width w = 4r p 5 the height is h = r p 5, which gives the dimensions for the maximum perimeter. Note: If w were extended to include the cases of “degenerate” rectangles of zero width or height, i.e. w = 0 or w = 2r, then the maximum perimeter would still occur at w = 4r p 5, since P ³ 4r p 5 ´ = 10r p 5 ≈4.472r is larger than P(0) = 2r and P(2r) = 4r. Exercises A 1. Find the point on the curve y = x2 that is closest to the point (4, −1/2). 2. Prove that for 0 ≤p ≤1, p(1−p) ≤1 4. 3. A farmer wishes to fence a field bordering a straight stream with 1000 yd of fencing material. It is not necessary to fence the side bordering the stream. What is the maximum area of a rectangular field that can be fenced in this way? 4. The power output P of a battery is given by P = V I −RI2, where I, V, and R are the current, voltage, and resistance, respectively, of the battery. If V and R are constant, find the current I that maximizes P. 5. An impulse turbine consists of a high speed jet of water striking circularly mounted blades. The power P generated by the turbine is P = VU(V −U), where V is the speed of the jet and U is the speed of the turbine. If the jet speed V is constant, find the turbine speed U that maximizes P.
ElementaryCalculus_Page_108_Chunk3643
Optimization • Section 4.1 99 6. A man is in a boat 5 miles off a straight coast. He wants to reach a point 15 miles down the coast in the minimum possible time. If he can row 6 mi/hr and run 10 mi/hr, where should he land the boat? 7. The current I in a voltaic cell is I = E R + r , where E is the electromotive force and R and r are the external and internal resistance, respectively. Both E and r are internal characteristics of the cell, and hence can be treated as constants. The power P developed in the cell is P = RI2. For which value of R is the power P maximized? 8. Find the point(s) on the ellipse x2 25 + y2 16 = 1 closest to (−1,0). 9. Find the maximum area of a rectangle that can be inscribed in an ellipse x2 a2 + y2 b2 = 1, where a > 0 and b > 0 are arbitrary constants. Your answer should be in terms of a and b. 10. Find the radius and angle of the circular sector with the maximum area and a fixed perimeter P. 11. In Example 4.3 show that the maximum height reached by the projectile when launched with an initial velocity v0 at an angle 0 < θ < π 2 to the ground is v2 0 sin2 θ 2g . 12. The phase velocity v of a capillary wave with surface tension T and water density p is v = s 2πT λp + λg 2π where λ is the wavelength. Find the value of λ that minimizes v. 13. For an inventory model with a constant order quantity Q > 0 and a constant linear inventory de- pletion rate D, the total unit cost TC to maintain an average inventory of Q/2 units is TC = C + P Q + (I +W)Q 2D where C is the capital investment cost, P is the cost per order, I is the per unit interest charge per unit time, and W is the overall inventory holding cost. Find the value of Q that minimizes TC. a a a θ θ 14. The opening of a rain gutter—shown in the figure on the right—has a bottom and two sides each with length a. The sides make an angle θ with the bottom. Find the value of θ that maximizes the amount of rain the gutter can hold. B E r r0 x0 15. In an electric circuit with a supplied voltage (emf) E, a resistor with resistance r0, and an inductor with reactance x0, suppose you want to add a second resistor. If r represents the resistance of this second resistor then the power P delivered to that resistor is given by P = E2r (r + r0)2 + x02 with E, r0, and x0 treated as constants. For which value of r is the power P maximized?
ElementaryCalculus_Page_109_Chunk3644
100 Chapter 4 • Applications of Derivatives §4.1 16. The stress τ in the xy-plane along a varying angle φ is given by τ = τ(φ) = σx −σy 2 sin 2φ + τxy cos 2φ , where σx, σy, and τxy are stress components that can be treated as constants. Show that the maxi- mum stress is τ = q¡ σx −σy ¢2 + 4τ2xy 2 . (Hint: Draw a right triangle with angle 2φ after finding the critical point(s).) 17. A certain jogger can run 0.16 km/min, and walks at half that speed. If he runs along a circular trail with circumference 50 km and then—before completing one full circle—walks back straight across to his starting point, what is the maximum time he can spend on the run/walk? 18. A rectangular poster is to contain 50 square inches of printed material, with 4-inch top and bottom margins and 2-inch side margins. What dimensions for the poster would use the least paper? 19. Find the maximum volume of a right circular cylinder that can be inscribed in a sphere of radius 3. 20. A figure consists of a rectangle whose top side coincides with the diameter of a semicircle atop it. If the perimeter of the figure is 20 m, find the radius and height of the semicircle and rectangle, respectively, that maximizes the area inside the figure. 21. A thin steel pipe 25 ft long is carried down a narrow corridor 5.4 ft wide. At the end of the corridor is a right-angle turn into a wider corridor. How wide must this corridor be in order to get the pipe around the corner? You may assume that the width of the pipe can be ignored. 22. A rectangle is inscribed in a right triangle, with one corner of the rectangle at the right angle of the triangle. Show that the maximum area of the rectangle occurs when a corner of the rectangle is at the midpoint of the hypotenuse of the triangle. 23. Find the relation between the radius and height of a cylindrical can with an open top that maxi- mizes the volume of the can, given that the surface area of the can is always the same fixed amount. 24. An isosceles triangle is circumscribed about a circle of radius r. Find the height of the triangle that minimizes the perimeter of the triangle. 25. Suppose N voltaic cells are arranged in N/x rows in parallel, with each row consisting of x cells in series, creating a current I through an external resistance R. Each cell has internal resistance r and EMF (voltage) e. Find the x that maximizes the current I, which—due to Ohm’s Law—is given by I = xe (x2r/N)+ R . 26. A single-degree-of-freedom harmonically forced vibration system with damping factor ζ has mag- nification factor MF = ((1−r2)2 +(2ζr)2)−1/2, where r is the frequency ratio. Find the value of r that maximizes MF. 27. At a distance x ≥0 from the center of a uniform ring with charge q and radius a, the magnitude E of the electric field for points on the axis of the ring is E = qx 4πǫ0(a2 + x2)3/2 where ǫ0 is the permittivity of free space. Find the distance x that maximizes E.
ElementaryCalculus_Page_110_Chunk3645
Optimization • Section 4.1 101 28. Find the equation of the tangent line to the ellipse x2 a2 + y2 b2 = 1 in the first quadrant that forms with the coordinate axes the right triangle with minimal area. 29. A “cold” star that has exhausted its nuclear fuel—called a white dwarf—has total energy E, given by E = ħ2 (3π2Nq)5/3 10π2m µ4 3πR3 ¶−2/3 −3GM2N2 5R where ħ is the reduced Planck constant, N is the number of nucleons—protons and neutrons—in the star, q is the charge of an electron, m is the mass of an electron, M is the mass of a nucleon, G is the gravitational constant, and R is the radius of the star. Show that the radius R that minimizes E is R = µ9π 4 ¶2/3 ħ2q5/3 GmM2N1/3 . C 30. An object of mass m has orbital angular momentum l around a black hole with Schwarzchild radius rS and mass M. The effective potential Φ of the object is Φ = −GM r + l2 2m2r2 − rSl2 2m2r3 where G is the gravitational constant and r is the object’s distance from the black hole. Show that Φ has a local maximum and minimum at r = r1 and r = r2, respectively, where r1 = l2 2GMm2  1− s 1−6GMm2rS l2   and r2 = l2 2GMm2  1+ s 1−6GMm2rS l2  . A B θ1 θ2 31. Recall Fermat’s Principle from Example 4.4, which states that light travels along the path that takes the least amount of time. The speed of light in a vacuum is approximately c = 2.998×108 m/s, but in some other medium (e.g. water) light is slower. Suppose that a ray of light goes from a point A in one medium where it moves at a speed v1 and ends up at a point B in another medium where it moves at a speed v2. Use Fermat’s Principle to prove Snell’s Law, which says that the light is refracted through the boundary between the two media such that sin θ1 sin θ2 = v1 v2 where θ1 and θ2 are the angles that the light makes with the normal line perpendicular to the boundary of the media in the first and second medium, respectively, as in the picture above. 32. A sphere of radius a is inscribed in a right circular cone, with the sphere touching the base of the cone. Find the radius and height of the cone if its volume is a minimum. 33. Find the length of the shortest line segment from the positive x-axis to the positive y-axis going through a point (a,b) in the first quadrant. 34. Find the radius r of a circle c whose center is on a fixed circle C of radius R such that the arc length of the part of c within C is a maximum.
ElementaryCalculus_Page_111_Chunk3646
102 Chapter 4 • Applications of Derivatives §4.2 4.2 Curve Sketching A function can increase between two points in different ways, as shown in Figure 4.2.1. y x y = f (x) (a) f ′′ = 0: straight y x y = f (x) (b) f ′′ > 0: concave up y x y = f (x) (c) f ′′ < 0: concave down Figure 4.2.1 Increasing function f : f ′ > 0, different signs for f ′′ In each case in the above figure the function is increasing, so that f ′(x) > 0, but the manner in which the function increases is determined by its concavity, that is, by the sign of the second derivative f ′′(x). The function in the graph on the far left is linear, i.e. of the form f (x) = ax+b for some constants a and b, so that f ′′(x) = 0 for all x. But the functions in the other two graphs are nonlinear. In the middle graph the derivative f ′ is increasing, so that f ′′ > 0; in this case the function is called concave up. In the graph on the far right the derivative f ′ is decreasing, so that f ′′ < 0; in this case the function is called concave down. The same definitions would hold if the function were decreasing, as shown in Figure 4.2.2 below: y x y = f (x) (a) f ′′ = 0 y x y = f (x) (b) f ′′ > 0: concave up y x y = f (x) (c) f ′′ < 0: concave down Figure 4.2.2 Decreasing function f : f ′ < 0, different signs for f ′′ In Figures 4.2.1(b) and 4.2.2(b) the function is below the line joining the points at each end, while in Figure 4.2.1(c) and 4.2.2(c) the function is above that line. This turns out to be true in general, as a result of the following theorem:
ElementaryCalculus_Page_112_Chunk3647
Curve Sketching • Section 4.2 103 Concavity Theorem: Suppose that f is a twice-differentiable function on [a,b]. Then: (a) If f ′′(x) > 0 on (a,b) then f (x) is below the line l(x) joining the points (a, f (a)) and (b, f (b)) for all x in (a,b). (b) If f ′′(x) < 0 on (a,b) then f (x) is above the line l(x) joining the points (a, f (a)) and (b, f (b)) for all x in (a,b). y x a b y = f (x) l(x) f (a) f (b) Proof: Only part (a) will be proved; the proof of part (b) is similar and left as an exercise. So assume that f ′′(x) > 0 on (a,b), and l(x) be the line joining (a, f (a)) and (b, f (b)), as in the drawing on the right. The drawing suggests that f (x) < l(x) over (a,b), but this is what must be proved. The goal is to show that g(x) = f (x) −l(x) < 0 on (a,b), since this will show that f (x) < l(x) on (a,b). Since f and l are both continuous on [a,b] then so is g. Hence g has a global maximum somewhere in [a,b], by the Extreme Value Theorem. Suppose the global maximum occurs at an interior point x = c, i.e. for some c in the open interval (a,b). Then g′(c) = 0 and g′′(c) = f ′′(c)−l′′(c) = f ′′(c) > 0, since l(x) is a line and hence has a second derivative of 0 for all x. Then by the Second Derivative Test g has a local minimum at x = c, which contradicts g having a global maximum at x = c. Thus, the global maximum of g cannot occur at an interior point, so it must occur at one of the end points x = a or x = b. In other words, either g(x) < g(a) or g(x) < g(b) for all x in (a,b). But f (a) = l(a) and f (b) = l(b), so g(a) = 0 = g(b). Hence, g(x) < 0 for all x in (a,b), i.e. f (x) < l(x) for all x in (a,b). ✓ Points where the concavity of a function changes have a special name: A function f has an inflection point at x = c if the concavity of f changes around x = c. That is, the function goes from concave up to concave down, or vice versa. Note that to be an inflection point it does not suffice for the second derivative to be 0 at that point; the second derivative must change sign around that point, either from positive to negative or from negative to positive. For example, f (x) = x3 has an inflection point at x = 0, since f ′′(x) = 6x < 0 for x < 0 and f ′′(x) = 6x > 0 for x > 0, i.e. f ′′(x) changes sign around x = 0 (and of course f ′′(0) = 0). But for f (x) = x4, x = 0 is not an inflection point even though f ′′(0) = 0, since f ′′(x) = 12x2 ≥0 is always nonnegative. That is, f (x) = x4 is always concave up. Figure 4.2.3 below shows the difference:
ElementaryCalculus_Page_113_Chunk3648
104 Chapter 4 • Applications of Derivatives §4.2 y x 0 (a) f (x) = x3: inflection point at x = 0 y x 0 (b) f (x) = x4: non-inflection point at x = 0 Figure 4.2.3 Inflection vs non-inflection point at x = 0 with f ′′(0) = 0 Figure 4.2.3(b) shows that a point where the second derivative is 0 is a possible inflection point, but you still must check that the second derivative changes sign around that point. Using local minima and maxima, concavity and inflection points, and where a function increases or decreases, you can sketch the graph of a function. Example 4.8 Sketch the graph of f (x) = x3 −6x2 + 9x + 1. Find all local maxima and minima, inflection points, where the function is increasing or decreasing, and where the function is concave up or concave down. Solution: Since f ′(x) = 3x2 −12x +9 = 3(x −1)(x −3) then x = 1 and x = 3 are the only critical points. And since f ′′(x) = 6x −12 then f ′′(1) = −6 < 0 and f ′′(3) = 6 > 0. So by the Second Derivative Test, f has a local maximum at x = 1 and a local minimum at x = 3. Since f ′′(x) = 6x −12 < 0 for x < 2 and f ′′(x) = 6x−12 > 0 for x > 2, then x = 2 is an inflection point, and f is concave down for x < 2 and concave up for x > 2. The table below shows where f is increasing and decreasing, based on the sign of f ′: x values 3(x−1) (x−3) f ′(x) direction x < 1 − − + f is increasing 1 < x < 3 + − − f is decreasing x > 3 + + + f is increasing The graph is shown below: 0 1 2 3 4 5 6 0 0.5 1 1.5 2 2.5 3 3.5 4 y x
ElementaryCalculus_Page_114_Chunk3649
Curve Sketching • Section 4.2 105 Example 4.9 Sketch the graph of f (x) = −x 1 + x2 . Find all local maxima and minima, inflection points, where the func- tion is increasing or decreasing, and where the function is concave up or concave down. Also indicate any asymptotes. Solution: Since f ′(x) = x2−1 (1+x2)2 then x = 1 and x = −1 are the only critical points. And since f ′′(x) = 2x(3−x2) (1+x2)3 then f ′′(1) = 1 2 > 0 and f ′′(−1) = −1 2 < 0. So by the Second Derivative Test, f has a local minimum at x = 1 and a local maximum at x = −1. Since f ′′(x) > 0 for x < − p 3, f ′′(x) < 0 for − p 3 < x < 0, f ′′(x) > 0 for 0 < x < p 3, and f ′′(x) < 0 for x > p 3, then x = 0,± p 3 are inflection points, f is concave up for x < − p 3 and for 0 < x < p 3, and f is concave down for − p 3 < x < 0 and for x > p 3. Since f ′(x) > 0 for x < −1 and x > 1 then f is increasing for |x| > 1. And f ′(x) < 0 for −1 < x < 1 means f is decreasing for |x| < 1. Finally, since lim x→∞f (x) = 0 and lim x→−∞f (x) = 0 then the x-axis (y = 0) is a horizontal asymptote. There are no vertical asymptotes (why?). The graph is shown below: −1 −0.5 0 0.5 1 −4 −3 −2 −1 0 1 2 3 4 y x If the Second Derivative Test fails then one alternative is the following test: First Derivative Test: For a continuous function f on an interval I, let x = c be a number in I such that f (c) is defined, and either f ′(c) = 0 or f ′(c) does not exist. Then: (a) If f ′(x) changes from negative to positive around x = c then f has a local minimum at x = c. (b) If f ′(x) changes from positive to negative around x = c then f has a local maximum at x = c. This test merely states the obvious: a function decreases then increases around a minimum, and it increases then decreases around a maximum.
ElementaryCalculus_Page_115_Chunk3650
106 Chapter 4 • Applications of Derivatives §4.2 Example 4.10 0 0.2 0.4 0.6 0.8 1 1.2 1.4 −2−1.5−1−0.5 0 0.5 1 1.5 2 y x Sketch the graph of f (x) = x2/3. Solution: Clearly f (x) is continuous for all x, including x = 0 (since f (0) = 0), but f ′(x) = 2 3 3px is not defined at x = 0. Since f ′(x) changes from negative to positive around x = 0 (f ′(x) < 0 when x < 0 and f ′(x) > 0 when x > 0), then by the First Derivative Test f has a local minimum at x = 0. Since f ′′(x) = − 2 9 x4/3 < 0 for all x ̸= 0, then f is always concave down. There are no vertical or horizontal asymptotes. The graph is shown on the right. Note that the Second Derivative Test could not be used for this function, since f ′(x) ̸= 0 for all x (notice also that f ′′(x) is not defined at x = 0). A more complete alternative to the Second Derivative Test is the following:4 Nth Derivative Test: A non-constant function f with continuous derivatives of all orders up to and including n > 1 at x = c has either a local minimum, local maximum or inflection point at x = c if and only if f (k)(c) = 0 for k = 1, 2, ..., n−1 and f (n)(c) ̸= 0 (i.e. the nth derivative is the first nonzero derivative at x = c). If so, then: (a) If n > 1 is even and f (n)(c) > 0 then f has a local minimum at x = c. (b) If n > 1 is even and f (n)(c) < 0 then f has a local maximum at x = c. (c) If n > 1 is odd then f has an inflection point at x = c. Note that the Second Derivative Test is the special case where n = 2 in the Nth Derivative Test. Though this test gives necessary and sufficient conditions for a local maximum, local minimum, and inflection point, calculating the first n derivatives can be complicated if n is large and the given function is not simple. Example 4.11 The Second Derivative Test fails for f (x) = x4 at the critical point x = 0, since f ′′(0) = 0. But the first 4 derivatives of f (x) = x4 are f ′(x) = 4x3, f ′′(x) = 12x2, f (3)(x) = 24x, and f (4)(x) = 24, which are all continuous and f (k)(0) = 0 for k = 1, 2, 3 and f (4)(0) = 24 ̸= 0 . So by the Nth Derivative Test, since n = 4 is even and f (4)(0) = 24 > 0 then f (x) = x4 has a local minimum at x = 0. Note that f (x) ≥0 = f (0) for all x, so x = 0 is actually a global minimum for f . 4For a proof, see pp.10-11 in KOO, D., Elements of Optimization, New York: Springer-Verlag, 1977.
ElementaryCalculus_Page_116_Chunk3651
Curve Sketching • Section 4.2 107 A common practice in many fields of science and engineering is to combine multiple named constants (e.g. π) or variables in a function into one variable and then sketch a graph of that function. The example below illustrates the technique. Example 4.12 A hydrogen atom has one electron, and the probability of finding the electron in the ground state of the hydrogen atom between radii r and r + dr is D(r)dr, where dr is an infinitesimal change in the radius r (the distance from the electron to the nucleus), D(r) is the radial probability density function D(r) = 4 a3 0 r2e−2r/a0 and a0 ≈5.291772×10−11 m is the Bohr radius. It is useful to analyze this function in terms of r ≥0 in relation to the Bohr radius a0 (e.g. r = 0.5a0, a0, 2a0, 3a0). To do this, let x = r a0 , so that D(r) = 4 a0 µ r a0 ¶2 e−2 ³ r a0 ´ ⇒ a0 D(x) = 4x2e−2x and then sketch the graph of a0 D(x), which is shown below: 0 0.1 0.2 0.3 0.4 0.5 0.6 0 1 2 3 4 5 6 a0D ³ r a0 ´ r a0 From the graph it looks like x = 1 (i.e. r = a0) is a local (and global) maximum, so that the electron is most likely to be found near r = a0, and the probability drops off dramatically past a distance r = 3a0. In the exercises you will be asked to show that r = a0 is indeed a local maximum and that the inflection points are r = ³ 1± 1 p 2 ´ a0. Note that the right side of the formula a0 D(x) = 4x2e−2x does not involve a0, which was multiplied over to the left side. In general that is the strategy when dealing with these sorts of functions where variables and constants are combined. In this case the stray constant a0 can be multiplied with D since that will not affect the location of critical and inflection points, nor fundamentally alter the general shape of the graph.
ElementaryCalculus_Page_117_Chunk3652
108 Chapter 4 • Applications of Derivatives §4.2 Example 4.13 For a single particle with two states—energy 0 and energy ǫ—in thermal contact with a reservoir at temperature τ, the average energy U and heat capacity CV are given by U = ǫ e−ǫ/τ 1+ e−ǫ/τ and CV = kB ³ ǫ τ ´2 eǫ/τ ¡ 1+ eǫ/τ¢2 where kB ≈1.38065×10−23 J/K is the Boltzmann constant. The graph below shows both quantities as functions of τ/ǫ (not ǫ/τ, as you might expect). See Exercise 9. 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0 1 2 3 4 5 τ/ǫ Average Energy U/ǫ vs Heat Capacity CV /kB U/ǫ = e−ǫ/τ 1+ e−ǫ/τ CV /kB = ³ ǫ τ ´2 eǫ/τ ¡ 1+ eǫ/τ¢2 Exercises A For Exercises 1-8 sketch the graph of the given function. Find all local maxima and minima, inflection points, where the function is increasing or decreasing, where the function is concave up or concave down, and indicate any asymptotes. 1. f (x) = x3 −3x 2. f (x) = x3 −3x2 +1 3. f (x) = xe−x 4. f (x) = x2 e−x2 5. f (x) = 1 1 + x2 6. f (x) = x2 (x−1)2 7. f (x) = e−x −e−2x 2 8. f (x) = e−x sin x 9. Write U/ǫ and CV /kB from Example 4.13 as functions of x = τ/ǫ. You do not need to sketch the graphs. 10. Show that the function D(r) = 4 a3 0 r2e−2r/a0 from Example 4.12 has a local maximum at r = a0 and inflection points at r = ³ 1± 1 p 2 ´ a0. 11. Sketch the graph of Kratzer’s molecular potential V(r) = −2D ³ a r −1 2 a2 r2 ´ as a function of x = r a, with a > 0 and D > 0 as constants. 12. Sketch the graph of f (K) = 2N p K e−K kT pπ(kT)3/2 as a function of x = K kT , with N, k and T as positive constants. 13. Prove part (b) of the Concavity Theorem.
ElementaryCalculus_Page_118_Chunk3653
Numerical Approximation of Roots of Functions • Section 4.3 109 4.3 Numerical Approximation of Roots of Functions When finding critical points of a function f , you encounter the problem of solving the equation f ′(x) = 0. The examples and exercises so far were set up carefully so that solutions to that equation could be found in a simple closed form. But in practice this will not always be the case—in fact it is almost never the case. For example, finding the critical points of the function f (x) = sin x −x2 2 entails solving the equation f ′(x) = cos x −x = 0, for which there is no solution in a closed-form expression. What should you do in such a situation?5 One possibility is to use the bisection method mentioned in Section 3.3. In fact, in Example 3.25 the solution to the equation cos x = x (i.e. cos x −x = 0) was shown to exist in the interval [0,1], and then a demonstration of the bisection method was given to find that solution. The bisection method is one of many numerical methods for finding roots of a function (i.e. where the function is zero). Finding the critical points of a function means finding the roots of its derivative. Though the bisection method could be used for that purpose, convergence to each root is usually slow. A far more efficient method is Newton’s method6, whose geometric interpretation is shown in Figure 4.3.1 below. y x 0 y = f (x) ¯x x0 (x0, f (x0)) x1 (x1, f (x1)) x2 Figure 4.3.1 Newton’s method for finding a root ¯x of f (x) The idea behind Newton’s method is simple: to find a root ¯x of a function f , choose an initial guess x0 and then go up—or down—to the curve y = f (x) and draw the tangent line to the curve at the point (x0, f (x0)). Let x1 be where that tangent line intersects the x-axis, as shown above; repeat this procedure on x1 to get the next number x2, repeat on x2 to get x3, and so on. The resulting sequence of numbers x0, x1, x2, x3, ..., will approach the root ¯x. Convergence under certain conditions can be proved.7 5Note: To “just give up”—as suggested semi-seriously by some students I have had—is not an option. 6Sometimes called the Newton-Raphson method. 7See pp.58-62 in SAATY, T.L. AND J. BRAM, Nonlinear Mathematics, New York: McGraw-Hill, Inc., 1964.
ElementaryCalculus_Page_119_Chunk3654
110 Chapter 4 • Applications of Derivatives §4.3 The general formula for the number xn obtained after n ≥1 iterations in Newton’s method can be determined by considering the formula for x1. First, the tangent line to y = f (x) at the point (x0, f (x0)) has slope f ′(x0), so the equation of the line is y −f (x0) = f ′(x0)(x −x0) . (4.1) The point (x1,0) is (by design) also on that line, so that 0 −f (x0) = f ′(x0)(x1 −x0) ⇒ x1 = x0 −f (x0) f ′(x0) provided that f ′(x0) ̸= 0. The general formula for xn is given by the following algorithm: Newton’s method: For an initial guess x0, the numbers xn for n ≥1 are computed itera- tively as: xn = xn−1 −f (xn−1) f ′(xn−1) for n = 1, 2, 3, ... That is, each “next” number xn depends on the previous number xn−1. The algorithm terminates whenever f ′(xn) = 0, or when the desired accuracy is reached. If f ′(xn) = 0 for some n ≥0, then you could start over with a different initial guess x0. To implement this algorithm in a programming language (for which Newton’s method is well-suited), the following language-independent pseudocode can be used as a guide: Algorithm pseudocode for Newton’s method NEWTON’S METHOD 1 N ←NUMBER-OF-ITERATIONS ✄User supplies this value 2 x ←INITIAL-GUESS ✄User supplies this value 3 for n ←1 to N 4 do 5 if f ′(x) ̸= 0 6 then 7 x ←x −f (x) f ′(x) 8 print x 9 else 10 error “division by zero”
ElementaryCalculus_Page_120_Chunk3655
Numerical Approximation of Roots of Functions • Section 4.3 111 Example 4.14 Use Newton’s method to find the root of f (x) = cos x−x. Solution: Since the root is already known to be in the interval [0,1], choose x0 = 1 as the initial guess. The numbers xn for n ≥1 can be computed with a hand-held scientific calculator, but the process is tedious and error-prone. Using a computer is far more efficient and allows more flexibility. For example, the algorithm is easily implemented in the Java programming language. Save this code in a plain text file as newton.java: Listing 4.1 Newton’s method in Java (newton.java) 1 public class newton { 2 public static void main(String[] args) { 3 int N = Integer.parseInt(args[0]); //Number of iterations 4 double x = 1.0; //initial guess 5 System.out.println("n=0: " + x); 6 for (int i = 1; i <= N; i++) { 7 x = x - f(x)/derivf(x); 8 System.out.println("n=" + i + ": " + x); 9 } 10 } 11 12 //Define the function f(x) 13 public static double f(double x) { 14 return Math.cos(x) - x; 15 } 16 17 //Define the derivative f’(x) 18 public static double derivf(double x) { 19 return -Math.sin(x) - 1.0; 20 } 21 } Though knowledge of Java would help, it should not be that difficult to figure out what the above code is doing. The number of iterations N is passed as a command-line parameter to the program, and xn is computed and printed for n = 0, 1, 2, ... , N. Note that the derivative of f (x) is “hard-coded” into the program.8 There is also no error checking for the derivative being zero at any xn. The program would simply halt on a division by zero error. Compile the code, then run the program with 10 iterations: javac newton.java java newton 10 The output is shown below: 8There are some programming language libraries for calculating derivatives of functions “on the fly,” i.e. dynami- cally. For example, the GNU libmatheval C/Fortran library can perform such symbolic operations. It is available at http://www.gnu.org/software/libmatheval/
ElementaryCalculus_Page_121_Chunk3656
112 Chapter 4 • Applications of Derivatives §4.3 n=0: 1.0 n=1: 0.7503638678402439 n=2: 0.7391128909113617 n=3: 0.739085133385284 n=4: 0.7390851332151607 n=5: 0.7390851332151607 n=6: 0.7390851332151607 n=7: 0.7390851332151607 n=8: 0.7390851332151607 n=9: 0.7390851332151607 n=10: 0.7390851332151607 Note that the solution ¯x = 0.7390851332151607 was found after only 4 iterations; the numbers xn repeat for n ≥5. This is much faster than the bisection method. Another root-finding numerical method similar to Newton’s method is the secant method, whose geometric interpretation is shown in Figure 4.3.2 below: y x 0 y = f (x) ¯x x0 (x0, f (x0)) x1 (x1, f (x1)) x2 Figure 4.3.2 Secant method for finding a root ¯x of f (x) The idea behind the secant method is simple: to find a root ¯x of a function f , choose two initial guesses x0 and x1, then go up—or down—to the curve y = f (x) and draw the secant line through the points (x0, f (x0)) and (x1, f (x1)) on the curve. Let x2 be where that secant line intersects the x-axis, as shown above; repeat this procedure on x1 and x2 to get the next number x3, and keep repeating in this way. The resulting sequence of numbers x0, x1, x2, x3, ..., will approach the root ¯x, under the right conditions.9 9See pp.227-229 in DAHLQUIST, G. AND Å. BJÖRCK, Numerical Methods, Englewood Cliffs, NJ: Prentice-Hall, Inc., 1974.
ElementaryCalculus_Page_122_Chunk3657
Numerical Approximation of Roots of Functions • Section 4.3 113 Since the secant line through (x0, f (x0)) and (x1, f (x1)) has slope f (x1)−f (x0) x1−x0 , the equation of that secant line is: y −f (x1) = f (x1)−f (x0) x1 −x0 (x −x1) The point (x2,0) is on that line, so that 0 −f (x1) = f (x1)−f (x0) x1 −x0 (x2 −x1) ⇒ x2 = x1 −(x1 −x0)· f (x1) f (x1) −f (x0) provided that x1 ̸= x0. The general formula for xn is given by the following algorithm: Secant method: For two initial guesses x0 and x1, the numbers xn for n ≥2 are computed iteratively as: xn = xn−1 −(xn−1 −xn−2)· f (xn−1) f (xn−1) −f (xn−2) for n = 2, 3, 4, ... (4.2) That is, each “next” number xn depends on the previous two numbers xn−1 and xn−2. The algorithm terminates whenever xn = xn−1 (i.e. the numbers start repeating) or when the desired accuracy is reached. Algorithm pseudocode for the secant method SECANT METHOD 1 N ←NUMBER-OF-ITERATIONS ✄User supplies this value 2 x0 ←FIRST-INITIAL-GUESS ✄User supplies this value 3 x1 ←SECOND-INITIAL-GUESS ✄User supplies this value 4 f0 ←f (x0) 5 for n ←1 to N 6 do 7 f1 ←f (x1) 8 if f0 ̸= f1 9 then 10 x ←x1 −(x1 −x0)· f1 f1 −f0 11 print x 12 x0 ←x1 13 f0 ←f1 ✄Re-use f1 as f0 in the next iteration 14 x1 ←x 15 else 16 error “division by zero”
ElementaryCalculus_Page_123_Chunk3658
114 Chapter 4 • Applications of Derivatives §4.3 One difference you might have noticed between the secant method and Newton’s method is that the secant method does not use derivatives. The secant method replaces the derivative in Newton’s method with the slope of a secant line which approximates the derivative (recall how the tangent line is the limit of slopes of secant lines). This might seem like a drawback, perhaps giving a “less accurate” slope than the tangent line, but in practice it is not really a problem. In fact, in many cases the secant method is preferable, since computing derivatives can often be quite complicated. Example 4.15 Use the secant method to find the root of f (x) = cos x−x. Solution: Since the root is already known to be in the interval [0,1], choose x0 = 0 and x1 = 1 as the two initial guesses. The algorithm is easily implemented in the Java programming language. Save this code in a plain text file as secant.java: Listing 4.2 Secant method in Java (secant.java) 1 import java.math.*; 2 public class secant { 3 public static void main(String[] args) { 4 int N = Integer.parseInt(args[0]); //Number of iterations 5 double x0 = 0.0; //first initial guess 6 double x1 = 1.0; //second initial guess 7 double f0 = f(x0); 8 double f1; 9 double x = 0.0; 10 for (int i = 2; i <= N; i++) { 11 f1 = f(x1); 12 x = x1 - (x1 - x0)*f1/(f1 - f0); 13 x0 = x1; 14 f0 = f1; //Re-use f1 as f0 in the next iteration 15 x1 = x; 16 System.out.println("n=" + i + ": " + x); 17 } 18 } 19 20 //Define the function f(x) 21 public static double f(double x) { 22 return Math.cos(x) - x; 23 } 24 } Compile the code, then run the program: javac secant.java java secant 10 The output is shown below:
ElementaryCalculus_Page_124_Chunk3659
Numerical Approximation of Roots of Functions • Section 4.3 115 n=2: 0.6850733573260451 n=3: 0.736298997613654 n=4: 0.7391193619116293 n=5: 0.7390851121274639 n=6: 0.7390851332150012 n=7: 0.7390851332151607 n=8: 0.7390851332151607 n=9: NaN n=10: NaN Notice that the root was found after 6 iterations (n = 7). The undefined number NaN (which stands for “Not a Number”) was returned starting with the eighth iteration (n = 9) because x7 = x8, so that f (x8) −f (x7) = 0, causing a division by zero error in the term x9 = x8 −(x8 −x7)· f (x8) f (x8) −f (x7) . For the function f (x) = cos x −x, the table below summarizes the results of 10 iterations of the bisection method, Newton’s method and the secant method: Term Bisection Newton Secant x0 0.5 1.0 0.0 x1 0.75 0.7503638678402439 1.0 x2 0.625 0.7391128909113617 0.6850733573260451 x3 0.6875 0.739085133385284 0.736298997613654 x4 0.71875 0.7390851332151607 0.7391193619116293 x5 0.734375 0.7390851332151607 0.7390851121274639 x6 0.7421875 0.7390851332151607 0.7390851332150012 x7 0.73828125 0.7390851332151607 0.7390851332151607 x8 0.740234375 0.7390851332151607 0.7390851332151607 x9 0.7392578125 0.7390851332151607 undefined x10 0.73876953125 0.7390851332151607 undefined Newton’s method found the root after 4 iterations, while the secant method needed 6 iterations. After 10 iterations the bisection method had yet to find the root to the same level of precision as the other methods—it would take 52 iterations (that is, x52) to achieve similar accuracy to 16 decimal places. In general Newton’s method requires fewer iterations to find a root than the secant method does, but this does not necessarily mean that it will always be faster. Depending on the com- plexity of the function and its derivative, Newton’s method could involve more “expensive” operations (i.e. computing values, as opposed to assigning values) than the secant method, so that the few more iterations possibly required by the secant method are made up for by fewer total computations.
ElementaryCalculus_Page_125_Chunk3660
116 Chapter 4 • Applications of Derivatives §4.3 To see this, notice that Newton’s method always requires that both f (xn−1) and f ′(xn−1) be computed for the nth term xn in the sequence. The secant method needs f (xn−1) and f (xn−2) for the nth term, but a good programmer would save the value of f (xn−1) so that it could be re-used (and hence not re-computed) as f (xn−2) in the next iteration, resulting in potentially fewer total computations for the secant method. There are occasional pitfalls in using Newton’s method. For example, if f ′(xn) = 0 for some n ≥1 then Newton’s method fails, due to division by 0 in the algorithm. The geometric reason is clear: the tangent line to the curve at that point would be parallel to the x-axis and hence would not intersect it (assuming f (xn) ̸= 0). There would be no “next number” xn+1 in the iteration! See Figure 4.3.3(a) below. y x ¯x xn xn−1 f ′(xn) = 0 y = f (x) (a) f ′(xn) = 0 y x ¯x x0 x1 x2 ... y = f (x) (b) Moving away from a root Figure 4.3.3 Newton’s method: Potential pitfalls Another possible problem is that Newton’s method might move you away from the root, i.e. not get closer, typically by a poor choice of x0. See Figure 4.3.3(b) above. In some extreme cases, it is possible that Newton’s method simply loops back and forth endlessly between the same two numbers, as in Figure 4.3.4: y x ¯x x0 x1 y = f (x) y x x0 x1 ¯x y = f (x) Figure 4.3.4 Newton’s method: Infinite loop In most cases a different choice for the initial guess x0 will fix such problems. Most textbooks on the subject of numerical analysis discuss these issues.10 10For example, RALSTON, A. AND P. RABINOWITZ, A First Course in Numerical Analysis, 2nd ed., New York: McGraw-Hill, Inc., 1978.
ElementaryCalculus_Page_126_Chunk3661
Numerical Approximation of Roots of Functions • Section 4.3 117 There are conditions under which Newton’s method is guaranteed to work, and convergence is fast. Newton’s method has a quadratic rate of convergence, meaning roughly that the error terms—the differences between approximate roots and the actual root—are being squared in the long term. More precisely, if the numbers xn for n ≥0 converge to a root ¯x, then the error terms ǫn = xn −¯x for n ≥0 satisfy the limit lim n→∞ |ǫn+1| |ǫn|2 = C for some constant C. Squared error terms might sound like a bad thing, but the xn terms are converging to the root, making the error terms closer to 0 for large n. Squaring a number ǫn when |ǫn| < 1 results in a smaller number, not a larger one. The numerical methods that you have learned will make it possible to sketch the graphs of many more functions, since finding local minima and maxima involves finding roots of f ′, and finding inflection points involves finding roots of f ′′. You now know some methods for finding those roots. Finally, despite being slower, the bisection method has the nice advantage of always working. The speed of modern computers makes the difference in algorithmic efficiency negligible in many cases. Exercises A 1. Use Newton’s method to find the root of f (x) = cos x−2x. 2. Use Newton’s method to find the positive root of f (x) = sin x−x/2. 3. Use Newton’s method to find the solution of the equation e−x = x. 4. Use Newton’s method to find the solution of the equation e−x = x2. 5. Use Newton’s method and f (x) = x2 −2 to approximate p 2 accurate to six decimal places. 6. Use Newton’s method to approximate p 3 accurate to six decimal places. 7. Repeat Exercise 1 with the secant method. 8. Repeat Exercise 3 with the secant method. 9. Repeat Exercise 5 with the secant method. 10. Repeat Exercise 6 with the secant method. 11. Cosmic microwave background radiation is described by a function similar to f (x) = x3 −1+ex for x ≥0. Use Newton’s method to find the global maximum of f accurate to four decimal places. 12. Would a different choice for x0 in either graph in Figure 4.3.4 eliminate the infinite loop? Explain. 13. Draw a graph without any symmetry that has the infinite loop problem for Newton’s method. 14. The time t(p) required for a p-way merge of a file on a single disk drive into memory is t(p) = pa+ m ln p , where p > 1, a is the disk access time, and m is the time to read in one segment of the size of memory. Find the integer closest to the value of p that minimizes t(p) when a = 24.3ms and m = 3500.3ms.
ElementaryCalculus_Page_127_Chunk3662
118 Chapter 4 • Applications of Derivatives §4.4 4.4 The Mean Value Theorem The difference between instantaneous and average rates of change has been discussed in ear- lier sections. Recall that there is no difference between the two for linear functions. For nonlinear functions the average rate of change over an interval [a,b] of positive length (i.e. b −a > 0) will not be the same as the instantaneous rate of change at every point in the inter- val. However, the following theorem guarantees that they will be the same at some point in the interval: Mean Value Theorem: Let a and b be real numbers such that a < b, and suppose that f is a function such that (a) f is continuous on [a,b], and (b) f is differentiable on (a,b). Then there is at least one number c in the interval (a,b) such that f ′(c) = f (b) −f (a) b −a . (4.3) Figure 4.4.1 below shows the geometric interpretation of the theorem: y x a c b y = f (x) f (b) f (a) (b, f (b)) (a, f (a)) slope = f ′(c) slope = f (b)−f (a) b−a Figure 4.4.1 Mean Value Theorem: parallel tangent line and secant line The idea is that there is at least one point on the curve y = f (x) where the tangent line will be parallel to the secant line joining the points (a, f (a)) and (b, f (b)). For each c in (a,b) the tangent line has slope f ′(c), while the secant line has slope f (b)−f (a) b−a . The Mean Value Theorem says that these two slopes will be equal somewhere in (a,b). To prove the Mean Value Theorem (sometimes called Lagrange’s Theorem), the following intermediate result is needed, and is important in its own right:
ElementaryCalculus_Page_128_Chunk3663
The Mean Value Theorem • Section 4.4 119 Rolle’s Theorem: Let a and b be real numbers such that a < b, and suppose that f is a function such that (a) f is continuous on [a,b], (b) f is differentiable on (a,b), and (c) f (a) = f (b) = 0. Then there is at least one number c in the interval (a,b) such that f ′(c) = 0. y x a c b y = f (x) slope = f ′(c) Figure 4.4.2 Figure 4.4.2 on the right shows the geometric interpre- tation of the theorem. To prove the theorem, assume that f is not the constant function f (x) = 0 for all x in [a,b] (if it were then Rolle’s Theorem would hold trivially). Then there must be at least one x0 in (a,b) such that either f (x0) > 0 or f (x0) < 0. If f (x0) > 0 then by the Extreme Value Theorem f attains a global maximum at some x = c in the open interval (a,b), since f is zero at the endpoints x = a and x = b of the closed interval [a,b]. Then f ′(c) = 0 since f has a maximum at x = c. Likewise if f (x0) < 0 then f attains a global minimum at some x = c in (a,b), and thus again f ′(c) = 0 . ✓ The Mean Value Theorem can now be proved by applying Rolle’s Theorem to the function F(x) = f (x) −f (a) −f (b)−f (a) b −a (x−a) where f satisfies the conditions of the Mean Value Theorem. Basically, the function F “tilts” the graph of f from Figure 4.4.1 to look like the graph in Figure 4.4.2. It is trivial to check that F(a) = F(b) = 0, and F is continuous on [a,b] and differentiable on (a,b) since f is. Thus, by Rolle’s Theorem, F′(c) = 0 for some c in (a,b). However, F′(x) = f ′(x) −f (b)−f (a) b −a and so F′(c) = f ′(c) −f (b)−f (a) b −a = 0 ⇒ f ′(c) = f (b)−f (a) b −a ✓ Note that both the Mean Value Theorem and Rolle’s Theorem are purely existence theorems; they tell you only that a certain number exists. The task of finding the numbers is left to you. For the Mean Value Theorem that task involves solving the equation f ′(x) = f (b)−f (a) b−a (or f ′(x) = 0 for Rolle’s Theorem). The numerical root-finding methods from Section 4.3 could come in handy, since obtaining closed-form solutions might be impossible. For that reason, the Mean Value Theorem is more useful for theoretical purposes. One such application is the following important result:
ElementaryCalculus_Page_129_Chunk3664
120 Chapter 4 • Applications of Derivatives §4.4 If f is a differentiable function on an interval I such that f ′(x) = 0 for all x in I, then f is a constant function on I. Note that I can be any interval, even the entire real line (−∞,∞). It is already known that f = constant ⇒f ′ = 0; the above result says that the converse is true. The proof is by con- tradiction: assume that f is not a constant function and show this contradicts the Mean Value Theorem. If f is not constant then there exist numbers a < b in I such that f (a) ̸= f (b). How- ever, by the Mean Value Theorem there must exist a number c in the interval (a,b) such that f ′(c) = f (b)−f (a) b −a . Since the derivative of f is 0 everywhere in I, then f ′(c) = 0 and so f (b)−f (a) b −a = 0 ⇒ f (b) −f (a) = 0 ⇒ f (a) = f (b) , a contradiction of f (a) ̸= f (b). Thus, f must be a constant function. ✓ Another theoretical result can be proved with the Mean Value Theorem: Let f be a differentiable function on an interval I. Then: (a) If f ′ > 0 on I then f is increasing on I. (b) If f ′ < 0 on I then f is decreasing on I. To prove part (a), assume that f ′(x) > 0 for all x in I, and choose arbitrary numbers a and b in I with a < b. To prove that f is increasing on I it suffices to show that f (a) < f (b). By the Mean Value Theorem there is a number c in (a,b) (and hence in I) such that f (b)−f (a) b −a = f ′(c) , and so f (b)−f (a) = (b −a) f ′(c) > 0 since b −a > 0 and f ′(c) > 0. Thus, f (b) > f (a), and so f is increasing on I. ✓ The proof of part (b) is similar and is left as an exercise. You might wonder why such a proof is necessary. After all, an intuitive explanation was provided in Section 1.2 for why positive or negative derivatives imply that a function is increasing or decreasing, respectively. That knowledge has been assumed and used in the subsequent sections. Intuitive so-called “hand- waving” explanations, in fact, often yield more insight than a “formal” proof, such as the one above. However, it is good to know that such intuition has a solid basis and can be proved, if needed.
ElementaryCalculus_Page_130_Chunk3665
The Mean Value Theorem • Section 4.4 121 The Mean Value Theorem can help in proving inequalities, often used in the sciences for establishing upper or lower bounds on a quantity (e.g. worst-case scenario). Example 4.16 Show that sin x ≤x for all x ≥0. Solution: The inequality holds trivially for x = 0, since sin 0 = 0 ≤0. So assume that x > 0. Then by the Mean Value Theorem there is a number c in (0,x) such that for f (x) = sinx, f (x) −f (0) x−0 = f ′(c) ⇒ sin x −sin 0 x−0 = cos c ⇒ sin x = x cos c ⇒ sin x ≤x since cos c ≤1 and x > 0. Note that sin x ≤x is a sharper inequality than sin x ≤1 when 0 < x < 1. There is a useful alternative form of the Mean Value Theorem. If a < b then let h = b−a > 0, so that a+h = b. Then any number c in (a,b) can be written as c = a+θh for some number θ in (0,1). To see this, let c be in (a,b). Then 0 < c −a < b −a = h and so 0 < c−a h < 1. Thus, θ = c−a h is in (0,1) and a+θh = a+(c −a) = c. Hence: Mean Value Theorem (alternative form): Let a and h > 0 be real numbers, and suppose that f is a function such that (a) f is continuous on [a,a+ h], and (b) f is differentiable on (a,a+ h). Then there is a number θ in the interval (0,1) such that f (a+ h) −f (a) = h f ′(a+θh) . (4.4) The Mean Value Theorem is the special case of g(x) = x in the following generalization: Extended Mean Value Theorem: Let a and b be real numbers such that a < b, and suppose that f and g are functions such that (a) f and g are continuous on [a,b], (b) f and g are differentiable on (a,b), and (c) g′(x) ̸= 0 for all x in (a,b). Then there is at least one number c in the interval (a,b) such that f ′(c) g′(c) = f (b) −f (a) g(b) −g(a) . (4.5)
ElementaryCalculus_Page_131_Chunk3666
122 Chapter 4 • Applications of Derivatives §4.4 The Mean Value Theorem says that the derivative of a differentiable function will always attain one particular value on a closed interval: the function’s average rate of change over the interval. It turns out that the derivative will take on every value between its values at the endpoints, similar to how the Intermediate Value Theorem applies to continuous functions:11 Darboux’s Theorem: If f is a differentiable function on a closed interval [a,b] then its derivative f ′ attains every value between f ′(a) and f ′(b). In other words, if f ′(a) < γ < f ′(b) (or f ′(b) < γ < f ′(a)) then there is a number c in (a,b) such that f ′(c) = γ. If f ′ were continuous on [a,b] then the result would follow trivially by the Intermediate Value Theorem for continuous functions. What is perhaps surprising is that Darboux’s Theorem holds even for derivatives that are not continuous. This means that a discontinuous derivative cannot have the type of simple jump discontinuities that would allow it to “skip” over intermediate values—the points of discontinuity must be of a more complicated type. One rough interpretation of Darboux’s Theorem is that even if a derivative is not a continuous function, it will behave sort of as if it were. Exercises A 1. Does Rolle’s Theorem apply to the function f (x) = 1−|x| on the interval [−1,1]? If so, find the number in (−1,1) that Rolle’s Theorem guarantees to exist. If not, explain why not. 2. Suppose that two horses run a race starting together and ending in a tie. Show that, at some time during the race, they must have had the same speed. 3. Use the Mean Value Theorem to show that ¯¯sin A −sin B ¯¯ ≤ ¯¯A −B ¯¯ for all A and B (in radians). Does ¯¯sin A + sin B ¯¯ ≤ ¯¯A +B ¯¯ for all A and B? Explain. 4. Show that ¯¯cos A −cos B ¯¯ ≤ ¯¯A −B ¯¯ for all A and B (in radians). Does ¯¯cos A + cos B ¯¯ ≤ ¯¯A + B ¯¯ for all A and B? Explain. 5. Show that tan x ≥x for all 0 ≤x < π 2 . 6. Show that ¯¯tan A −tan B ¯¯ ≥ ¯¯A −B ¯¯ for all A and B (in radians) in ¡ −π 2 , π 2 ¢ . Can the inequality be extended to all A and B? Explain your answer. B 7. Use Rolle’s Theorem to show that for all constants a and b with a > 0, f (x) = x3 −ax+b can not have three positive roots. Also, show that it can not have three negative roots. 8. Use the Mean Value Theorem to show that if f ′ < 0 on an interval I then f is decreasing on I. 11For a proof see pp.16-17 in OSTROWSKI, A.M., Solution of Equations and Systems of Equations, 2nd ed., New York: Academic Press Inc., 1966.
ElementaryCalculus_Page_132_Chunk3667
The Mean Value Theorem • Section 4.4 123 9. Suppose that f and g are continuous on [a,b] and differentiable on (a,b), and that f ′(x) > g′(x) for all a < x < b. Show that f (b)−g(b) > f (a)−g(a). 10. Prove the Extended Mean Value Theorem, by applying Rolle’s Theorem to the function F(x) = f (x) −f (a) −f (b)−f (a) g(b)−g(a) (g(x)−g(a)) . 11. Show that ex ≥1+ x for all x. (Hint: Consider f (x) = ex −x.) 12. Show that ln(1+ x) < x for all x > 0. 13. Show that tan−1 x < x for all x > 0. 14. Show that for 0 < α ≤β < π 2 , β−α cos2 α ≤tan β −tan α ≤β−α cos2 β . 15. Show that for 0 < a ≤b, b−a b ≤ln b a ≤b−a a . 16. Show that for n > 1 and a > b, nbn−1(a−b) < an −bn < nan−1(a−b) . C 17. Show that p a2 + b < a+ b 2a for all positive numbers a and b. 18. Show that f (x) = cos2 x + cos2 ¡ π 3 + x ¢ −cos x cos ¡ π 3 + x ¢ is a constant function. What is its value? 19. Suppose that f (x) is a differentiable function and that f (0) = 0 and f (1) = 1. Show that f ′(x0) = 2x0 for some x0 in the interval (0,1). 20. Prove the inequality ¯¯¯¯ x1 + x2 1+ x1x2 ¯¯¯¯ < 1 for −1 < x1,x2 < 1 as follows: (a) First prove the special case where x1 = x2. (b) For the case x1 < x2 define f (x) = x+ a 1+ ax for −1 ≤x ≤1, where −1 < a < 1. Show that f is increasing on [−1,1], then use a = x2 and x = x1. Note that proving the case x2 < x1 is unnecessary (why?). This inequality is a generalization of the same inequality for 0 ≤x1,x2 < 1 in the relativistic velocity addition law from the theory of special relativity: if object 1 has velocity v1 relative to a frame of reference F, and if object 2 has a velocity v2 relative to object 1, so that x1 = v1/c and x2 = v2/c represent the fractions of the speed of light c at which the objects are moving, then the fraction of the speed of light at which object 2 is moving with respect to F is x = (x1 + x2)/(1+ x1x2). So it should be true that 0 ≤x < 1, since nothing can move faster than the speed of light.
ElementaryCalculus_Page_133_Chunk3668
CHAPTER 5 The Integral 5.1 The Indefinite Integral Derivatives appear in many physical phenomena, such as the motion of objects. Recall, for example, that given the position function s(t) of an object moving along a straight line at time t, you could find the velocity v(t) = s′(t) and the acceleration a(t) = v′(t) of the object at time t by taking derivatives. Suppose the situation were reversed: given the velocity function how would you find the position function, or given the acceleration function how would you find the velocity function? s(t) v(t) a(t) d dt ? d dt ? Figure 5.1.1 Differentiation vs antidifferentiation for motion functions In this case calculating a derivative would not help, since the reverse process is needed: instead of differentiation you need a way of performing antidifferentiation, i.e. you would calculate an antiderivative. An antiderivative F(x) of a function f (x) is a function whose derivative is f (x). In other words, F′(x) = f (x). Differentiation is relatively straightforward. You have learned the derivatives of many classes of functions (e.g. polynomials, trigonometric functions, exponential and logarithmic functions), and with the various rules for differentiation you can calculate derivatives of com- plicated expressions involving those functions (e.g. sums, powers, products, quotients). Antid- ifferentiation, however, is a different story. 124
ElementaryCalculus_Page_134_Chunk3669
The Indefinite Integral • Section 5.1 125 To see some of the issues involved, consider a simple function like f (x) = 2x. Of course you know that d dx(x2) = 2x, so it seems that F(x) = x2 is the antiderivative of f (x) = 2x. But is it the only antiderivative of f (x)? No. For example, if F(x) = x2 +1 then F′(x) = 2x = f (x), and so F(x) = x2 + 1 is another antiderivative of f (x) = 2x. Likewise, so is F(x) = x2 + 2. In fact, any function of the form F(x) = x2 +C, where C is some constant, is an antiderivative of f (x) = 2x. Another potential issue is that functions of the form F(x) = x2 + C are just the most obvious antiderivatives of f (x) = 2x. Could there be some other completely different function—one that cannot be simplified into the form x2 +C—whose derivative also turns out to be f (x) = 2x? The answer, luckily, is no: Suppose that F(x) and G(x) are antiderivatives of a function f (x). Then F(x) and G(x) differ only by a constant. That is, F(x) = G(x)+C for some constant C. To prove this, consider the function H(x) = F(x)−G(x), defined for all x in the common domain I of F and G. Since F′(x) = G′(x) = f (x), then H′(x) = F′(x) −G′(x) = f (x) −f (x) = 0 for all x in I, so H(x) is a constant function on I, as was shown in Section 4.4 on the Mean Value Theorem. Thus, there is a constant C such that H(x) = C ⇒ F(x) −G(x) = C ⇒ F(x) = G(x) + C for all x in I. ✓ The practical consequence of the above result can be stated as follows: To find all antiderivatives of a function, it is necessary only to find one antiderivative and then add a generic constant to it. So for the function f (x) = 2x, since F(x) = x2 is one antiderivative then all antiderivatives of f (x) are of the form F(x) = x2 + C, where C is a generic constant. Thus, functions do not have just one antiderivative but a whole family of antiderivatives, all differing only by a constant. The following notation makes all this easier to express: The indefinite integral of a function f (x) is denoted by Z f (x) dx and represents the entire family of antiderivatives of f (x). The large S-shaped symbol before f (x) is called an integral sign.
ElementaryCalculus_Page_135_Chunk3670
126 Chapter 5 • The Integral §5.1 Though the indefinite integral R f (x) dx represents all antiderivatives of f (x), the integral can be thought of as a single object or function in its own right, whose derivative is f (x): d dx µZ f (x) dx ¶ = f (x) You might be wondering what the integral sign in the indefinite integral represents, and why an infinitesimal dx is included. It has to do with what an infinitesimal represents: an in- finitesimal “piece” of a quantity. For an antiderivative F(x) of a function f (x), the infinitesimal (or differential) dF is given by dF = F′(x)dx = f (x)dx, and so F(x) = Z f (x) dx = Z dF . The integral sign thus acts as a summation symbol: it sums up the infinitesimal “pieces” dF of the function F(x) at each x so that they add up to the entire function F(x). Think of it as similar to the usual summation symbol Σ used for discrete sums; the integral sign R takes the sum of a continuum of infinitesimal quantities instead. Finding (or evaluating) the indefinite integral of a function is called integrating the func- tion, and integration is antidifferentiation. Example 5.1 Evaluate Z 0 dx. Solution: Since the derivative of any constant function is 0, then R 0 dx = C, where C is a generic constant. Note: From now on C will simply be assumed to represent a generic constant, without having to explic- itly say so every time. Example 5.2 Evaluate Z 1 dx. Solution: Since the derivative of F(x) = x is F′(x) = 1, then R 1 dx = x+C. Example 5.3 Evaluate Z x dx. Solution: Since the derivative of F(x) = x2 2 is F′(x) = x, then R x dx = x2 2 +C. Since d dx ³ xn+1 n+1 ´ = xn for any number n ̸= −1, and d dx (ln|x|) = 1 x = x−1, then any power of x can be integrated:
ElementaryCalculus_Page_136_Chunk3671
The Indefinite Integral • Section 5.1 127 Power Formula: Z xn dx =        xn+1 n+1 + C if n ̸= −1 ln|x| + C if n = −1 The following rules for indefinite integrals are immediate consequences of the rules for derivatives: Let f and g be functions and let k be a constant. Then: 1. Z k f (x) dx = k Z f (x) dx 2. Z (f (x)+ g(x)) dx = Z f (x) dx + Z g(x) dx 3. Z (f (x)−g(x)) dx = Z f (x) dx − Z g(x) dx The above rules are easily proved. For example, the first rule is a simple consequence of the Constant Multiple Rule for derivatives: if F(x) = R f (x) dx, then d dx(k F(x)) = k d dx(F(x)) = k f (x) ⇒ Z k f (x) dx = k F(x) = k Z f (x) dx . ✓ The other rules are proved similarly and are left as exercises. Repeated use of the above rules along with the Power Formula shows that any polynomial can be integrated term by term—in fact any finite sum of functions can be integrated in that manner: For any functions f1, ..., fn and constants k1, ..., kn, Z (k1f1(x)+···+ kn fn(x)) dx = k1 Z f1(x) dx + ··· + kn Z fn(x) dx . (5.1) Example 5.4 Evaluate Z (x7 −3x4) dx. Solution: Integrate term by term, pulling constant multiple outside the integral: Z (x7 −3x4) dx = Z x7 dx −3 Z x4 dx = x8 8 −3x5 5 + C
ElementaryCalculus_Page_137_Chunk3672
128 Chapter 5 • The Integral §5.1 Example 5.5 Evaluate Z px dx. Solution: Use the Power Formula: Z px dx = Z x1/2 dx = x3/2 3/2 + C = 2x3/2 3 + C Example 5.6 Evaluate Z µ 1 x2 + 1 x ¶ dx. Solution: Use the Power Formula and integrate term by term: Z µ 1 x2 + 1 x ¶ dx = Z µ x−2 + 1 x ¶ dx = x−1 −1 + ln|x| + C = −1 x + ln|x| + C The following indefinite integrals are just re-statements of the corresponding derivative for- mulas for the six basic trigonometric functions: Z cos x dx = sin x + C Z sin x dx = −cos x + C Z sec2 x dx = tan x + C Z sec x tan x dx = sec x + C Z csc x cot x dx = −csc x + C Z csc2 x dx = −cot x + C Since d dx(ex) = ex, then: Z ex dx = ex + C
ElementaryCalculus_Page_138_Chunk3673
The Indefinite Integral • Section 5.1 129 Example 5.7 Evaluate Z (3sin x + 4cos x −5ex) dx. Solution: Integrate term by term: Z (3sin x + 4cos x −5ex) dx = 3 Z sin x dx + 4 Z cos x dx −5 Z ex dx = −3cos x + 4sin x −5ex + C Example 5.8 Recall from Section 1.1 the example of an object dropped from a height of 100 ft. Show that the height s(t) of the object t seconds after being dropped is s(t) = −16t2 +100, measured in feet. 100 ft t = 0 sec s(t) t > 0 Solution: When the object is dropped at time t = 0 the only force acting on it is gravity, causing the object to accelerate downward at the known constant rate of 32 ft/s2. The object’s acceleration a(t) at time t is thus a(t) = −32. If v(t) is the object’s velocity at time t, then v′(t) = a(t), which means that v(t) = Z a(t) dt = Z −32 dt = −32t + C for some constant C. The constant C here is not generic—it has a specific value determined by the initial condition on the velocity: the object was at rest at time t = 0. That is, v(0) = 0, which means 0 = v(0) = −32(0) + C = C ⇒ v(t) = −32t for all t ≥0. Likewise, since s′(t) = v(t) then s(t) = Z v(t) dt = Z −32t dt = −16t2 + C for some constant C, determined by the initial condition that the object was 100 ft above the ground at time t = 0. That is, s(0) = 100, which means 100 = s(0) = −16(0)2 + C = C ⇒ s(t) = −16t2 + 100 for all t ≥0. ✓ The formula for s(t) in Example 5.8 can be generalized as follows: denote the object’s initial position at time t = 0 by s0, let v0 be the object’s initial velocity (positive if thrown upward, negative if thrown downward), and let g represent the (positive) constant acceleration due to gravity. By Newton’s First Law of motion the only acceleration imparted to the object after throwing it is due to gravity: a(t) = −g ⇒ v(t) = Z a(t) dt = Z −g dt = −gt + C for some constant C: v0 = v(0) = −g(0)+C = C. Thus, v(t) = −gt+ v0 for all t ≥0, and so s(t) = Z v(t) dt = Z (−gt + v0) dt = −1 2 gt2 + v0t + C for some constant C: s0 = s(0) = −1 2 g(0)2 + v0(0)+C = C. To summarize:
ElementaryCalculus_Page_139_Chunk3674
130 Chapter 5 • The Integral §5.1 Free fall motion: At time t ≥0: acceleration: a(t) = −g velocity: v(t) = −gt + v0 position: s(t) = −1 2 gt2 + v0t + s0 initial conditions: s0 = s(0), v0 = v(0) Note that the units are not specified—they just need to be consistent. In metric units, g = 9.8 m/s2, while g = 32 ft/s2 in English units. Thinking of the indefinite integral of a function as the sum of all the infinitesimal “pieces” of that function—for the purpose of retrieving that function—provides a handy way of integrat- ing a differential equation to obtain the solution. The key idea is to transform the differential equation into an equation of differentials, which has the effect of treating functions as vari- ables. Some examples will illustrate the technique. Example 5.9 For any constant k, show that every solution of the differential equation dy dt = ky is of the form y = Aekt for some constant A. You can assume that y(t) > 0 for all t. Solution: Put the y terms on the left and the t terms on the right, i.e. separate the variables: dy y = kdt Now integrate both sides (notice how the function y is treated as a variable): Z dy y = Z kdt ln y+C1 = kt+C2 (C1 and C2 are constants) ln y = kt+C (combine C1 and C2 into the constant C) y = ekt+C = ekt · eC = Aekt where A = eC is a constant. Note that this is the formula for radioactive decay from Section 2.3. Example 5.10 Recall from Section 3.6 the equation of differentials dP P + dV V = dT T relating the pressure P, volume V and temperature T of an ideal gas. Integrate that equation to obtain the original ideal gas law PV = RT, where R is a constant. .
ElementaryCalculus_Page_140_Chunk3675
The Indefinite Integral • Section 5.1 131 Solution: Integrating both sides of the equation yields Z dP P + Z dV V = Z dT T ln P + ln V = ln T + C (C is a constant) ln(PV) = ln T + C PV = eln T+C = eln T · eC = T eC = RT where R = eC is a constant. ✓ The integration formulas in this section depended on already knowing the derivatives of cer- tain functions and then “working backward” from their derivatives to obtain the original func- tions. Without that prior knowledge you would be reduced to guessing, or perhaps recognizing a pattern from some derivative you have encountered. A number of integration techniques will be presented shortly, but there are many indefinite integrals for which no simple closed form exists (e.g. R ex2 dx and R sin(x2)dx). Exercises A For Exercises 1-15, evaluate the given indefinite integral. 1. Z ¡ x2 + 5x −3 ¢ dx 2. Z 3cos x dx 3. Z 4ex dx 4. Z ¡ x5 −8x4 −3x3 + 1 ¢ dx 5. Z 5sin x dx 6. Z 3ex 5 dx 7. Z 6 x dx 8. Z 4 3x dx 9. Z ¡ −2 p x ¢ dx 10. Z 1 3px dx 11. Z ³ x + x4/3´ dx 12. Z 1 3 3px dx 13. Z 3sec x tan x dx 14. Z 5sec2 x dx 15. Z 7csc2 x dx 16. Prove the sum and difference rules for indefinite integrals: R (f (x)± g(x))dx = R f (x)dx ± R g(x)dx 17. Integrate both sides of the equation dP P + dM M = dT 2T to obtain the ideal gas continuity relation: PM p T = constant. 18. Use the free fall motion equation for position to show that the maximum height reached by an object launched straight up from the ground with an initial velocity v0 is v2 0 2g.
ElementaryCalculus_Page_141_Chunk3676
132 Chapter 5 • The Integral §5.2 5.2 The Definite Integral Recall from the last section that the integral sign in the indefinite integral Z f (x) dx represents a summation of the infinitesimals f (x)dx = dF for an antiderivative F(x) of f (x). Why is the term “indefinite” used? Because the summation is indefinite: the x in f (x) dx is defined generically, meaning “x in general,” that is, not for x in a specific range of values. The same summation over a specific, definite range of values of x, say, over an interval [a,b], is a different type of integral: The definite integral of a function f (x) over an interval [a,b] is denoted by Zb a f (x) dx and represents the sum of the infinitesimals f (x) dx for all x in [a,b]. An indefinite integral yields a generic function, whereas a definite integral yields either a number or a specific function. There are many ways to calculate the specific summation in a definite integral, one of which is motivated by a geometric interpretation of the infinitesimal f (x) dx as the area of a rectangle, as in Figure 5.2.1 below: y = f (x) f (x) f (x+ dx)−f (x) y x a b x x+ dx dx Figure 5.2.1 The infinitesimal f (x) dx as the area of a rectangle The shaded rectangle in the above picture has height f (x) and width dx, and so its area is f (x) dx. In fact, it appears that that area is just a little bit smaller than the area under the curve y = f (x) and above the x-axis between x and x + dx; there is a small gap between the curve and the top of the rectangle, accounting for the difference in the area. However, the area of that gap turns out to be zero, as shown below:
ElementaryCalculus_Page_142_Chunk3677
The Definite Integral • Section 5.2 133 f (x) df = f (x+ dx)−f (x) y = f (x) x x+ dx dx A B C Figure 5.2.2 Area under the curve y = f (x) over [x,x+ dx] By the Microstraightness Property, the curve y = f (x) shown in Figure 5.2.1 is a straight line over the infinitesimal interval [x, x+ dx], as shown in Figure 5.2.2.1 Thus, the part of the area between the curve and the x-axis over the interval [x, x + dx] consists of two parts: the area f (x)dx of the shaded rectangle and the area of the right triangle △ABC, both of which are shown in Figure 5.2.2. However, the area of △ABC is zero: Area of △ABC = 1 2(base)×(height) = 1 2(dx)(df ) = 1 2(dx)(f ′(x)dx) = 1 2 f ′(x)(dx)2 = 0 The function f shown in Figure 5.2.2 is increasing at x, but a similar argument could be made if f were decreasing at x. Hence, the area between the curve y = f (x) and the x-axis comes solely from the rectangles with area f (x)dx, as x varies from a to b. The sum of all those rectangular areas, though, equals the definite integral of f (x) over [a,b]. The definite integral can thus be interpreted as an area: For a function f (x) ≥0 over [a,b], the area under the curve y = f (x) between x = a and x = b, denoted by A, is given by A = Zb a f (x) dx and represents the area of the region R bounded above by y = f (x), bounded below by the x-axis, and bounded on the sides by x = a and x = b (with a < b). 1The function f is assumed to be differentiable at x, in this case. If not then the points where f is not differentiable can be excluded without affecting the integral.
ElementaryCalculus_Page_143_Chunk3678
134 Chapter 5 • The Integral §5.2 y = f (x) y x a b R Figure 5.2.3 The area A of the region R equals Rb a f (x)dx In Figure 5.2.3 the area under the curve y = f (x) between x = a and x = b is the area A of the shaded region R, namely A = Rb a f (x)dx. To calculate that area for a specific function, rect- angles can again be used, but this time with widths that are small positive numbers instead of infinitesimals. The procedure is as follows: 1. Create a partition P = {x0 < x1 < ··· < xn−1 < xn} of the interval [a,b] into n ≥1 subintervals [x0, x1], [x1, x2], ..., [xn−1, xn], with x0 = a and xn = b. 2. In each subinterval [xi−1, xi] of P pick a number x∗ i , so that xi−1 ≤x∗ i ≤xi for i = 1 to n. 3. For i = 1 to n, form a rectangle whose base is the subinterval [xi−1, xi] of length ∆xi = xi −xi−1 > 0 and whose height is f (x∗ i ). 4. Take the sum f (x∗ 1)∆x1 + f (x∗ 2)∆x2 +··· + f (x∗ n)∆xn of the areas of these rectangles, called a Riemann sum. y = f (x) f (x∗ 1) f (x∗ 2) f (x∗ n) y x x0 a = x∗ 1 x1 x∗ 2 x2 ... xn−1 x∗ n xn = b ... ∆x1 ∆x2 ∆xn Figure 5.2.4 A Riemann sum of f (x) over a partition of [a,b] 5. Take the limit of the Riemann sums as n →∞, so that the subinterval lengths approach 0. If the limit exists then that limit is the area A of the region R: Area A = Zb a f (x) dx = lim n→∞ nX i=1 f (x∗ i )∆xi (5.2)
ElementaryCalculus_Page_144_Chunk3679
The Definite Integral • Section 5.2 135 The limit in Formula (5.2) should be taken over all partitions whose norm—the length of the largest subinterval—approaches 0. In practice, however, the partitions are usually chosen so that the subintervals are of equal length, and then simply make those equal lengths smaller and smaller by dividing the interval [a,b] into more and more such subintervals. Note that the points x∗ i in each subinterval can be anywhere in the subinterval—often the midpoint of the subinterval is chosen, but the left and right endpoints are also typical choices. In the above procedure the gaps between the rectangles and the curve will have areas ap- proaching 0 as the number n of subintervals grows and the subinterval lengths approach 0. This is true if the function f is differentiable, and in fact even if f is merely continuous.2 Thus, the area under the curve can be defined by the above procedure. To calculate the area under a curve in this manner, the reader should have some familiarity with the summation notation in Formula (5.2). For real numbers a1, a2, ..., an and an integer n ≥1, nX k=1 ak = a1 + a2 + ··· + an is the sum of a1, ..., an. The symbol Σ is called the summation sign, which is the Greek capital letter Sigma. The following rules for this “Sigma notation” are intuitively obvious: Let a1, a2, ..., an, and b1, b2, ..., bn be real numbers, and let c be a constant. Then: (1) nX k=1 (ak + bk) = nX k=1 ak + nX k=1 bk (2) nX k=1 (ak −bk) = nX k=1 ak − nX k=1 bk (3) nX k=1 cak = c nX k=1 ak (4) nX k=1 ak = n X i=1 ai (i.e. the sum is independent of the summation index letter) 2For a proof and fuller discussion of all this, see Ch.1-2 in KNOPP, M.I., Theory of Area, Chicago: Markham Publishing Co., 1969. The book attempts to define precisely what an “area” actually means, including that of a rectangle (showing agreement with the intuitive notion of width times height).
ElementaryCalculus_Page_145_Chunk3680
136 Chapter 5 • The Integral §5.2 The following summation formulas can be helpful when calculating Riemann sums: Let n ≥1 be a positive integer. Then: (1) nX k=1 1 = n (2) nX k=1 k = 1 + 2 + ··· + n = n(n+1) 2 (3) nX k=1 k2 = 12 + 22 + ··· + n2 = n(n+1)(2n+1) 6 (4) nX k=1 k3 = 13 + 23 + ··· + n3 = n2(n+1)2 4 (5) nX k=1 k4 = 14 + 24 + ··· + n4 = n(n+1)(6n3 +9n2 + n−1) 30 Formula (1) is obvious: add the number 1 a total of n times and the sum is n. Formula (2) can be proved by induction: 1. Show that n X k=1 k = n(n+1) 2 for n = 1: 1X k=1 k = 1 = 1(1+1) 2 ✓ 2. Assume that nX k=1 k = n(n+1) 2 for some integer n ≥1. Show that the formula holds for n replaced by n+1, that is: n+1 X k=1 k = (n+1)((n+1)+1) 2 = (n+1)(n+2) 2 To show this, note that n+1 X k=1 k = 1 + 2 + ··· + n + (n+1) = nX k=1 k + (n+1) = n(n+1) 2 + (n+1) = n(n+1) + 2(n+1) 2 = (n+1)(n+2) 2 ✓ 3. By induction, this proves the formula for all integers n ≥1. QED
ElementaryCalculus_Page_146_Chunk3681
The Definite Integral • Section 5.2 137 Formulas (3)-(5) can be proved similarly by induction (see the exercises). The example below shows how Formulas (2) and (3) are used in finding the limit of a Riemann sum. Example 5.11 Use Riemann sums to calculate Z2 1 x2 dx. Solution: The definite integral is the area under the curve y = f (x) = x2 between x = 1 and x = 2, as shown in Figure 5.2.5(a): 0 y x 1 2 (a) Area under y = x2 over [1,2] 0 y x 1 = x0 x1 x2 ... xn−1 xn = 2 ... (b) Riemann sums using left endpoints: x∗ i = xi−1 Figure 5.2.5 Calculating R2 1 x2 dx Divide the interval [1,2] into n subintervals of equal length ∆xi = (2−1)/n = 1/n for i = 1 to n, so that the partition P is {x0 < x1 < ... xn} where xi = 1+ i n for i = 0, 1, ..., n (and hence x0 = 1 and xn = 2). In each subinterval [xi−1,xi] pick the point x∗ i to be the left endpoint xi−1, so that the rectangles appear as in Figure 5.2.5(b). Then Z2 1 x2 dx = lim n→∞ nX i=1 f (x∗ i )∆xi = lim n→∞ nX i=1 f (xi−1) 1 n = lim n→∞ nX i=1 x2 i−1 1 n = lim n→∞ nX i=1 µ 1+ i −1 n ¶2 1 n = lim n→∞ nX i=1 µ 1 n + 2 n2 (i −1) + 1 n3 (i −1)2 ¶ = lim n→∞ Ã nX i=1 1 n + 2 n2 nX i=1 (i −1) + 1 n3 nX i=1 (i −1)2 ! = lim n→∞ Ã 1 + 2 n2 n−1 X i=1 i + 1 n3 n−1 X i=1 i2 ! = lim n→∞ µ 1 + 2 n2 · (n−1)n 2 + 1 n3 · (n−1)n(2n−1) 6 ¶ (replace n by n−1 in Formulas (2) and (3)) = ³ lim n→∞1 ´ + µ lim n→∞ n−1 n ¶ + µ lim n→∞ 2n2 −3n+1 6n2 ¶ = 1 + 1 1 + 2 6 = 7 3
ElementaryCalculus_Page_147_Chunk3682
138 Chapter 5 • The Integral §5.2 It it often simpler to use a computer to calculate approximations of a definite integral, by taking the Riemann sum of a sufficiently large number of rectangles in order to achieve the desired accuracy. Choosing subintervals of equal length, as in Example 5.11, makes it easier to use an algorithm to calculate the integral. For example, the table below summarizes the calculations of Riemann sums for the function in Example 5.11—namely f (x) = x2 over [1,2]—using different values for the points x∗ i in the subintervals (left endpoints, midpoints, and right endpoints): # of rectangles Left endpoint Midpoint Right endpoint 1 1 2.25 4 2 1.625 2.3125 3.125 3 1.851851851852 2.324074074074 2.851851851852 4 1.96875 2.328125 2.71875 5 2.04 2.33 2.64 10 2.185 2.3325 2.485 100 2.31835 2.333325 2.34835 1000 2.3318335 2.33333325 2.3348335 10000 2.333183335 2.3333333325 2.333483335 100000 2.33331833335 2.333333333325 2.33334833335 1000000 2.333331833333 2.333333333333 2.333334833333 Due to the concavity of the curve y = x2, using the left endpoints underestimates the actual area, whereas using the right endpoints yields an overestimate. Using the midpoints usually gives better results (i.e. more accuracy in fewer iterations). So far only definite integrals of nonnegative functions have been considered—that is, func- tions f (x) ≥0 over an interval [a,b]. If f (x) is either negative or changes sign over [a,b], then the definite integral can be defined as follows: Let R be the region bounded by y = f (x) and the x-axis between x = a and x = b. If f (x) ≤0 over [a,b], then Zb a f (x) dx = the negative of the area of R If f (x) changes sign over [a,b], then Zb a f (x) dx = the net area of R, where the parts of R above the x-axis count as positive area and the parts below count as negative area.
ElementaryCalculus_Page_148_Chunk3683
The Definite Integral • Section 5.2 139 Note: In the definite integral Zb a f (x) dx the numbers a and b are called the limits of integra- tion, with a being the lower limit of integration and b the upper limit of integration. The function f (x) being integrated is called the integrand, in both definite and indefinite integrals. Exercises A 1. Explain why Zb a c dx = c(b−a) for any constant c. 2. Would using left endpoints in the Riemann sums underestimate or overestimate R2 1 lnxdx? Explain. B 3. Use Riemann sums to calculate Z1 0 x dx. 4. Use Riemann sums to calculate Z1 0 x2 dx. 5. Use Riemann sums to calculate Z1 0 3x2 dx. 6. Use Riemann sums to calculate Z1 0 x3 dx. 7. Prove the formula nX k=1 k2 = n(n+1)(2n+1) 6 by induction on n ≥1. 8. Prove the formula nX k=1 k2 = n(n+1)(2n+1) 6 as follows: (a) Show that nX k=1 ¡ (k+1)3 −k3¢ = (n+1)3 −1 . (b) Show that (k+1)3 −k3 = 3k2 + 3k + 1 . (c) Use the formula nX k=1 k = n(n+1) 2 and parts (a) and (b) to show that nX k=1 k2 = n(n+1)(2n+1) 6 . 9. Prove the formula nX k=1 k3 = n2 (n+1)2 4 by induction on n ≥1. 10. The famous quicksort algorithm in computer science is a popular method for placing objects in some order (e.g. numerical, alphabetical). On average the algorithm needs O(n log n) comparisons to sort n objects (here log n means the natural logarithm of n). The proof of that average complexity depends on the inequality m−1 X k=2 k ln k ≤ Zm 2 x ln x dx for all integers m > 2. Explain why that inequality is true. C 11. Prove the formula nX k=1 k4 = 14 + 24 + ··· + n4 = n(n+1)(6n3 +9n2 + n−1) 30 by induction on n ≥1. 12. Calculate the following sum: 1 + (1+2) + (1+2+3) + (1+2+3+4) + ··· + (1+2+3+4+··· +50)
ElementaryCalculus_Page_149_Chunk3684
140 Chapter 5 • The Integral §5.3 5.3 The Fundamental Theorem of Calculus Using Riemann sums to calculate definite integrals can be tedious, as was seen in the previous section. In fact the technique shown in that section depended on the function being a low- degree polynomial, which obviously will not always be the case. Luckily there is a better way, involving antiderivatives, given by the following theorem: Fundamental Theorem of Calculus: Suppose that a function f is differentiable on [a,b]. Then: (I) The function A(x) defined on [a,b] by A(x) = Zx a f (t) dt is differentiable on [a,b], and A′(x) = f (x) for all x in [a,b]. (II) If F is an antiderivative of f on [a,b], i.e. F′(x) = f (x) for all x in [a,b], then Zb a f (x) dx = F(b) −F(a) . The function A(x) in Part I of the theorem is sometimes called the area function because it represents the area under the curve y = f (x) over the interval [a, x], as shown in Figure 5.3.1 below. y = f (x) y x a x b A(x) Figure 5.3.1 The area function A(x) = Rx a f (t)dt y = f (x) y x a x x+ dx b dA Figure 5.3.2 dA = A(x+ dx)−A(x) To prove Part I, assume that f (x) ≥0 on [a,b] as in Figure 5.3.1 (the proofs for f (x) either negative or switching sign over [a,b] are similar). The goal is to show that for any x in [a,b] the differential dA exists and equals f (x)dx. First, dA = A(x+ dx)−A(x) is the area under the curve y = f (x) over the interval [x, x+ dx], as shown in Figure 5.3.2 above.
ElementaryCalculus_Page_150_Chunk3685
The Fundamental Theorem of Calculus • Section 5.3 141 By the Microstraightness Property the curve y = f (x) is a straight line over the infinitesimal interval [x, x + dx], so f must be either increasing, constant, or decreasing over that interval. The three possibilities are shown in Figure 5.3.3: f (x) f (x) df y = f (x) x x+ dx dx A B C (a) f is increasing f (x) y = f (x) x x+ dx dx (b) f is constant f (x) f (x+ dx) −df y = f (x) x x+ dx dx A B C (c) f is decreasing Figure 5.3.3 The three possibilities for dA In the case where f is increasing over [x, x+ dx], the infinitesimal area dA is the sum of the area of the rectangle of height f (x) and width dx and the area of the right triangle △ABC shown in Figure 5.3.3(a). The area of △ABC is 1 2(df )(dx) = 1 2 f ′(x)(dx)2 = 0, so dA = f (x)dx. In the case where f is constant over [x, x + dx], the infinitesimal area dA is the area of the rectangle of height f (x) and width dx, as shown in Figure 5.3.3(b). So again, dA = f (x)dx. In the case where f is decreasing over [x, x+ dx], the infinitesimal area dA is the sum of the area of the rectangle of height f (x+dx) and width dx and the area of the right triangle △ABC shown in Figure 5.3.3(c). Note that df < 0 since f is decreasing, and so the area of △ABC is 1 2(−df )(dx) = −1 2 f ′(x)(dx)2 = 0. Thus, dA = f (x+ dx)dx = (f (x)+ df )dx = f (x)dx + f ′(x)(dx)2 = f (x)dx + 0 = f (x)dx . So in all three cases, dA = f (x)dx, and so A′(x) = dA dx = f (x), which shows that A(x) is differen- tiable and has derivative f (x). This proves Part I of the Fundamental Theorem of Calculus. ✓ To prove Part II of the theorem, let F(x) be an antiderivative of f (x) over [a,b]. Since the are afunction A(x) = Rx a f (x)dx is also an antiderivative of f (x) over [a,b] by Part I of the theorem, then A(x) and F(x) differ by a constant C over [a,b]. In other words: A(x) = F(x) + C for all x in [a,b]
ElementaryCalculus_Page_151_Chunk3686
142 Chapter 5 • The Integral §5.3 By definition A(a) = 0, since it is the area under the curve over the interval [a,a] of zero length. Thus, 0 = A(a) = F(a) + C ⇒ C = −F(a) ⇒ A(x) = F(x) −F(a) for all x in [a,b] and so Zb a f (x) dx = A(b) = F(b) −F(a) which proves Part II of the theorem.3 ✓ Note: In some textbooks Part I is called the First Fundamental Theorem of Calculus and Part II is called the Second Fundamental Theorem of Calculus. The following notation provides a shorthand way of writing F(b)−F(a): F(x) ¯¯¯¯ b a = F(b) −F(a) Example 5.12 Calculate Z2 1 x2 dx. Solution: Recall from Example 5.11 in the previous section that the integral equals 7/3. In that example Riemann sums were used, but Part II of the Fundamental Theorem of Calculus makes the integral much easier to calculate. Since F(x) = x3 3 is an antiderivative of f (x) = x2, then Z2 1 x2 dx = x3 3 ¯¯¯¯ 2 1 = 23 3 −13 3 = 7 3 . Note in the above example that any antiderivative of f (x) = x2 could have been used, e.g. F(x) = x3 3 + 5. Notice that the constant 5 cancels out when evaluating F(2) −F(1). So you do not need to add a generic constant C to the antiderivative of f (x) in a definite integral, as you would in an indefinite integral. Example 5.13 Calculate Zπ 0 sin x dx. Solution: Since F(x) = −cos x is an antiderivative of f (x) = sin x, then Zπ 0 sin x dx = −cos x ¯¯¯¯ π 0 = −cos π −(−cos 0) = −(−1) −(−1) = 2 . 3The theorem can be proved for the weaker condition that f is merely continuous on [a,b]. See p.173-175 in PARZYNSKI, W.R. AND P.W. ZIPSE, Introduction to Mathematical Analysis, New York: McGraw-Hill, Inc., 1982.
ElementaryCalculus_Page_152_Chunk3687
The Fundamental Theorem of Calculus • Section 5.3 143 Example 5.14 Calculate Z1 −1 x3 dx. Solution: Since F(x) = x4 4 is an antiderivative of f (x) = x3, then Z1 −1 x3 dx = x4 4 ¯¯¯¯ 1 −1 = 14 4 −(−1)4 4 = 1 4 −1 4 = 0 . Example 5.14 is a special case of the following result for odd functions: If f is an odd function, i.e. f (−x) = −f (x) for all x, then Za −a f (x) dx = 0 for all a > 0 such that f is continuous on [−a,a]. The idea is that since an odd function is symmetric around the origin, then the area between the curve and the x-axis over [0,a] will cancel out the area between the curve and the x-axis over [−a,0]. Both areas are the same but one gets counted as positive and the other negative, as shown in Figure 5.3.4 below: x y y = f (x) a −a + — Figure 5.3.4 Odd function f over [−a,a] x y y = f (x) a −a Figure 5.3.5 Even function f over [−a,a] By symmetry around the y-axis, a similar result holds for even functions (see Figure 5.3.5): If f is an even function, i.e. f (−x) = f (x) for all x, then Za −a f (x) dx = 2 Za 0 f (x) dx for all a > 0 such that f is continuous on [−a,a].
ElementaryCalculus_Page_153_Chunk3688
144 Chapter 5 • The Integral §5.3 The following rules for definite integrals are a consequence of the corresponding rules for indefinite integrals: Let f and g be continuous functions on [a,b] and let k be a constant. Then: 1. Zb a k f (x) dx = k Zb a f (x) dx 2. Zb a (f (x)+ g(x)) dx = Zb a f (x) dx + Zb a g(x) dx 3. Zb a (f (x)−g(x)) dx = Zb a f (x) dx − Zb a g(x) dx The following results for definite integrals are a consequence of the Fundamental Theorem of Calculus: Let f be a continuous function on [a,b] and suppose that a < c < b. Then: (1) Za a f (x) dx = 0 (2) Za b f (x) dx = − Zb a f (x) dx (3) Zb a f (x) dx = Zc a f (x) dx + Zb c f (x) dx For example, if F(x) is an antiderivative of f (x) on [a,b], then Zc a f (x) dx + Zb c f (x) dx = (F(c)−F(a)) + (F(b)−F(c)) = F(b) −F(a) = Zb a f (x) dx which proves rule (3). The following result is a consequence of Part I of the Fundamental Theorem of Calculus along with the Chain Rule: Chain Rule for integrals: Let f be a continuous function on an interval I containing x = a, and let g(x) be a differentiable function on I. If F(x) = Zg(x) a f (t) dt for all x in I then F′(x) = f (g(x))· g′(x) for all x in I.
ElementaryCalculus_Page_154_Chunk3689
The Fundamental Theorem of Calculus • Section 5.3 145 Example 5.15 Let F(x) = Zx2 0 e−t2 dt for all x > 0. Find F′(x). Solution: By the Chain Rule for integrals, with f (t) = et2 and g(x) = x2: F′(x) = f (g(x))· g′(x) = e−(x2)2 ·(2x) = 2x e−x4 Exercises A For Exercises 1-12, evaluate the given definite integral. 1. Z1 0 x2 dx 2. Z1 −1 x2 dx 3. Z1 0 x3 dx 4. Z1 −1 (x2 +3x−4) dx 5. Z2 1 1 x2 dx 6. Z3 2 1 x3 dx 7. Zπ/2 0 cos x dx 8. Z1 0 ex dx 9. Z1 −1 2ex dx 10. Zπ −π sin x dx 11. Z4 0 p x dx 12. Z2 −2 x3 ex2 cos 2x dx 13. Show that ln x = Zx 1 1 t dt for all x > 0. 14. Show that Za b f (x) dx = − Zb a f (x) dx. 15. Given f (x) = Zx 1 t p t4 +1 dt , find f ′(3) and f ′(−2). B 16. Prove the Chain Rule for integrals. 17. Explain why for any continuous function f on [a,b], ¯¯¯¯ Zb a f (x) dx ¯¯¯¯ ≤ Zb a | f (x)| dx . 18. Explain why if f (x) ≤g(x) on [a,b] then Zb a f (x) dx ≤ Zb a g(x) dx . C 19. Show that if f (x) is continuous on [a,b] then there is a number c in (a,b) such that Zb a f (x) dx = f (c)·(b−a) . 20. Let f (t) be a continuous function for all t ≥0, and for each x ≥0 define a function g(x) by g(x) = Zx 0 (x−t) f (t) dt . Show that g′(x) = Zx 0 f (t) dt for all x ≥0. 21. Show that for all x > 0, Zx 0 dt 1+ t2 + Z1/x 0 dt 1+ t2 is independent of x.
ElementaryCalculus_Page_155_Chunk3690
146 Chapter 5 • The Integral §5.4 5.4 Integration by Substitution The integrals encountered so far—whether indefinite or definite—have been the simplest kind, since the antiderivatives had known formulas. For example, R cos x dx = sin x+C. What if the integral were R cos 2x dx instead? No formula has been discussed yet for this integral, and the answer is not sin 2x+C, since the derivative of sin 2x is 2cos 2x, not cos 2x. But dividing sin 2x by 2 first and then taking the derivative would yield cos 2x, so that R cos 2x dx = 1 2 sin 2x+C. Evaluating an integral in such a manner is often done when the function is not too compli- cated, as the one above. Usually it will not be quite that simple, and so a general technique called substitution is needed. The idea behind substitution is to replace part of the function being integrated by a new variable—typically u—so that a complicated function of x is now a simpler function of u that you know how to integrate. Example 5.16 Evaluate Z cos 2x dx by substitution. Solution: The 2x in the cosine function is what makes this integral unknown, so replace it by u: let u = 2x. The integral is now Z cos u dx which is a problem because the point of doing substitution is to eliminate all references to the variable x, including in the infinitesimal dx. The entire integral needs to be in terms of u and du, but the dx is still there. So put dx in terms of du: u = 2x ⇒ du = 2dx ⇒ dx = 1 2 du The integral now becomes Z cos u µ1 2 du ¶ = 1 2 Z cos u du = 1 2 sin u + C by the formula already known, just with the letter u as the variable instead of x. The original integral was in terms of x, so the final answer—for an indefinite integral—should also be in terms of x. Thus, the final step is to substitute back into the answer what u equals in terms of x, namely 2x: Z cos 2x dx = 1 2 sin u + C = 1 2 sin 2x + C If the procedure in the above example seems similar to making a substitution when using the Chain Rule to take a derivative, that is because it is similar: you are basically doing the same thing only in reverse. Just as for differentiation, it is not always obvious what part of the function is the best candidate for substitution when performing integration. There is one obvious rule: never make the substitution u = x, because that changes nothing.
ElementaryCalculus_Page_156_Chunk3691
Integration by Substitution • Section 5.4 147 Example 5.17 Evaluate Z e−3x dx. Solution: The −3x in the exponential function is what makes this integral unknown, so make the substitution u = −3x, which means that du = −3dx, and so dx = −1 3du. Thus: Z e−3x dx = Z eu µ −1 3 du ¶ = −1 3 Z eu du = −1 3 eu + C = −1 3 e−3x + C The above example can be generalized as follows: Z eax dx = 1 a eax + C for any constant a ̸= 0 Example 5.17 was the special case with a = −3. Example 5.18 Evaluate Z (1+4x)5 dx. Solution: You might be tempted to make the substitution u = 4x, but that would then require finding the integral of (1+ u)5, for which there is not yet any formula. But there is a formula for the integral of u5. Hence, let u = 1+4x, so that du = 4dx ⇒dx = 1 4du. Thus: Z (1+4x)5 dx = 1 4 Z u5 du = 1 4 u6 6 + C = 1 24 (1+4x)6 + C Example 5.19 Evaluate Z 2x ex2 dx. Solution: It might be unclear whether you should make the substitution u = 2x or u = x2, but the hint here is that the derivative of the x2 inside the exponential function is 2x, which appears outside the exponential function. Indeed, you could check that letting u = 2x would result in an integral no simpler than the current one (namely, 1 2 R u eu2/4 du). So let u = x2, which means du = 2xdx. Thus: Z 2x ex2 dx = Z eu du = eu + C = ex2 + C Example 5.20 Evaluate Z x p 1+3x2 dx. Solution: Note that the derivative of the 1 + 3x2 term inside the square root function is 6x, which is almost the function x outside the square root—all that is missing is the constant multiple 6. That is a hint to let u = 1+3x2. Notice also that du = 6xdx ⇒xdx = 1 6 du, and xdx is the remaining part of the integral outside the square root. Thus: Z x p 1+3x2 dx = 1 6 Z pu du = 1 6 u3/2 3/2 + C = 1 9 (1+3x2)3/2 + C
ElementaryCalculus_Page_157_Chunk3692
148 Chapter 5 • The Integral §5.4 Example 5.21 Evaluate Z x2 dx p x3 +9 . Solution: Let u = x3 +9, so that du = 3x2 dx ⇒x2 dx = 1 3 du. Thus: Z x2 dx p x3 +9 = Z 1 3 du pu = 1 3 Z u−1/2 du = 1 3 u1/2 1/2 + C = 2 3 p x3 +9 + C Example 5.22 Evaluate Z 2x dx x2 −1. Solution: Notice that the numerator 2x in the function is exactly the derivative of the denominator x2 −1. That is a hint to substitute on the denominator so that the integral is the natural logarithm function. Let u = x2 −1, so that du = 2xdx. Thus: Z 2x dx x2 −1 = Z du u = ln|u| + C = ln|x2 −1| + C Example 5.23 Evaluate Z tan x dx. Solution: Notice that tan x = sin x cos x and that the numerator sin x is almost the derivative of the denom- inator cos x; all that is missing is a negative sign. That is a hint to substitute on the denominator: u = cos x, so that du = −sin x dx ⇒sin x dx = −du. Thus: Z tan x dx = Z sin x cos x dx = Z −du u = −ln|u| + C = −ln|cos x| + C = ln|cos x|−1 + C = ln|sec x| + C Example 5.24 Evaluate Z sec x dx. Solution: Notice that Z sec x dx = Z sec x (sec x + tan x) sec x + tan x dx = Z sec x tan x + sec2 x sec x + tan x dx and that the numerator in the last integral is the derivative of the denominator: let u = sec x + tan x, so that du = (sec x tan x + sec2 x)dx. Thus: Z sec x dx = Z du u = ln|u| + C = ln|sec x + tan x| + C The following formulas are straightforward consequences of substitution and the derivatives of inverse trigonometric functions discussed in Section 2.2:
ElementaryCalculus_Page_158_Chunk3693
Integration by Substitution • Section 5.4 149 For any constant a > 0: Z dx p a2 −x2 = sin−1³ x a ´ + C (if |x| < a) (5.3) Z dx a2 + x2 = 1 a tan−1³ x a ´ + C (5.4) Z dx |x| p x2 −a2 = 1 a sec−1³ x a ´ + C (if |x| > a) (5.5) For example, to prove the second formula, recall that d dx ¡ tan−1 x ¢ = 1 1+x2 . Make the substi- tution u = x/a, so that x = au and dx = a du. Thus: Z dx a2 + x2 = Z a du a2 + a2u2 = 1 a Z du 1+ u2 = 1 a tan−1 u + C = 1 a tan−1³ x a ´ + C ✓ Example 5.25 Evaluate Z dx p 4−9x2 . Solution: The 4−9x2 inside the square root is almost of the form a2 −x2, except for the 9. The goal is to have u2 = 9x2, so let u = 3x, which means that dx = 1 3 du and u2 = 9x2. Thus, Z dx p 4−9x2 = 1 3 Z du p 4−u2 = 1 3 sin−1³ u 2 ´ + C = 1 3 sin−1 µ3x 2 ¶ + C by Formula (5.2) with a = 2. To use substitution with definite integrals, follow the same procedure as with indefinite integrals but add one extra step: replace the limits of integration x = a and x = b in the original integral Rb a f (x)dx by u = g(a) and u = g(b), respectively, in the new integral involving u, where u = g(x) is your substitution. Example 5.26 Evaluate Z2 1 (2x+1)3 dx. Solution: Let u = g(x) = 2x+1, which means that dx = 1 2 du. The upper limit of integration x = 2 becomes u = g(2) = 2(2) + 1 = 5 in the new u-based integral, while the lower limit of integration x = 1 becomes u = g(1) = 2(1)+1 = 3. Thus: Z2 1 (2x+1)3 dx = 1 2 Z5 3 u3 du = 1 8 u4 ¯¯¯¯ 5 3 = 1 8 (54 −34) = 68 Note that you could have put everything back in terms of x at the end, but there was no need to since you would get the same numerical answer.
ElementaryCalculus_Page_159_Chunk3694
150 Chapter 5 • The Integral §5.4 The following property of definite integrals comes in handy for evaluating certain types of definite integrals: For any constant a, Za 0 f (x) dx = Za 0 f (a−x) dx . (5.6) This is simple to prove, using the substitution u = a−x, so x = a−u and dx = −du, while x = 0 becomes u = a and x = a becomes u = 0 in the limits of integration: Za 0 f (x) dx = − Z0 a f (a−u) du = Za 0 f (a−u) du = Za 0 f (a−x) dx ✓ Example 5.27 Evaluate Zπ 0 x sin x 1+cos2 x dx. Solution: Let I = Zπ 0 x sin x 1+cos2 x dx. Then by the above property (with a = π): I = Zπ 0 (π−x) sin(π−x) 1+cos2(π−x) dx = Zπ 0 (π−x) sin x 1+cos2 x dx = π Zπ 0 sin x 1+cos2 x dx − Zπ 0 x sin x 1+cos2 x dx I = π Zπ 0 sin x 1+cos2 x dx −I 2I = π Zπ 0 sin x 1+cos2 x dx = −π tan−1(cos x) ¯¯¯¯ π 0 = −π ³ −π 4 −π 4 ´ = π2 2 I = π2 4 Exercises A For Exercises 1-24 evaluate the given integral. 1. Z (3cos 5x + 4sin 5x) dx 2. Z e2x + e−2x 2 dx 3. Z³ xe−x2 + x2 cos x3´ dx 4. Z x −2 x2 −4x + 9 dx 5. Z ex 1 + ex dx 6. Z 1 1 + ex dx 7. Z x p x+4 dx 8. Z cos2 x dx 9. Z tan2 x dx 10. Z 3 p 4 −25x2 dx 11. Z 3 4 + 25x2 dx 12. Z sin2 x cos3 x dx
ElementaryCalculus_Page_160_Chunk3695
Integration by Substitution • Section 5.4 151 13. Z1 0 (2x+1)3 dx 14. Z1 0 (2x−1)3 dx 15. Z8 0 x p 1+ x dx 16. Zπ/2 0 4 sin(x/2) dx 17. Zπ/4 0 4 sin x cos x dx 18. Zpπ 0 5x cos(x2) dx 19. Z−1 −2 x (x2 +2)3 dx 20. Zln 3 −ln 3 ex ex +4 dx 21. Z3 1 dx px (x+1) 22. Z1 −1 x2 dx p x3 +9 23. Z2 1 dx x2 −6x+9 24. Z3 −3 x5 dx ex2 25. Evaluate the indefinite integral Z sin x cos x dx three different ways: (a) Use the substitution u = sin x. (b) Use the substitution u = cos x. (c) Use the trigonometric identity 2sin x cos x = sin 2x. (d) Are the three answers from parts (a)-(c) actually different? Explain. 26. For all positive constants L, show the following: (a) ZL 0 ³ 1 −x L ´2 dx = L 3 (b) ZL/2 −L/2 µ1 2 −x L ¶2 dx = L 3 (c) ZL 0 ³ 1 −x L ´3 ³ x L ´2 dx = L 60 B 27. Recall from trigonometry that sin2 x = 1 2 (1 −cos 2x) for all x. (a) Use the Fundamental Theorem of Calculus to evaluate Zπ 0 sin2 x dx . (b) Approximate the integral from part (a) by dividing the interval [0,π] into n = 2 subintervals of equal length, [0,π/2] and [π/2,π], and finding the exact value of the sum of the areas of the rectangles whose heights are determined at the right endpoints of the subintervals. (c) Repeat part (b) with n = 3. (d) Repeat part (b) with n = 4. (e) Repeat part (b) with n = 6. 28. Show that R csc x dx = −ln|csc x + cot x| + C. (Hint: See Example 5.24.) C 29. Use the property Ra 0 f (x) dx = Ra 0 f (a−x) dx to show that Zπ/2 0 sin2 x sin x+cos x dx = 1 p 2 ln ³p 2+1 ´ . (Hint: Use Exercise 28 and the sine addition formula.)
ElementaryCalculus_Page_161_Chunk3696
152 Chapter 5 • The Integral §5.5 5.5 Improper Integrals Definite integrals so far have been defined only for continuous functions over finite closed intervals. There are times when you will need to perform integration despite those conditions not being met. For example, in quantum mechanics the Dirac delta function4 δ is defined on R by four properties: x y 0 ∞ Figure 5.5.1 y = δ(x) (1): δ(x) = 0 for all x ̸= 0 (2): δ(0) = ∞ (3): Z∞ −∞ δ(x) dx = 1 (4): For any continuous function f on R, Z∞ −∞ f (x) δ(x) dx = f (0). Properties (3) and (4) provide examples of one type of improper integral: an integral over an infinite interval (in this case the entire real line R = (−∞,∞)). Define this type of improper integral as follows: For a continuous function f and a real number a, define the improper integral of f over [a,∞) by Z∞ a f (x) dx = lim b→∞ Zb a f (x) dx , define the improper integral of f over (−∞,a] by Za −∞ f (x) dx = lim b→−∞ Za b f (x) dx , and define the improper integral of f over (−∞,∞) by Z∞ −∞ f (x) dx = Zc −∞ f (x) dx + Z∞ c f (x) dx , for any real number c (typically c = 0). If the given limit exists (i.e. is a real number) then the improper integral is convergent; otherwise it is divergent. 4Created by the physicist P.A.M. Dirac (1902-1984), who won a Nobel Prize in physics in 1933. The function is neither real-valued nor continuous at x = 0. The “graph” in Figure 5.5.1 is perhaps misleading, as ∞is not an actual point on the y-axis. One interpretation is that δ is an abstraction of an instantaneous pulse or burst of something, preceded and followed by nothing. To learn more about this fascinating and useful function, see §15 in DIRAC, P.A.M., The Principles of Quantum Mechanics, 4th ed., Oxford, UK: Oxford University Press, 1958.
ElementaryCalculus_Page_162_Chunk3697
Improper Integrals • Section 5.5 153 The limits in the above definitions are always taken after evaluating the integral inside the limit. Just as for “proper” definite integrals, improper integrals can be interpreted as representing the area under a curve. Example 5.28 Evaluate Z∞ 1 dx x . y x 0 1 y = 1 x Solution: For all real numbers b > 1, Z∞ 1 dx x = lim b→∞ Zb 1 dx x = lim b→∞ à ln x ¯¯¯¯ b 1 ! = lim b→∞(ln b −ln 1) = lim b→∞b = ∞ and so the integral is divergent. This means that the area under the curve y = 1/x over the interval [1,∞)—as shown in the graph above—is infinite. Example 5.29 Evaluate Z∞ 1 dx x2 . y x 0 1 y = 1 x2 Solution: For all real numbers b > 1, Z∞ 1 dx x2 = lim b→∞ Zb 1 dx x2 = lim b→∞ à −1 x ¯¯¯¯ b 1 ! = lim b→∞ µ −1 b − µ −1 1 ¶¶ = lim b→∞ µ 1 −1 b ¶ = 1 −0 = 1 . This means that the area under the curve y = 1/x2 over the interval [1,∞)—as shown in the graph above—equals 1. Thus, an infinite region can have a finite area. Length and area are different and not necessarily related concepts, as this example illustrates. Notice that y = 1/x2 approaches the x-axis asymptote much faster than y = 1/x does—fast enough to make the integral convergent. Example 5.30 Evaluate Z0 −∞ ex dx . y x 0 y = ex Solution: For all real numbers b < 0, Z0 −∞ ex dx = lim b→−∞ Z0 b ex dx = lim b→−∞ à ex ¯¯¯¯ 0 b ! = lim b→−∞(1 −eb) = 1 −0 = 1 . This means that the area under the curve y = ex over the interval (−∞,0]—as shown in the graph above—equals 1.
ElementaryCalculus_Page_163_Chunk3698
154 Chapter 5 • The Integral §5.5 Example 5.31 Evaluate Z∞ 0 sin x dx . y x 0 2π 1 −1 y = sin x Solution: Since Z∞ 0 sin x dx = lim b→∞ Zb 0 sin x dx = lim b→∞ à −cos x ¯¯¯¯ b 0 ! = lim b→∞(−cos b + 1) then the integral is divergent, since limb→∞cos b does not exist (cosb oscillates between 1 and -1). This means that the net area over [0,∞)—counted as positive above the x-axis and negative below—is indeterminate. Example 5.32 Evaluate Z∞ −∞ dx 1+ x2 . y x 0 y = 1 1+x2 Solution: Split the integral at x = 0: Z∞ −∞ dx 1+ x2 = Z0 −∞ dx 1+ x2 + Z∞ 0 dx 1+ x2 = µ lim b→−∞ Z0 b dx 1+ x2 ¶ + µ lim b→∞ Zb 0 dx 1+ x2 ¶ = à lim b→−∞tan−1 x ¯¯¯¯ 0 b ! + à lim b→∞tan−1 x ¯¯¯¯ b 0 ! = lim b→−∞(tan−1 0 −tan−1 b) + lim b→∞(tan−1 b −tan−1 0) = (0−(−π/2)) + (π/2−0) = π This means that the area under the curve y = 1 1+x2 over the entire real line (−∞,∞)—as shown in the graph above—equals π. Note that if the integral were split at any number c then the answer would be the same. Another way to evaluate the integral would have been to use the symmetry around the y-axis—as f (x) = 1 1+x2 is an even function—so that Z∞ −∞ dx 1+ x2 = 2 Z∞ 0 dx 1+ x2 = ··· = 2(π/2−0) = π . Since the integrand is continuous over R, a common way of evaluating the integral—especially among students—is to simply use ±∞as actual limits of integration, thus avoiding the need to take a limit: Z∞ −∞ dx 1+ x2 = tan−1 x ¯¯¯¯ ∞ −∞ = tan−1(∞) −tan−1(−∞) = π 2 −−π 2 = π This type of shortcut is fine as long as you are aware of what plugging x = ±∞into tan−1 x actually means, and that there are no numbers for which the integrand is undefined (which would yield an improper integral of a different type, to be discussed shortly).
ElementaryCalculus_Page_164_Chunk3699
Improper Integrals • Section 5.5 155 The second type of improper integral is of a function not continuous or not bounded over its interval of integration. For example, the integral in property (3) of the Dirac delta function is of that type, since δ is discontinuous at x = 0. Define this type of improper integral as follows: For a function f that is continuous on [a,b) but has either a discontinuity or vertical asymp- tote at x = b, define the improper integral of f over [a,b) by Zb a f (x) dx = lim c→b− Zc a f (x) dx . Likewise, if f is continuous on (a,b] but has either a discontinuity or vertical asymptote at x = a, then define the improper integral of f over (a,b] by Zb a f (x) dx = lim c→a+ Zb c f (x) dx . If f is continuous on [a,b] but has either a discontinuity or vertical asymptote at x = c for a < c < b, then define the improper integral of f over [a,b] by Zb a f (x) dx = Zc a f (x) dx + Zb c f (x) dx , where the integrals on the right are evaluated as in the first two definitions. If the given limit exists (i.e. is a real number) then the improper integral is convergent; otherwise it is divergent. Adjust these definitions accordingly for infinite intervals—e.g. [a,∞), (−∞,b], or (−∞,∞)—to be consistent with the definitions of improper integrals of that type. Example 5.33 Evaluate Z1 0 dx x . y x 0 1 y = 1 x Solution: Since x = 0 is a vertical asymptote for y = 1 x, Z1 0 dx x = lim c→0+ Z1 c dx x = lim c→0+ à ln x ¯¯¯¯ 1 c ! = lim c→0+ (ln 1 −ln c) = 0 −(−∞) = ∞ and so the integral is divergent. This means that the area under the curve y = 1/x over the interval (0,1]—as shown in the graph above—is infinite. The region is infinite in the y direction.
ElementaryCalculus_Page_165_Chunk3700