Processing math: 100%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

3.5: Derivatives of Trigonometric Functions

( \newcommand{\kernel}{\mathrm{null}\,}\)

Learning Objectives
  • Find the derivatives of the sine and cosine function.
  • Find the derivatives of the standard trigonometric functions.
  • Calculate the higher-order derivatives of the sine and cosine.

One of the most important types of motion in physics is simple harmonic motion, which is associated with such systems as an object with mass oscillating on a spring. Simple harmonic motion can be described by using either sine or cosine functions. In this section we expand our knowledge of derivative formulas to include derivatives of these and other trigonometric functions. We begin with the derivatives of the sine and cosine functions and then use them to obtain formulas for the derivatives of the remaining four trigonometric functions. Being able to calculate the derivatives of the sine and cosine functions will enable us to find the velocity and acceleration of simple harmonic motion.

Derivatives of the Sine and Cosine Functions

We begin our exploration of the derivative for the sine function by using the formula to make a reasonable guess at its derivative. Recall that for a function f(x),

f(x)=limh0f(x+h)f(x)h.

Consequently, for values of h very close to 0,

f(x)f(x+h)f(x)h.

We see that by using h=0.01,

ddx(sinx)sin(x+0.01)sinx0.01

By setting

D(x)=sin(x+0.01)sinx0.01

and using a graphing utility, we can get a graph of an approximation to the derivative of sinx (Figure 3.5.1).

The function D(x) = (sin(x + 0.01) − sin x)/0.01 is graphed. It looks a lot like a cosine curve.
Figure 3.5.1: The graph of the function D(x) looks a lot like a cosine curve.

Upon inspection, the graph of D(x) appears to be very close to the graph of the cosine function. Indeed, we will show that

ddx(sinx)=cosx.

If we were to follow the same steps to approximate the derivative of the cosine function, we would find that

ddx(cosx)=sinx.

The Derivatives of sinx and cosx

The derivative of the sine function is the cosine and the derivative of the cosine function is the negative sine.

ddx(sinx)=cosx

ddx(cosx)=sinx

Proof

Because the proofs for ddx(sinx)=cosx and ddx(cosx)=sinx use similar techniques, we provide only the proof for ddx(sinx)=cosx. Before beginning, recall two important trigonometric limits:

limh0sinhh=1 and limh0cosh1h=0.

The graphs of y=sinhh and y=cosh1h are shown in Figure 3.5.2.

The function y = (sin h)/h and y = (cos h – 1)/h are graphed. They both have discontinuities on the y-axis.
Figure 3.5.2: These graphs show two important limits needed to establish the derivative formulas for the sine and cosine functions.

We also recall the following trigonometric identity for the sine of the sum of two angles:

sin(x+h)=sinxcosh+cosxsinh.

Now that we have gathered all the necessary equations and identities, we proceed with the proof.

ddx(sinx)=limh0sin(x+h)sinxhApply the definition of the derivative.=limh0sinxcosh+cosxsinhsinxhUse trig identity for the sine of the sum of two angles.=limh0(sinxcoshsinxh+cosxsinhh)Regroup.=limh0(sinx(cosh1h)+(cosx)(sinhh))Factor out sinx and cosx=(sinx)limh0(cosh1h)+(cosx)limh0(sinhh)Factor sinx and cosx out of limits.=(sinx)(0)+(cosx)(1)Apply trig limit formulas.=cosxSimplify.

Figure 3.5.3 shows the relationship between the graph of f(x)=sinx and its derivative f(x)=cosx. Notice that at the points where f(x)=sinx has a horizontal tangent, its derivative f(x)=cosx takes on the value zero. We also see that where f(x)=sinx is increasing, f(x)=cosx>0 and where f(x)=sinx is decreasing, f(x)=cosx<0.

The functions f(x) = sin x and f’(x) = cos x are graphed. It is apparent that when f(x) has a maximum or a minimum that f’(x) = 0.
Figure 3.5.3: Where f(x) has a maximum or a minimum, f(x)=0 that is, f(x)=0 where f(x) has a horizontal tangent. These points are noted with dots on the graphs
Example 3.5.1: Differentiating a Function Containing sinx

