0:00 / 0:00

Derivative of Trigonometric Functions

The derivative of the function f(x)=sinxf\left(x\right)=\sin x is f(x)=cosxf'\left(x\right)=\cos x
(i.e. ddx(sinx)=cosx\frac{d}{dx}\left(\sin x\right)=\cos x)

The derivative of the function f(x)=cosxf\left(x\right)=\cos x is f(x)=sinxf'\left(x\right)=-\sin x
(i.e. ddx(cosx)=sinx\frac{d}{dx}\left(\cos x\right)=-\sin x)

The derivative of the function f(x)=tanxf\left(x\right)=\tan x is f(x)=sec2xf'\left(x\right)=\sec^2x
(i.e. ddx(tanx)=sec2x\frac{d}{dx}\left(\tan x\right)=\sec^2x)

Wize Tip
The product, quotient, and chain rules all still apply with the trigonometric functions.

PAGE BREAK
Example
Find the derivatives of the following functions.
a) y=sinxxcosxy=\sin x-x\cos x
Using product rule on the second term:
y=(sinx)[(x)(cosx)+(x)(cosx)]y'=\left(\sin x\right)'-\left[\left(x\right)'\left(\cos x\right)+\left(x\right)\left(\cos x\right)'\right]
y=cosx[(1(cosx)+(x)(sinx))]y'=\cos x-\left[\left(1\left(\cos x\right)+\left(x\right)\left(-\sin x\right)\right)\right]
y=cosxcosxxsinxy'=\cos x-\cos x-x\sin x
y=xsinxy'=-x\sin x

b) y=sinxcosxy=\sin x\cos x
Using product rule:
y=(sinx)(cosx)+(sinx)(cosx)y'=\left(\sin x\right)'\left(\cos x\right)+\left(\sin x\right)\left(\cos x\right)'
y=(cosx)(cosx)+(sinx)(sinx)y'=\left(\cos x\right)\left(\cos x\right)+\left(\sin x\right)\left(-\sin x\right)
y=cos2xsin2xy'=\cos^2x-\sin^2x

c) y=cos(x3)y=\cos\left(x^3\right)
Using chain rule:
y=(cos...)×(x3)y'=\left(\cos...\right)'\times\left(x^3\right)'
y=sin(x3)×3x2y'=-\sin\left(x^3\right)\times3x^2
y=3x2sin(x3)y'=-3x^2\sin\left(x^3\right)

d) y=cos3xy=\cos^3x (i.e. y=(cosx)3y=\left(\cos x\right)^3)
Using chain rule:
y=[(...)3]×(cosx)y'=\left[\left(...\right)^3\right]'\times\left(\cos x\right)'
y=3(cosx)2×(sinx)y'=3\left(\cos x\right)^2\times\left(-\sin x\right)
y=3sinxcos2xy'=-3\sin x\cos^2x

e) y=tan(sinx)y=\tan\left(\sin x\right)
Using chain rule:
y=[tan(...)]×(sinx)y'=\left[\tan\left(...\right)\right]'\times\left(\sin x\right)'
y=sec2(sinx)×cosxy'=\sec^2\left(\sin x\right)\times\cos x

Practice: Derivative of Trigonometric Functions

Find the derivative of the following functions:
a) f(x)=x2sinxf\left(x\right)=x^2\sin x

b) f(x)=sin(x3)f\left(x\right)=\sin\left(x^3\right)

c) f(x)=sin3xf\left(x\right)=\sin^3x

d) f(x)=etanxf\left(x\right)=e^{\sqrt{\tan x}}
0:00 / 0:00

Example: Equation of Tangent Line

Find the equation of the tangent line to the curve y=2xcosxy=\frac{2^x}{\cos x} at the point (0,1)\left(0,1\right).

1. We have a point on the tangent -- (0,1)\left(0,1\right)

