Differentiation of Trigonometric Functions
Difference Equations
to
Differential Equations
Section 3.5
Differentiation of Trigonometric
Functions
We now take up the question of differentiating the trigonometric functions. We will start
with the sine function. From Section 3.2, we know that
d
sin(x + h) − sin(x)
sin(x) = lim
.
h→0
dx
h
(3.5.1)
From the addition formula for sine we have
sin(x + h) = sin(x) cos(h) + sin(h) cos(x),
(3.5.2)
d
sin(x) cos(h) + sin(h) cos(x) − sin(x)
sin(x) = lim
.
h→0
dx
h
(3.5.3)
and so (3.5.1) becomes
Now
sin(x) cos(h) + sin(h) cos(x) − sin(x)
sin(x)(cos(h) − 1) + cos(x) sin(h)
=
h
h
cos(h) − 1
sin(h)
= sin(x)
+ cos(x)
.
h
h
Thus
d
cos(h) − 1
sin(h)
sin(x) = sin(x) lim
+ cos(x) lim
.
h→0
h→0
dx
h
h
(3.5.4)
Our problem then comes down to evaluating the two limits in (3.5.4). The second of these
turns out to be the key, so we will begin with it.
For 0 < h < π2 , consider the point C = (cos(h), sin(h)) on the unit circle centered at
the origin. We first repeat an argument from Section 2.4 to show that sin(h) < h: If we
let A = (0, 0) and B = (1, 0), as in Figure 3.5.1, then the area of 4ABC is
1
sin(h).
2
h
The area of the sector of the circle cut off by the arc from B to C is the fraction 2π
of the
area of the entire circle; hence, this area is
h
h
π= .
2π
2
1
Copyright c by Dan Sloughter 2000
2
Differentiation of Trigonometric Functions
Section 3.5
(0, 1)
D
C
h
B
A
(1, 0)
Figure 3.5.1
Since 4ABC is contained in this section, we have
1
h
sin(h) < ,
2
2
(3.5.5)
sin(h) < h.
(3.5.6)
or simply
Now let D = (1, tan(h)), the point where the line passing through A and C intersects
the line perpendicular to the x-axis passing through B. Then 4ABD has area
1
sin(h)
tan(h) =
.
2
2 cos(h)
Since 4ABD contains the sector of the circle considered above, we have
h
sin(h)
<
,
2
2 cos(h)
(3.5.7)
sin(h)
.
cos(h)
(3.5.8)
or
h<
Putting inequalities (3.5.6) and (3.5.8) together gives us
sin(h)
.
cos(h)
(3.5.9)
h
1
<
,
sin(h)
cos(h)
(3.5.10)
sin(h) < h <
Dividing through by sin(h) yields
1<
Section 3.5
Differentiation of Trigonometric Functions
3
which, after taking reciprocals, gives us
1>
sin(h)
> cos(h).
h
(3.5.11)
Now, finally, we can see where all of this has been heading. Since
lim cos(h) = 1,
h→0+
(3.5.11) implies that we must have
lim+
h→0
sin(h)
= 1.
h
(3.5.12)
To check the limit from the other side, we make use of the identity sin(−x) = − sin(x).
Letting t = −h, we have
lim−
h→0
sin(h)
− sin(h)
sin(−h)
sin(t)
= 1.
= lim−
= lim−
= lim+
h
−h
−h
t
h→0
h→0
t→0
(3.5.13)
Together (3.5.12) and (3.5.13) give us the following proposition.
Proposition
sin(h)
= 1.
h→0
h
lim
(3.5.14)
With this result, we may now compute
1 − cos(h)
1 + cos(h)
h
1 + cos(h)
2
1 − cos (h)
= lim
h→0 h(1 + cos(h))
1 − cos(h)
= lim
lim
h→0
h→0
h
sin2 (h)
h→0 h(1 + cos(h))
sin(h)
sin(h)
= lim
h→0
h
1 + cos(h)
sin(h)
sin(h)
= lim
lim
h→0
h h→0 1 + cos(h)
0
= (1)
= 0.
2
= lim
Proposition
1 − cos(h)
= 0.
h→0
h
lim
(3.5.15)
4
Differentiation of Trigonometric Functions
Section 3.5
Of course, from (3.5.15) we have
1 − cos(h)
cos(h) − 1
= − lim
= 0.
h→0
h→0
h
h
lim
(3.5.16)
Putting (3.5.14) and (3.5.16) into (3.5.4) gives us
cos(h) − 1
sin(h)
d
sin(x) = sin(x) lim
+ cos(x) lim
h→0
h→0
dx
h
h
= sin(x)(0) + cos(x)(1)
= cos(x).
Proposition
The function f (x) = sin(x) is differentiable for all x in (−∞, ∞) with
d
sin(x) = cos(x).
dx
(3.5.17)
The derivatives of the other trigonometric functions now follow with the help of some
basic identities. Since cos(x) = sin(x + π2 ) and cos(x + π2 ) = − sin(x), it follows that
d
d
π
π d
π
π
cos(x) =
sin x +
= cos x +
x+
= cos x +
= − sin(x).
dx
dx
2
2 dx
2
2
The other four derivatives are as follows:
d sin(x)
d
tan(x) =
dx
dx cos(x)
d
d
cos(x) sin(x) − sin(x) cos(x)
dx
dx
=
cos2 (x)
cos(x) cos(x) − sin(x)(− sin(x))
=
cos2 (x)
cos2 (x) + sin2 (x)
cos2 (x)
1
=
cos2 (x)
=
= sec2 (x),
cos(x)
sin(x)
d
d
sin(x) cos(x) − cos(x) sin(x)
dx
dx
=
sin2 (x)
d
d
cot(x) =
dx
dx
Section 3.5
Differentiation of Trigonometric Functions
=
5
sin(x)(− sin(x)) − cos(x) cos(x)
sin2 (x)
−(sin2 (x) + cos2 (x))
=
sin2 (x)
1
=− 2
sin (x)
= − csc2 (x),
d
d
sec(x) =
(cos(x))−1
dx
dx
d
= −(cos(x))−2
cos(x)
dx
sin(x)
=
cos2 (x)
1
sin(x)
=
cos(x)
cos(x)
= sec(x) tan(x),
and
d
d
csc(x) =
(sin(x))−1
dx
dx
d
sin(x)
= −(sin(x))−2
dx
cos(x)
=− 2
sin (x)
1
cos(x)
=−
sin(x)
sin(x)
= csc(x) cot(x).
The next proposition summarizes these results.
Proposition
The derivatives of the trigonometric functions are as follows:
d
sin(x) = cos(x)
dx
d
cos(x) = − sin(x)
dx
d
tan(x) = sec2 (x)
dx
d
cot(x) = − csc2 (x)
dx
d
sec(x) = sec(x) tan(x)
dx
d
csc(x) = − csc(x) cot(x)
dx
(3.5.18)
(3.5.19)
(3.5.20)
(3.5.21)
(3.5.22)
(3.5.23)
6
Differentiation of Trigonometric Functions
Example
Section 3.5
Using the chain rule, we have
d
d
sin(2x) = cos(2x) (2x) = 2 cos(2x).
dx
dx
Example
Using the product rule followed by the chain rule, we have
d
d
d
(3 sin(5x) cos(4x)) = 3 sin(5x) cos(4x) + 3 cos(4x) sin(5x)
dx
dx
dx
d
d
= 3 sin(5x)(− sin(4x) (4x)) + 3 cos(4x) cos(5x) (5x)
dx
dx
= −12 sin(5x) sin(4x) + 15 cos(4x) cos(5x).
Example
Using the chain rule twice, we have
d
d
sin2 (3x) = 2 sin(3x) sin(3x)
dx
dx
d
= 2 sin(3x) cos(3x) (3x)
dx
= 6 sin(3x) cos(3x).
Example
Using the product rule followed by the chain rule, we have
d 2
d
d
(t tan(2t)) = t2 tan(2t) + tan(2t) t2
dt
dt
dt
d
= t2 sec2 (2t) (2t) + 2t tan(2t)
dt
2
2
= 2t sec (2t) + 2t tan(2t).
Example
Using the chain rule twice, we have
d
d
sec3 (3z) = 3 sec2 (3z) sec(3z)
dz
dz
= 3 sec2 (3z) sec(3z) tan(3z)
d
(3z)
dz
= 9 sec3 (3z) tan(3z).
Example
If f (x) = 8 cot4 (3x2 ), then
f (x) = 32 cot3 (3x2 )
d
cot(3x2 )
dx
d
(3x2 ))
dx
= −192x cot3 (3x2 ) csc2 (3x2 ).
= 32 cot3 (3x2 )(− csc2 (3x2 )
Section 3.5
Differentiation of Trigonometric Functions
7
2
1.5
1
0.5
-4
2
-2
4
-0.5
-1
-1.5
-2
Figure 3.5.2 Graphs of y = sin(x) and y = x
Example If f (x) = sin(x), then f (0) = sin(0) = 0 and f 0 (0) = cos(0) = 1. Hence the
best affine approximation to f (x) = sin(x) at x = 0 is
T (x) = x.
This says that for small values of x, sin(x) ≈ x This fact is very useful in many applications
where an equation cannot be solved exactly because of the presence of a sine term, but can
be solved exactly once the approximation sin(x) ≈ x is made. For example, the formula
mentioned in Section 2.2 for the motion of a pendulum undergoing small oscillations was
derived after making this approximation. Without this approximation the underlying
equation cannot be solved exactly. See Figure 3.5.2 for the graphs of y = sin(x) and y = x.
Final comments on rules of differentiation
With the work of the last three sections we can now routinely differentiate any algebraic
function or any combination of an algebraic function with a trigonometric function. In
fact, the rules of these last three sections provide algorithms for differentiation which
may be incorporated into computer programs. Programs that are capable of performing
differentiation in this manner, as well as other types of algebraic procedures, are called
symbolic manipulation programs or computer algebra systems. These programs are very
useful when working with procedures that require exact knowledge of the formula for the
derivative of a given function.
Contrasted to symbolic differentiation is numerical differentiation. Numerical differentiation is performed when we approximate the derivative of a function at a specific point.
That is, whereas symbolic differentiation finds a formula for the derivative of a function,
which may then be evaluated at any point in its domain to find specific values, numerical
differentiation finds a single number which is used as an approximation to the value of the
derivative at one given point. For example, if we wish to approximate the derivative of a
function f at a point c, we might pick a small value of h, positive or negative, and compute
f 0 (c) ≈
f (c + h) − f (c)
.
h
(3.5.24)
8
Differentiation of Trigonometric Functions
Section 3.5
Of course, we need some procedure for deciding when h is small enough for (3.5.24) to give
an accurate estimate for f 0 (c). One technique is to use (3.5.24) repeatedly, cutting h in half
each time, until the result does not change through the desired number of decimal places.
This method is subject to serious roundoff errors due to the loss of significant digits in the
numerator when two nearly equal numbers are subtracted (see Problem 13). Hence the
numerical approximation of derivatives is not recommended unless it cannot be avoided.
Problem 10 suggests an alternative to (3.5.24) which is both more stable for computations
and more accurate for a given value of h.
Problems
1. Find the derivative of each of the following functions.
(a) f (x) = x2 sin(x)
(b) g(x) = cos(4x)
(c) g(t) = 3t cos(2t)
(d) h(s) = sin2 (s) cos(s)
(e) f (t) = sin(3t) cos(4t)
(f) g(z) = sin3 (4z)
2. Find the derivative of the dependent variable with respect to the independent variable
for each of the following.
sin(2x)
x
(c) x = sin(4t2 + 1)
1
(e) z =
cos(2t)
(g) y = x2 csc(2x)
(a) y =
(b) x = 3 tan(2t)
(d) y = 4θ tan(θ2 − 1)
(f) q = sec3 (3t)
(h) s = 3t cot(2t)
3. Evaluate each of the following.
d
d
(sin2 (2x) cos2 (3x))
(b)
(sec(x) tan(x))
dx
dx
d
d sin2 (t)
3 2
(c)
sec (q )
(d)
dq
dt cos(t)
q
d
d 2
(e)
1 + sin2 (z)
(f)
(r cos(3r2 ))
dz
dr
4. Find the best affine approximation to f (x) = tan(2x) at 0.
(a)
5. Find the best affine approximation to g(t) = cos(t) at 0.
6. Find the best affine approximation to f (t) = sin2 (t) at 0.
√
7. (a) Find the best affine approximation S to f (x) = 1 + x at 0.
(b) Find the best affine approximation T to g(x) = sin(4x) at 0.
p
(c) Find the best affine approximation U to h(x) = 1 + sin(4x) at 0.
(d) What is the relationship between f , g, and h? Is their a similar relationship
between S, T , and U ?
Section 3.5
Differentiation of Trigonometric Functions
9
8. Evaluate the following limits.
sin(2x)
x
tan(x)
(c) lim
x→0
x
(b) lim
(a) lim
sin(2x)
x→0 sin(3x)
x→0
tan(2h)
h→0 sin(3h)
(d) lim
sin2 (x)
(e) lim
x→0
x
2
sin (3t)
(g) lim
t→0
t2
1 − cos(t)
t→0
t2
tan2 (5θ)
(h) lim
θ→0 sin2 (3θ)
(f) lim
9. For each of the following, decide whether or not the given function is o(h) and whether
or not it is O(h).
(a) f (x) = sin(x)
(b) f (x) = sin2 (x)
(c) g(t) = tan(t)
(d) h(t) = tan2 (t)
(e) f (t) = 1 − cos(t)
(f) g(t) = 1 − cos2 (t)
10. Given a function f which is differentiable at the point c, define
D(h) =
f (c + h) − f (c)
.
h
Then, for small values of h, f 0 (c) ≈ D(h).
(a) Let h > 0. A better approximation for f 0 (c) than D(h) is given by averaging D(h)
and D(−h). Show that if we define
D1 (h) =
D(h) + D(−h)
,
2
then
D1 (h) =
f (c + h) − f (c − h)
.
2h
What is D1 (h) geometrically?
(b) Let h > 0. Another approximation that is sometimes used for f 0 (c) is
4
D2 (h) = D1
3
h
1
− D1 (h).
2
3
Show that
f (c − h) − 8f c − h2 + 8f c + h2 − f (c + h)
D2 (h) =
.
6h
10
Differentiation of Trigonometric Functions
Section 3.5
11. Using h = 0.00001, approximate the derivatives of the following functions using D(h),
D1 (h), and D2 (h) (from Problem 10) at the indicated points. Compare your answers
with the exact values.
1
(a) f (x) = x2 at x = 2
(b) f (x) = at x = 2
x
(c) f (x) = sin(x) at x = 0
(d) f (x) = 3 sin(x2 ) cos(4x) at x = 0
12. Compute D(h), D1 (h), and D2 (h) (from Problem 10) for the function f (x) = |x| at
x = 0. Use h = 0.001. Are your answers reasonable? Can you explain them?
13. For f (x) = x2 and c = 2, compute the values of
en = |4 − D(10−n )|
(see Problem 10) for n = 1, 2, . . . , 15. Note that you are computing the absolute value
of the error in approximating f 0 (c) by D(h) for different values of h. Plot the ordered
pairs (n, en ). Does the absolute value of the error decrease as h decreases? Can you
explain your results?