Find the derivative of f(x)=5x3sinx.

Solution

Using the product rule, we have

f(x)=ddx(5x3)sinx+ddx(sinx)5x3=15x2sinx+cosx5x3.

After simplifying, we obtain

f(x)=15x2sinx+5x3cosx.

Exercise 3.5.1

Find the derivative of f(x)=sinxcosx.

Hint

Don’t forget to use the product rule.

Answer

f(x)=cos2xsin2x

Example 3.5.2: Finding the Derivative of a Function Containing cos x

Find the derivative of g(x)=cosx4x2.

Solution

By applying the quotient rule, we have

g(x)=(sinx)4x28x(cosx)(4x2)2.

Simplifying, we obtain

g(x)=4x2sinx8xcosx16x4=xsinx2cosx4x3.

Exercise 3.5.2

Find the derivative of f(x)=xcosx.

Hint

Use the quotient rule.

Answer

f(x)=cosx+xsinxcos2x

Example 3.5.3: An Application to Velocity

A particle moves along a coordinate axis in such a way that its position at time t is given by s(t)=2sintt for 0t2π. At what times is the particle at rest?

Solution

To determine when the particle is at rest, set s(t)=v(t)=0. Begin by finding s(t). We obtain

s(t)=2cost1,

so we must solve

2cost1=0 for 0t2π.

The solutions to this equation are t=π3 and t=5π3. Thus the particle is at rest at times t=π3 and t=5π3.

Exercise 3.5.3

A particle moves along a coordinate axis. Its position at time t is given by s(t)=3t+2cost for 0t2π. At what times is the particle at rest?

Hint

Use the previous example as a guide.

Answer

t=π3,t=2π3

Derivatives of Other Trigonometric Functions

Since the remaining four trigonometric functions may be expressed as quotients involving sine, cosine, or both, we can use the quotient rule to find formulas for their derivatives.

Example 3.5.4: The Derivative of the Tangent Function

Find the derivative of f(x)=tanx.

Solution

Start by expressing tanx as the quotient of sinx and cosx:

f(x)=tanx=sinxcosx.

Now apply the quotient rule to obtain

f(x)=cosxcosx(sinx)sinx(cosx)2.

Simplifying, we obtain

f(x)=cos2x+sin2xcos2x.

Recognizing that cos2x+sin2x=1, by the Pythagorean theorem, we now have

f(x)=1cos2x

Finally, use the identity secx=1cosx to obtain

f(x)=sec2x.

Exercise 3.5.4

Find the derivative of f(x)=cotx.

Hint

Rewrite cotx as cosxsinx and use the quotient rule.

Answer

f(x)=csc2x

The derivatives of the remaining trigonometric functions may be obtained by using similar techniques. We provide these formulas in the following theorem.

Derivatives of tanx, cotx, secx, and cscx

The derivatives of the remaining trigonometric functions are as follows:

ddx(tanx)=sec2xddx(cotx)=csc2xddx(secx)=secxtanxddx(cscx)=cscxcotx.

Example 3.5.5: Finding the Equation of a Tangent Line

Find the equation of a line tangent to the graph of f(x)=cotx at x=π4.

Solution

To find the equation of the tangent line, we need a point and a slope at that point. To find the point, compute

f(π4)=cotπ4=1.

Thus the tangent line passes through the point (π4,1). Next, find the slope by finding the derivative of f(x)=cotx and evaluating it at π4:

f(x)=csc2x and f(π4)=csc2(π4)=2.

Using the point-slope equation of the line, we obtain

y1=2(xπ4)

or equivalently,

y=2x+1+π2.

Example 3.5.6: Finding the Derivative of Trigonometric Functions

Find the derivative of f(x)=cscx+xtanx.

Solution

To find this derivative, we must use both the sum rule and the product rule. Using the sum rule, we find