2. The slope of the tangent line at that point is the derivative of the curve at that point:
y=(derivative of 1st)(2nd)(derivative of 2nd)(1st)(2nd)2y'= \frac{\color{blue}(\text{derivative of 1st}) \color{orange}(\text{2nd}) \color{black}- \color{red}(\text{derivative of 2nd}) \color{green}(\text{1st})} {\color{purple}(\text{2nd})^2}
y=(2xln2)(cosx)+(sinx)(2x)cos2xy'= \frac{\color{blue}\left(2^x\cdot\ln2\right)\color{orange}\left(\cos x\right) \color{black}+ \color{red}\left(-\sin x\right) \color{green}\left(2^x\right)} {\color{purple}\cos^2x}
Now we sub in the value x=0:
y(0)=(20ln2)(cos0)+(sin0)(20)cos20y'(0)=\frac{ \color{blue}{\left(2^0\cdot\ln2\right)} \color{orange}{\left(\cos 0\right)} \color{black}{+} \color{red}{\left(-\sin 0\right)} \color{green}{\left(2^0\right)}} {\color{purple}{\cos^20}}
y(0)=ln201y'(0)=\frac{\ln2-0}{1}
y(0)=ln2y'(0)=\ln2
So, the slope of the tangent line at that point is ln2\ln2

3. Substitute all this into the line equation:
yy1=m(xx1)y-y_1=m\left(x-x_1\right)
y1=ln2(x0)y-1=\ln2\left(x-0\right)
y1=(ln2)(x)y-1=\left(\ln2\right)\left(x\right)

If this was a multiple choice question, we would check the answer options at this point, we might have to rearrange to get the equation of the tangent line y=(ln2)x+1y=\left(\ln2\right)x+1

Practice: Equation of Tangent Line

Find the equation of the tangent line to the graph y=sinx+3x2cosxy=\sin x+3x^2\cos x at the point where x=π2x=\frac{\pi}{2}.

0:00 / 0:00

Example: Higher Order Derivative

Find f(π)+f(π)f'\left(\pi\right)+f''\left(\pi\right) if f(x)=x cosxsinxf\left(x\right)=x\ \cos x-\sin x.

First Derivative
There's not much we can simplify with this expression, and since we have a product of functions, we need to use product rule.
f(x)=(1)(cosx)+(sinx)(x)cosxf'\left(x\right)=\left(1\right)\left(\cos x\right)+\left(-\sin x\right)\left(x\right)-\cos x
f(x)=cosxx sinxcosxf'\left(x\right)=\cos x-x\ \sin x-\cos x
f(x)=x sinxf'\left(x\right)=-x\ \sin x

Second Derivative
Since we have a produce of funcions, we need the product rule again.
f(x)=(1)(sinx)+(cosx)(x)f''\left(x\right)=\left(-1\right)\left(\sin x\right)+\left(\cos x\right)\left(-x\right)
f(x)=sinxxcosxf''\left(x\right)=-\sin x-x\cos x

Substituting the value for x:
f(π)+f(π)f'\left(\pi\right)+f''\left(\pi\right)
=πsinπ+(sinππcosπ)=-\pi\sin\pi+\left(-\sin\pi-\pi\cos\pi\right)
=0+(0π(1))=0+\left(0-\pi\left(-1\right)\right)
=π=\pi

Practice: Higher Order Derivative

If f(x)=sin(2x)f\left(x\right)=\sin\left(2x\right), find f(21)(π2)f^{\left(21\right)}\left(\frac{\pi}{2}\right).
(i.e. find the 21st derivative at the point π2\frac{\pi}{2})

Practice: Derivative of Trig Functions

A differential equation is an equation that has some derivatives in it (i.e. it may contain y, y, y, etc.y,\ y',\ y'',\ etc.)

If y=sinkx+coskxy=\sin kx+\cos kx, determine the value(s) of the constant kk such that y+y+(k+k2)y=0y''+y'+\left(k+k^2\right)y=0 is true for all values of xx.