This section does two things. One is to compute the derivatives of sin x and cos x. The other is to explain why these functions are so important. They describe oscillation, which will be expressed in words and equations. You will see a "differential equation." It involves the derivative of an unknown function y(x).
The differential equation will say that the second derivative—the derivative of the derivative—is equal and opposite to y. In symbols this is y" = -y. Distance in one direction leads to acceleration in the other direction. That makes y and y' and y" all oscillate. The solutions to y" = -y are sin x and cos x and all their combinations.
We begin with the slope. The derivative of y = sin x is y' = cos x. There is no reason for that to be a mystery, but I still find it beautiful. Chapter 1 followed a ball around a circle; the shadow went up and down. Its height was sin t and its velocity was cos t. We now find that derivative by the standard method of limits, when y(x) =sin x:
dy/dx = limit of Δy ⁄ Δ = limh→0 (sin (x+h) − sin x) ⁄ h. (1)
The sine is harder to work with than x² or x³. Where we had (x+h)² or (x+h)³, we now have sin(x+h). This calls for one of the basic "addition formulas" from trigonometry, reviewed in Section 1.5:
sin (x+h) = sin x cos h + cos x sin h (2)
cos (x+h) = cos x cos h − sin x sin h. (3)
Equation (2) puts Ay = sin (x+h) − sin x in a new form:
Δy ⁄ Δx = (sin x cos h + cos x sin h) ⁄ h = sin x{(cos h &minus 1) ⁄ h} + cos x(sin h ⁄ h). (4)
The ratio splits into two simpler pieces on the right. Algebra and trigonometry got us this far, and now comes the calculus problem. What happens as h → O? It is no longer easy to divide by h. (I will not even mention the unspeakable crime of writing (sin h)/h = sin.) There are two critically important limits—the first is zero and the second is one:
limh→O (cos h &minus 1) ⁄ h = 0 and limh→O sin h ⁄ h = 1. (5)
The careful reader will object that limits have not been defined! You may further object to computing these limits separately, before combining them into equation (4). Nevertheless—following the principle of ideas now, rigor later—I would like to proceed. It is entirely true that the limit of (4) comes from the two limits in (5):
dy/dx = (sin x)(first limit) + (cos x)(second limit) = 0 + cos x. (6)
The secant slope Δy/Δx has approached the tangent slope dy/dx.
2G The derivative of y = sin x is dy/dx = cos x.
[Fig. 2.8]
We cannot pass over the crucial step—the two limits in (5). They contain the real ideas. Both ratios become 0/0 if we just substitute h = 0. Remember that the cosine of a zero angle is 1, and the sine of a zero angle is 0. Figure 2.8a shows a small angle h (as near to zero as we could reasonably draw). The edge of length sin h is close to .995 zero, and the edge of length cos h is near 1. Figure 2.8b shows how the ratio of sin h to h (both headed for zero) gives the slope of the sine curve at the start.
When two functions approach zero, their ratio might do anything. We might have
h²/h → 0 or h/h → 1 or √h/h → ∞
No clue comes from 0/0. What matters is whether the top or bottom goes to zero more quickly. Roughly speaking, we want to show that (cos h −1)/h is like h²/h and (sin h)/h is like h/h.
Time out The graph of sin x is in Figure 2.9 (in black). The graph of sin(x+Δx) sits just beside it (in red). The height difference is Δƒ when the shift distance is Δx.
[Fig. 2.9]
Now divide by that small number Δx (or h). The second figure shows Δƒ/Δx. It is close to cos x. (Look how it starts—it is not quite cos x.) Mathematics will prove that the limit is cos x exactly, when Δx → 0. Curiously, the reasoning concentrates on only one point (x = 0). The slope at that point is cos 0 = 1.
We now prove this: sin Δx divided by Δx goes to 1. The sine curve starts with slope 1. By the addition formula for sin (x + h), this answer at one point will lead to the slope cos x at all points.
Question Why does the graph of ƒ(x + Δx) shift left from ƒ(x) when Δx > O?
Answer When x = 0, the shifted graph is already showing ƒ(Δx). In Figure 2.9a, the red graph is shifted left from the black graph. The red graph shows sin h when the black graph shows sin 0.
There are several ways to find this limit. The direct approach is to let a computer draw a graph. Figure 2.10a is very convincing. The function (sin h)/h approaches 1at the key point h = 0. So does (tan h)/h. In practice, the only danger is that you might get a message like "undefined function" and no graph. (The machine may refuse to divide by zero at h = 0. Probably you can get around that.) Because of the importance of this limit, I want to give a mathematical proof that it equals 1.
[Fig. 2.10]
Figure 2.10b indicates, but still only graphically, that sin h stays below h. (The first graph shows that too; (sin h)/h is below 1.) We also see that tan h stays above h. Remember that the tangent is the ratio of sine to cosine. Dividing by the cosine is enough to push the tangent above h. The crucial inequalities (to be proved when h is small and positive) are
sin h < h and tan h > h. (7)
Since tan h = (sin h)/(cos h), those are the same as
(sin h)/h < 1 and (sin h)/h > cos h.
What happens as h goes to zero? The ratio (sin h)/h is squeezed between cos h and 1. But cos h is approaching 1! The squeeze as h → 0 leaves only one possibility for (sin h)/h, which is caught in between: The ratio (sin h)/h approaches 1.
Figure 2.10 shows that "squeeze play." If two functions approach the same limit, so does any function caught in between. This is proved at the end of Section 2.6.
For negative values of h, which are absolutely allowed, the result is the same. To the left of zero, h reverses sign and sin h reverses sign. The ratio (sin h)/h is unchanged. (The sine is an odd function: sin (-h) = -sin h.) The ratio is an even function, symmetric around zero and approaching 1 from both sides.
The proof depends on sin h < h < tan h, which is displayed by the graph but not explained. We go back to right triangles.
[Fig. 2.11]
Figure 2.11a shows why sin h < h. The straight line PQ has length 2 sin h. The circular arc must be longer, because the shortest distance between two points is a straight line.* The arc PQ has length 2h. (Important: When the radius is 1, the arc length equals the angle. The full circumference is 2n and the full angle is also 2n.) The straight distance 2 sin h is less than the circular distance 2h, so sin h < h.
Figure 2.1 1b shows why h < tan h. This time we look at areas. The triangular area is ½(base)(height)= ½(1)(tan h). Inside that triangle is the shaded sector of the circle. Its area is h/2π times the area of the whole circle (because the angle is that fraction of the whole angle). The circle has area πr² = π, so multiplication by h/2π gives fh for the area of the sector. Comparing with the triangle around it, ½ tan h > ½h.
The inequalities sin h < h < tan h are now proved. The squeeze in equation (8) produces (sin h)/h → 1. Q.E.D. Problem 13 shows how to prove sin h < h from areas.
Note All angles x and h are being measured in radians. In degrees, cos x is not the derivative of sin x. A degree is much less than a radian, and dyldx is reduced by the factor 2π/360.
This second limit is different. We will show that 1 − cos h shrinks to zero more quickly than h. Cosines are connected to sines by (sin h)² + (cos h)² = 1. We start from the known fact sin h < h and work it into a form involving cosines:
(1 − cos h)(1 + cos h) = 1 − (cos h)² = (sin h)² < h². (9)
Note that everything is positive. Divide through by h and also by 1 + cos h:
0 < (1 − cos h) ⁄ h < h ⁄ (1 + cos h). (10)
Our ratio is caught in the middle. The right side goes to zero because h → 0. This is another "squeeze"—there is no escape. Our ratio goes to zero.
For cos h − 1 or for negative h, the signs change but minus zero is still zero. This confirms equation (6). The slope of sin x is cos x.
Remark Equation (10) also shows that 1 − cos h is approximately ½h². The 2 comes from 1 + cos h. This is a basic purpose of calculus—to find simple approximations like ½h². A "tangent parabola" 1 − ½h² is close to the top of the cosine curve.
This will be easy. The quick way to differentiate cos x is to shift the sine curve by π/2. That yields the cosine curve (solid line in Figure 2.12b). The derivative also shifts by π/2 (dotted line). The derivative of cos x is -sin x.
Notice how the dotted line (the slope) goes below zero when the solid line turns downward. The slope equals zero when the solid line is level. Increasing functions have positive slopes. Decreasing functions have negative slopes. That is important, and we return to it.
There is more information in dyldx than "function rising" or "function falling." The slope tells how quickly the function goes up or down. It gives the rate of change. The slope of y = cos x can be computed in the normal way, as the limit of Δy/Δx:
Δy ⁄ Δx = (cos (x+h) − cos x) ⁄ h = cos x((cos h − 1) ⁄ h) &minus sin x(sin h ⁄ h)
dy/dx = (cos x)(0) − (sin x)(1) = -sin x. (11)
The first line came from formula (3) for cos(x+h). The second line took limits, reaching 0 and 1 as before. This confirms the graphical proof that the slope of cos x is -sin x.
[Fig. 2.12]
We now introduce the derivative of the derivative. That is the second derivative of the original function. It tells how fast the slope is changing, not how fast y itself is changing. The second derivative is the "rate of change of the velocity." A straight line has constant slope (constant velocity), so its second derivative is zero:
ƒ(t) = 5t has dƒ/dt = 5 and d²ƒ/dt² = 0.
The parabola y = x² has slope 2x (linear) which has slope 2 (constant). Similarly
ƒ(t) = ½at² has dƒ/dt = at and d²ƒ/dt² = a.
There stands the notation d²ƒ/dt² (or d²y/dx²) for the second derivative. A short form is ƒ" or y". (This is pronounced ƒ double prime or y double prime). Example: The second derivative of y = x³ is y" = 6x.
In the distance-velocity problem, ƒ" is acceleration. It tells how fast v is changing, while v tells how fast ƒ is changing. Where dƒ/dt was distanceltime, the second derivative is distance/(time)². The acceleration due to gravity is about 32 ft/sec² or 9.8 m/sec², which means that v increases by 32 ftlsec in one second. It does not mean that the distance increases by 32 feet!
The graph of y = sin t increases at the start. Its derivative cos t is positive. However the second derivative is -sin t. The curve is bending down while going up. The arch is "concave down" because y" = -sin t is negative.
At t = π the curve reaches zero and goes negative. The second derivative becomes positive. Now the curve bends upward. The lower arch is "concave up."
y" > 0 means that y' increases so y bends upward (concave up)
y" < 0 means that y' decreases so y bends down (concave down).
Chapter 3 studies these things properly—here we get an advance look for sin t.
The remarkable fact about the sine and cosine is that y" = -y. That is unusual and special: acceleration = -distance. The greater the distance, the greater the force pulling back:
y = sin t has dy/dt = +cos t and d²y/dt² = -sin t = -y.
y = cos t has dy/dt = -sin t and d²y/dt² = -cos t = -y.
Question Does d²y/dt² < 0 mean that the distance y(t) is decreasing?
Answer No. Absolutely not! It means that dy/dt is decreasing, not necessarily y. At the start of the sine curve, y is still increasing but y" < 0.
Sines and cosines give simple harmonic motion—up and down, forward and back, out and in, tension and compression. Stretch a spring, and the restoring force pulls it back. Push a swing up, and gravity brings it down. These motions are controlled by a differential equation:
d²y ⁄ dt² = -y. (12)
All solutions are combinations of the sine and cosine: y = A sin t + B cos t.
This is not a course on differential equations. But you have to see the purpose of calculus. It models events by equations. It models oscillation by equation (12). Your heart fills and empties. Balls bounce. Current alternates. The economy goes up and down:
high prices → high production → low prices → …
We can't live without oscillations (or differential equations).