f(x)=ddx(cscx)+ddx(xtanx).

In the first term, ddx(cscx)=cscxcotx, and by applying the product rule to the second term we obtain

ddx(xtanx)=(1)(tanx)+(sec2x)(x).

Therefore, we have

f(x)=cscxcotx+tanx+xsec2x.

Exercise 3.5.5

Find the derivative of f(x)=2tanx3cotx.

Hint

Use the rule for differentiating a constant multiple and the rule for differentiating a difference of two functions.

Answer

f(x)=2sec2x+3csc2x

Exercise 3.5.6

Find the slope of the line tangent to the graph of f(x)=tanx at x=π6.

Hint

Evaluate the derivative at x=π6.

Answer

43

Higher-Order Derivatives

The higher-order derivatives of sinx and cosx follow a repeating pattern. By following the pattern, we can find any higher-order derivative of sinx and cosx.

Example 3.5.7: Finding Higher-Order Derivatives of y=sinx

Find the first four derivatives of y=sinx.

Solution

Each step in the chain is straightforward:

y=sinxdydx=cosxd2ydx2=sinxd3ydx3=cosxd4ydx4=sinx

Analysis

Once we recognize the pattern of derivatives, we can find any higher-order derivative by determining the step in the pattern to which it corresponds. For example, every fourth derivative of sinx equals sinx, so

d4dx4(sinx)=d8dx8(sinx)=d12dx12(sinx)==d4ndx4n(sinx)=sinx

d5dx5(sinx)=d9dx9(sinx)=d13dx13(sinx)==d4n+1dx4n+1(sinx)=cosx.

Exercise 3.5.7

For y=cosx, find d4ydx4.

Hint

See the previous example.

Answer

cosx

Example 3.5.8: Using the Pattern for Higher-Order Derivatives of y=sinx

Find d74dx74(sinx).

Solution

We can see right away that for the 74th derivative of sinx, 74=4(18)+2, so

d74dx74(sinx)=d72+2dx72+2(sinx)=d2dx2(sinx)=sinx.

Exercise 3.5.8

For y=sinx, find d59dx59(sinx).

Hint

d59dx59(sinx)=d414+3dx414+3(sinx)

Answer

cosx

Example 3.5.9: An Application to Acceleration

A particle moves along a coordinate axis in such a way that its position at time t is given by s(t)=2sint. Find v(π/4) and a(π/4). Compare these values and decide whether the particle is speeding up or slowing down.

Solution

First find v(t)=s(t)

v(t)=s(t)=cost.

Thus,

v(π4)=12=22.

Next, find a(t)=v(t). Thus, a(t)=v(t)=sint and we have

a(π4)=12=22.

Since v(π4)=22<0 and a(π4)=22>0, we see that velocity and acceleration are acting in opposite directions; that is, the object is being accelerated in the direction opposite to the direction in which it is traveling. Consequently, the particle is slowing down.

Exercise 3.5.9

A block attached to a spring is moving vertically. Its position at time t is given by s(t)=2sint. Find v(5π6) and a(5π6). Compare these values and decide whether the block is speeding up or slowing down.

Hint

Use Example 3.5.9 as a guide.

Answer

v(5π6)=3<0 and a(5π6)=1<0. The block is speeding up.

Key Concepts

  • We can find the derivatives of sinx and cosx by using the definition of derivative and the limit formulas found earlier. The results are

ddx(sinx)=cosxandddx(cosx)=sinx.

  • With these two formulas, we can determine the derivatives of all six basic trigonometric functions.

Key Equations

  • Derivative of sine function

ddx(sinx)=cosx

  • Derivative of cosine function

ddx(cosx)=sinx

  • Derivative of tangent function

ddx(tanx)=sec2x

  • Derivative of cotangent function

ddx(cotx)=csc2x

  • Derivative of secant function

ddx(secx)=secxtanx

  • Derivative of cosecant function

ddx(cscx)=cscxcotx


This page titled 3.5: Derivatives of Trigonometric Functions is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?