### Derivatives of the trigonometric functions

In this section we'll derive the important derivatives of the trigonometric functions f(x) = sin(x), cos(x) and tan(x).

In doing so, we will need to rely upon the trigonometric limits we derived in another section. To remind you, those are copied here.

To get through this section, you'll need to be familiar with analytic trigonometry, the derivative and the chain rule.

and

### The derivative of f(x) = sin(x)

We start, as usual with the difference-quotient expression of the derivative:

$$\frac{d}{dx} sin(x) = \lim_{h\to 0} \frac{sin(x + h) - sin(x)}{h}$$

Now we recall the trigonometric sum identities:

\begin{align} sin(a + b) = sin(a)cos(b) + cos(a)sin(b) \\ cos(a + b) = cos(a)cos(b) - sin(a)sin(b) \end{align}

We use the first to make a substitution for sin(x+h),

$$= \lim_{h\to 0} \frac{sin(x)cos(h) + cos(x)sin(h) - sin(x)}{h}$$

Now factor a sin(x) out of two of the terms of the numerator, like this:

$$= \lim_{h\to 0} \frac{sin(x)[cos(h) - 1] + cos(x)sin(h)}{h}$$

Now let's use the properties of limits to separate that expression into two different limits:

$$= \lim_{h\to 0} \frac{sin(x)[cos(h) - 1]}{h} + \lim_{h\to 0} \frac{cos(x)sin(h)}{h}$$

Because sin(x) and cos(x) are continuous over their whole domains, we can remove them from the limit expression, which leaves us with the familiar and easy-to-evaluate trigonometric limits:

The derivative of the sine function is thus the cosine function:

$$\frac{d}{dx} sin(x) = cos(x)$$

Take a minute to look at the graph below and see if you can rationalize why cos(x) should be the derivative of sin(x). Notice that wherever sin(x) has a maximum or minimum (at which point the slope of a tangent line would be zero), the value of the cosine function is zero. Notice that wherever sin(x) has maximum slope (where it passes through y=0), the cosine function reaches its minimum or maximum at ±1.

### The derivative of f(x) = cos(x)

We find the derivative of f(x) = cos(x) in a similar manner, and I'll work through the whole thing again here. Start with the difference quotient expression,

$$\frac{d}{dx} cos(x) = \lim_{h\to 0} \frac{cos(x + h) - cos(x)}{h}$$

then replace cos(x + h) with cos(x)cos(h) - sin(x)sin(h):

$$= \lim_{h\to 0} \frac{cos(x)cos(h) - sin(x)sin(h) - cos(x)}{h}$$

Now move the common factor cos(x) and rewrite the numerator:

$$= \lim_{h\to 0} \frac{cos(x)[cos(h) - 1] - sin(x)sin(h)}{h}$$

Split the expression into two limits:

$$= \lim_{h\to 0} \frac{cos(x)[cos(h) - 1]}{h} - \lim_{h\to 0} \frac{sin(x)sin(h)}{h}$$

and remove the non h-dependent expressions to find our familiar trigonometric limits:

This time we get

$$\frac{d}{dx} cos(x) = -sin(x)$$

Look again at the graphs of f(x) = cos(x) and f'(x) = -sin(x), and see if you can rationalize for yourself why -sin(x) is the derivative of cos(x).

### The derivative of f(x) = tan(x)

For this derivative, we'll use the definition of the tangent and the quotient rule to find the result. You can use the difference quotient yourself in an exercise below.

$$\frac{d}{dx} tan(x) = \frac{d}{dx} \frac{sin(x)}{cos(x)}$$

We start by writing tan(x) as sin(x)/cos(x), then using the quotient rule:

$$= \frac{cos(x) \frac{d}{dx}sin(x) - sin(x) \frac{d}{dx}cos(x)}{cos^2(x)}$$

After taking the derivatives of sin(x) and cos(x) (which we can do now!), we recognize the Pythagorean identity: cos2(x) + sin2(x) = 1:

$$= \frac{cos^2(x) + sin^2(x)}{cos^2(x)}$$

If we recognize that sin2(x) + cos2(x) = 1, and that 1/cos2(x) is sec2(x)

$$= \frac{1}{cos^2(x)} = sec^2(x)$$

The result is:

$$\frac{d}{dx} tan(x) = sec^2(x)$$

Use the graph below to understand why sec2(x) gives the slope of tan(x) at any point between ±π/2 (remember that the tangent function is infinite at multiples of ±π/2). Notice that the slope of the tangent function is always positive, and the value of the derivative is always positive, too.

#### Derivatives of the trigonometric functions

Here are the derivatives of the six trigonometric functions. You should commit the derivatives of sin(x), cos(x) and tan(x) to memory.

### Practice problems

Calculate the derivatives of these trigonometric and mixed functions. Don't forget the product rule, the quotient rule and the chain rule.

 1 $f(x) = 2x sin(x)$ Solution $$f'(x) = 2 sin(x) + 2x cos(x)$$ 2 $f(x) = \frac{3x^2}{cos(x)}$ Solution $$f'(x) = \frac{6x cos(x) + 3x^2 sin(x)}{cos^2(x)}$$ 3 $f(x) = sin^2(x)$ Solution $$f'(x) = 2 sin(x) cos(x)$$ 4 $f(x) = tan^4(x)$ Solution Remember that   $tan^4(x)$   means   $[tan(x)]^4$. \begin{align} f'(x) &= 4[tan^3(x)]^3 sec^2(x) \\ &= 4 tan^3(x) sec^2(x) \end{align} 5 $f(x) = \frac{cos^2(x)}{tan(x)}$ Solution $$f' = \frac{-2tan(x)cos(x)sin(x) - cos^2(x)sec^2(x)}{tan^2(x)}$$
 6 $f(x) = sec(x)$ Solution \begin{align} f'(x) &= \frac{cos(x)(0) + sin(x)}{cos^2(x)} \\ \\ &= \frac{1}{cos(x)}\cdot\frac{sin(x)}{cos(x)} \\ \\ &= sec(x) tan(x) \end{align} 7 $f(x) = csc(x)$ Solution \begin{align} f'(x) &= \frac{sin(x)(0) + cos(x)}{sin^2(x)} \\ \\ &= -\frac{1}{sin(x)}\cdot\frac{cos(x)}{sin(x)} \\ \\ &= -csc(x) cot(x) \end{align} 8 $f(x) = \sqrt{x} cos(x)$ Solution \begin{align} f'(x) &= \frac{1}{2} x^{-1/2} cos(x) - \sqrt{x} sin(x)\\ \\ &= \frac{cos(x)}{2 \sqrt{x}} \end{align} 9 $f(x) = sin(2x^2 - x^4)$ Solution \begin{align} f'(x) &= cos(2x^2 - x^4)(4x - 4x^3)\\ &= 4x (1 - x^2) cos(2x^2 - x^4) \end{align} 10 $f(x) = cos(sin(x))$ Solution $$f'(x) = -sin(sin(x))cos(x)$$

xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.