0:00 / 0:00

Derivative of Trigonometric Functions

The derivative of the function f(x)=sin⁡xf\left(x\right)=\sin x is f′(x)=cos⁡xf'\left(x\right)=\cos x
(i.e. ddx(sin⁡x)=cos⁡x\frac{d}{dx}\left(\sin x\right)=\cos x)

The derivative of the function f(x)=cos⁡xf\left(x\right)=\cos x is f′(x)=−sin⁡xf'\left(x\right)=-\sin x
(i.e. ddx(cos⁡x)=−sin⁡x\frac{d}{dx}\left(\cos x\right)=-\sin x)

The derivative of the function f(x)=tan⁡xf\left(x\right)=\tan x is f′(x)=sec⁡2xf'\left(x\right)=\sec^2x
(i.e. ddx(tan⁡x)=sec⁡2x\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=sin⁡x−xcos⁡xy=\sin x-x\cos x
Using product rule on the second term:
y′=(sin⁡x)′−[(x)′(cos⁡x)+(x)(cos⁡x)′]y'=\left(\sin x\right)'-\left[\left(x\right)'\left(\cos x\right)+\left(x\right)\left(\cos x\right)'\right]
y′=cos⁡x−[(1(cos⁡x)+(x)(−sin⁡x))]y'=\cos x-\left[\left(1\left(\cos x\right)+\left(x\right)\left(-\sin x\right)\right)\right]
y′=cos⁡x−cos⁡x−xsin⁡xy'=\cos x-\cos x-x\sin x
y′=−xsin⁡xy'=-x\sin x

b) y=sin⁡xcos⁡xy=\sin x\cos x
Using product rule:
y′=(sin⁡x)′(cos⁡x)+(sin⁡x)(cos⁡x)′y'=\left(\sin x\right)'\left(\cos x\right)+\left(\sin x\right)\left(\cos x\right)'
y′=(cos⁡x)(cos⁡x)+(sin⁡x)(−sin⁡x)y'=\left(\cos x\right)\left(\cos x\right)+\left(\sin x\right)\left(-\sin x\right)
y′=cos⁡2x−sin⁡2xy'=\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=cos⁡3xy=\cos^3x (i.e. y=(cos⁡x)3y=\left(\cos x\right)^3)
Using chain rule:
y′=[(...)3]′×(cos⁡x)′y'=\left[\left(...\right)^3\right]'\times\left(\cos x\right)'
y′=3(cos⁡x)2×(−sin⁡x)y'=3\left(\cos x\right)^2\times\left(-\sin x\right)
y′=−3sin⁡xcos⁡2xy'=-3\sin x\cos^2x

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

Practice: Derivative of Trigonometric Functions

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

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

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

d) f(x)=etan⁡xf\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=2xcos⁡xy=\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′=(2x⋅ln⁡2)(cos⁡x)+(−sin⁡x)(2x)cos⁡2xy'= \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)=(20⋅ln⁡2)(cos⁡0)+(−sin⁡0)(20)cos⁡20y'(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)=ln⁡2−01y'(0)=\frac{\ln2-0}{1}
y′(0)=ln⁡2y'(0)=\ln2
So, the slope of the tangent line at that point is ln⁡2\ln2

3. Substitute all this into the line equation:
y−y1=m(x−x1)y-y_1=m\left(x-x_1\right)
y−1=ln⁡2(x−0)y-1=\ln2\left(x-0\right)
y−1=(ln⁡2)(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=(ln⁡2)x+1y=\left(\ln2\right)x+1

Practice: Equation of Tangent Line

Find the equation of the tangent line to the graph y=sin⁡x+3x2cos⁡xy=\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 cos⁡x−sin⁡xf\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)(cos⁡x)+(−sin⁡x)(x)−cos⁡xf'\left(x\right)=\left(1\right)\left(\cos x\right)+\left(-\sin x\right)\left(x\right)-\cos x
f′(x)=cos⁡x−x sin⁡x−cos⁡xf'\left(x\right)=\cos x-x\ \sin x-\cos x
f′(x)=−x sin⁡xf'\left(x\right)=-x\ \sin x

Second Derivative
Since we have a produce of funcions, we need the product rule again.
f′′(x)=(−1)(sin⁡x)+(cos⁡x)(−x)f''\left(x\right)=\left(-1\right)\left(\sin x\right)+\left(\cos x\right)\left(-x\right)
f′′(x)=−sin⁡x−xcos⁡xf''\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=sin⁡kx+cos⁡kxy=\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.