# Differentiation of trigonometric functions

The differentiation of trigonometric functions is the mathematical process of finding the derivative of a trigonometric function, or its rate of change with respect to a variable. Common trigonometric functions include sin(x), cos(x) and tan(x). For example, the derivative of f(x) = sin(x) is represented as f ′(a) = cos(a). f ′(a) is the rate of change of sin(x) at a particular point a.

Function Derivative
${\displaystyle \sin(x)}$ ${\displaystyle \cos(x)}$
${\displaystyle \cos(x)}$ ${\displaystyle -\sin(x)}$
${\displaystyle \tan(x)}$ ${\displaystyle \sec ^{2}(x)}$
${\displaystyle \cot(x)}$ ${\displaystyle -\csc ^{2}(x)}$
${\displaystyle \sec(x)}$ ${\displaystyle \sec(x)\tan(x)}$
${\displaystyle \csc(x)}$ ${\displaystyle -\csc(x)\cot(x)}$
${\displaystyle \arcsin(x)}$ ${\displaystyle {\frac {1}{\sqrt {1-x^{2}}}}}$
${\displaystyle \arccos(x)}$ ${\displaystyle -{\frac {1}{\sqrt {1-x^{2}}}}}$
${\displaystyle \arctan(x)}$ ${\displaystyle {\frac {1}{x^{2}+1}}}$
${\displaystyle \operatorname {arccot} (x)}$ ${\displaystyle -{\frac {1}{x^{2}+1}}}$
${\displaystyle \operatorname {arcsec}(x)}$ ${\displaystyle {\frac {1}{|x|{\sqrt {x^{2}-1}}}}}$
${\displaystyle \operatorname {arccsc}(x)}$ ${\displaystyle -{\frac {1}{|x|{\sqrt {x^{2}-1}}}}}$

All derivatives of circular trigonometric functions can be found using those of sin(x) and cos(x). The quotient rule is then implemented to differentiate the resulting expression. Finding the derivatives of the inverse trigonometric functions involves using implicit differentiation and the derivatives of regular trigonometric functions.

## Derivatives of trigonometric functions and their invertant

${\displaystyle {\frac {d}{dx}}\sin(x)=\cos(x)}$
${\displaystyle {\frac {d}{dx}}\cos(x)=-\sin(x)}$
${\displaystyle {\frac {d}{dx}}\tan(x)=\left({\frac {\sin(x)}{\cos(x)}}\right)'={\frac {\cos ^{2}(x)+\sin ^{2}(x)}{\cos ^{2}(x)}}=1/\cos ^{2}(x)=\sec ^{2}(x)}$
${\displaystyle {\frac {d}{dx}}\cot(x)=\left({\frac {\cos(x)}{\sin(x)}}\right)'={\frac {-\sin ^{2}(x)-\cos ^{2}(x)}{\sin ^{2}(x)}}=-(1+\cot ^{2}(x))=-\csc ^{2}(x)}$
${\displaystyle {\frac {d}{dx}}\sec(x)=\left({\frac {1}{\cos(x)}}\right)'={\frac {\sin(x)}{\cos ^{2}(x)}}={\frac {1}{\cos(x)}}\cdot {\frac {\sin(x)}{\cos(x)}}=\sec(x)\tan(x)}$
${\displaystyle {\frac {d}{dx}}\csc(x)=\left({\frac {1}{\sin(x)}}\right)'=-{\frac {\cos(x)}{\sin ^{2}(x)}}=-{\frac {\cos(x)}{\sin(x)}}\cdot {\frac {1}{\sin(x)}}=-\cot(x)\csc(x)}$
${\displaystyle {\frac {d}{dx}}\arcsin(x)={\frac {1}{\sqrt {1-x^{2}}}}}$
${\displaystyle {\frac {d}{dx}}\arccos(x)={\frac {-1}{\sqrt {1-x^{2}}}}}$
${\displaystyle {\frac {d}{dx}}\arctan(x)={\frac {1}{1+x^{2}}}}$
${\displaystyle {\frac {d}{dx}}{\mbox{arccot}}(x)={\frac {-1}{1+x^{2}}}}$
${\displaystyle {\frac {d}{dx}}{\mbox{arcsec}}(x)={\frac {1}{|x|{\sqrt {x^{2}-1}}}}}$
${\displaystyle {\frac {d}{dx}}{\mbox{arccsc}}(x)={\frac {-1}{|x|{\sqrt {x^{2}-1}}}}}$

.

## Proofs of derivatives of trigonometric functions

### Limit of sin(θ)/θ as θ tends to 0

The diagram on the right shows a circle, centre O and radius r. Let θ be the angle at O made by the two radii OA and OB, measured in radians. Since we are considering the limit as θ tends to zero, we may assume that θ is a very small positive number: 0 < θ ≪ 1.

Consider the following three regions of the diagram: R1 is the triangle OAB, R2 is the circular sector OAB, and R3 is the triangle OAC. Clearly:

${\displaystyle {\text{Area}}(R_{1})<{\text{Area}}(R_{2})<{\text{Area}}(R_{3})\,.}$

Using basic trigonometric formulae, the area of the triangle OAB is

${\displaystyle {\frac {1}{2}}\times ||OA||\times ||OB||\times \sin \theta ={\frac {1}{2}}r^{2}\sin \theta \,.}$

The area of the circular sector OAB is ${\displaystyle {\frac {1}{2}}r^{2}\theta }$, while the area of the triangle OAC is given by

${\displaystyle {\frac {1}{2}}\times ||OA||\times ||AC||={\frac {1}{2}}\times r\times r\tan \theta ={\frac {1}{2}}r^{2}\tan \theta \,.}$

Collecting together these three areas gives:

${\displaystyle {\text{Area}}(R_{1})<{\text{Area}}(R_{2})<{\text{Area}}(R_{3})\iff {\frac {1}{2}}r^{2}\sin \theta <{\frac {1}{2}}r^{2}\theta <{\frac {1}{2}}r^{2}\tan \theta \,.}$

Since r > 0, we can divide through by ½·r2. This means that the construction and calculations are all independent of the circle's radius. Moreover, since 0 < sin θ ≪ 1 in the first quadrant, it follows that sin θ > 0 and we may divide through by a factor of sin θ, giving:

${\displaystyle 1<{\frac {\theta }{\sin \theta }}<{\frac {1}{\cos \theta }}\implies 1>{\frac {\sin \theta }{\theta }}>\cos \theta \,.}$

In the last step we simply took the reciprocal of each of the three terms. Since all three terms are positive this has the effect of reversing the inequities, e.g. if 2 < 3 then ½ > ⅓.

We have seen that if 0 < sin θ ≪ 1 then sin(θ)/θ is always less than 1 and, in addition, is always greater than cos(θ). Notice that as θ gets closer to 0, so cos θ gets closer to 1. Informally: as θ gets smaller, sin(θ)/θ is "squeezed" between 1 and cos θ, which itself is heading towards 1. It follows that sin(θ)/θ tends to 1 as θ tends to 0 from the positive side.

For the case where θ is a very small negative number: –1 ≪ θ < 0, we use the fact that sine is an odd function:

${\displaystyle \lim _{\theta \to 0^{-}}{\frac {\sin \theta }{\theta }}=\lim _{\theta \to 0^{+}}{\frac {\sin(-\theta )}{-\theta }}=\lim _{\theta \to 0^{+}}{\frac {-\sin \theta }{-\theta }}=\lim _{\theta \to 0^{+}}{\frac {\sin \theta }{\theta }}=1\,.}$

### Limit of (cos(θ)-1)/θ as θ tends to 0

The last section enables us to calculate this new limit relatively easily. This is done by employing a simple trick. In this calculation, the sign of θ is unimportant.

${\displaystyle \lim _{\theta \to 0}\left({\frac {\cos \theta -1}{\theta }}\right)=\lim _{\theta \to 0}\left[\left({\frac {\cos \theta -1}{\theta }}\right)\left({\frac {\cos \theta +1}{\cos \theta +1}}\right)\right]=\lim _{\theta \to 0}\left({\frac {\cos ^{2}\theta -1}{\theta (\cos \theta +1)}}\right).}$

The well-known identity sin2θ + cos2θ = 1 tells us that cos2θ – 1 = –sin2θ. Using this, the fact that the limit of a product is the product of the limits, and the result from the last section, we find that:

${\displaystyle \lim _{\theta \to 0}\left({\frac {\cos \theta -1}{\theta }}\right)=\lim _{\theta \to 0}\left({\frac {-\sin ^{2}\theta }{\theta (\cos \theta +1)}}\right)=\lim _{\theta \to 0}\left({\frac {-\sin \theta }{\theta }}\right)\times \lim _{\theta \to 0}\left({\frac {\sin \theta }{\cos \theta +1}}\right)=(-1)\times {\frac {0}{2}}=0\,.}$

### Limit of tan(θ)/θ as θ tends to 0

Using the limit for the sine function, the fact that the tangent function is odd, and the fact that the limit of a product is the product of the limits, we find:

${\displaystyle \lim _{\theta \to 0^{-}}{\frac {\tan \theta }{\theta }}=\lim _{\theta \to 0^{+}}{\frac {\tan \theta }{\theta }}=\lim _{\theta \to 0}{\frac {\tan \theta }{\theta }}=\lim _{\theta \to 0}{\frac {\sin \theta }{\theta }}\times \lim _{\theta \to 0}{\frac {1}{\cos \theta }}=1\times 1=1\,.}$

### Derivative of the sine function

To calculate the derivative of the sine function sin θ, we use first principles. By definition:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\sin \theta =\lim _{\delta \to 0}\left({\frac {\sin(\theta +\delta )-\sin \theta }{\delta }}\right).}$

Using the well-known angle formula sin(α+β) = sin α cos β + sin β cos α, we have:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\sin \theta =\lim _{\delta \to 0}\left({\frac {\sin \theta \cos \delta +\sin \delta \cos \theta -\sin \theta }{\delta }}\right)=\lim _{\delta \to 0}\left[\left({\frac {\sin \delta }{\delta }}\cos \theta \right)+\left({\frac {\cos \delta -1}{\delta }}\sin \theta \right)\right].}$

Using the limits for the sine and cosine functions:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\sin \theta =(1\times \cos \theta )+(0\times \sin \theta )=\cos \theta \,.}$

### Derivative of the cosine function

#### From the definition of the derivative

To calculate the derivative of the cosine function cos θ, we use first principles. By definition:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\cos \theta =\lim _{\delta \to 0}\left({\frac {\cos(\theta +\delta )-\cos \theta }{\delta }}\right).}$

Using the well-known angle formula cos(α+β) = cos α cos β – sin α sin β, we have:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\cos \theta =\lim _{\delta \to 0}\left({\frac {\cos \theta \cos \delta -\sin \theta \sin \delta -\cos \theta }{\delta }}\right)=\lim _{\delta \to 0}\left[\left({\frac {\cos \delta -1}{\delta }}\cos \theta \right)-\left({\frac {\sin \delta }{\delta }}\sin \theta \right)\right].}$

Using the limits for the sine and cosine functions:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\cos \theta =(0\times \cos \theta )-(1\times \sin \theta )=-\sin \theta \,.}$

#### From the chain rule

To compute the derivative of the cosine function from the chain rule, first observe the following three facts:

${\displaystyle \cos \theta =\sin \left({\frac {\pi }{2}}-\theta \right)}$
${\displaystyle \sin \theta =\cos \left({\frac {\pi }{2}}-\theta \right)}$
${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\sin \theta =\cos \theta }$

The first and the second are trigonometric identities, and the third is proven above. Using these three facts, we can write the following,

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\cos \theta ={\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\sin \left({\frac {\pi }{2}}-\theta \right)}$

We can differentiate this using the chain rule:

${\displaystyle {\mbox{Let}}\ f\!\left(x\right)=\sin x,\ g\!\left(\theta \right)={\frac {\pi }{2}}-\theta }$
${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}f\!\left(g\!\left(\theta \right)\right)=f^{\prime }\!\left(g\!\left(\theta \right)\right)\cdot g^{\prime }\!\left(\theta \right)=\cos \left({\frac {\pi }{2}}-\theta \right)\cdot (0-1)=-\sin \theta }$.

Therefore, we have proven that

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\cos \theta =-\sin \theta }$.

### Derivative of the tangent function

#### From the definition of the derivative

To calculate the derivative of the tangent function tan θ, we use first principles. By definition:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\tan \theta =\lim _{\delta \to 0}\left({\frac {\tan(\theta +\delta )-\tan \theta }{\delta }}\right).}$

Using the well-known angle formula tan(α+β) = (tan α + tan β) / (1 - tan α tan β), we have:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\tan \theta =\lim _{\delta \to 0}\left[{\frac {{\frac {\tan \theta +\tan \delta }{1-\tan \theta \tan \delta }}-\tan \theta }{\delta }}\right]=\lim _{\delta \to 0}\left[{\frac {\tan \theta +\tan \delta -\tan \theta +\tan ^{2}\theta \tan \delta }{\delta \left(1-\tan \theta \tan \delta \right)}}\right].}$

Using the fact that the limit of a product is the product of the limits:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\tan \theta =\lim _{\delta \to 0}{\frac {\tan \delta }{\delta }}\times \lim _{\delta \to 0}\left({\frac {1+\tan ^{2}\theta }{1-\tan \theta \tan \delta }}\right).}$

Using the limit for the tangent function, and the fact that tan δ tends to 0 as δ tends to 0:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\tan \theta =1\times {\frac {1+\tan ^{2}\theta }{1-0}}=1+\tan ^{2}\theta .}$

We see immediately that:

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\,\tan \theta =1+{\frac {\sin ^{2}\theta }{\cos ^{2}\theta }}={\frac {\cos ^{2}\theta +\sin ^{2}\theta }{\cos ^{2}\theta }}={\frac {1}{\cos ^{2}\theta }}=\sec ^{2}\theta \,.}$

#### From the quotient rule

One can also compute the derivative of the tangent function using the quotient rule.

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\tan \theta ={\frac {\operatorname {d} }{\operatorname {d} \!\theta }}{\frac {\sin \theta }{\cos \theta }}={\frac {\left(\sin \theta \right)^{\prime }\cdot \cos \theta -\sin \theta \cdot \left(\cos \theta \right)^{\prime }}{\cos ^{2}\theta }}={\frac {\cos ^{2}\theta +\sin ^{2}\theta }{\cos ^{2}\theta }}}$

The numerator can be simplified to 1 by the Pythagorean identity, giving us,

${\displaystyle {\frac {1}{\cos ^{2}\theta }}=\sec ^{2}\theta }$

Therefore,

${\displaystyle {\frac {\operatorname {d} }{\operatorname {d} \!\theta }}\tan \theta =\sec ^{2}\theta }$

## Proofs of derivatives of inverse trigonometric functions

The following derivatives are found by setting a variable y equal to the inverse trigonometric function that we wish to take the derivative of. Using implicit differentiation and then solving for dy/dx, the derivative of the inverse function is found in terms of y. To convert dy/dx back into being in terms of x, we can draw a reference triangle on the unit circle, letting θ be y. Using the Pythagorean theorem and the definition of the regular trigonometric functions, we can finally express dy/dx in terms of x.

### Differentiating the inverse sine function

We let

${\displaystyle y=\arcsin x\,\!}$

Where

${\displaystyle -{\frac {\pi }{2}}\leq y\leq {\frac {\pi }{2}}}$

Then

${\displaystyle \sin y=x\,\!}$

Using implicit differentiation and solving for dy/dx:

${\displaystyle {d \over dx}\sin y={d \over dx}x}$
${\displaystyle {dy \over dx}\cos y=1\,\!}$

Substituting ${\displaystyle \cos y={\sqrt {1-\sin ^{2}y}}}$ in from above,

${\displaystyle {dy \over dx}{\sqrt {1-\sin ^{2}y}}=1}$

Substituting ${\displaystyle x=\sin y}$ in from above,

${\displaystyle {dy \over dx}{\sqrt {1-x^{2}}}=1}$
${\displaystyle {dy \over dx}={\frac {1}{\sqrt {1-x^{2}}}}}$

### Differentiating the inverse cosine function

We let

${\displaystyle y=\arccos x\,\!}$

Where

${\displaystyle 0\leq y\leq \pi }$

Then

${\displaystyle \cos y=x\,\!}$

Using implicit differentiation and solving for dy/dx:

${\displaystyle {d \over dx}\cos y={d \over dx}x}$
${\displaystyle -{dy \over dx}\sin y=1}$

Substituting ${\displaystyle \sin y={\sqrt {1-\cos ^{2}y}}\,\!}$ in from above, we get

${\displaystyle -{dy \over dx}{\sqrt {1-\cos ^{2}y}}=1}$

Substituting ${\displaystyle x=\cos y\,\!}$ in from above, we get

${\displaystyle -{dy \over dx}{\sqrt {1-x^{2}}}=1}$
${\displaystyle {dy \over dx}=-{\frac {1}{\sqrt {1-x^{2}}}}}$

### Differentiating the inverse tangent function

We let

${\displaystyle y=\arctan x\,\!}$

Where

${\displaystyle -{\frac {\pi }{2}}

Then

${\displaystyle \tan y=x\,\!}$

Using implicit differentiation and solving for dy/dx:

${\displaystyle {d \over dx}\tan y={d \over dx}x}$

Left side:

${\displaystyle {d \over dx}\tan y={d \over dx}{\frac {\sin y}{\cos y}}={\frac {{dy \over dx}\cos ^{2}y+\sin ^{2}y{dy \over dx}}{\cos ^{2}y}}={dy \over dx}\left(1+\tan ^{2}y\right)}$

Right side:

${\displaystyle {d \over dx}x=1}$

Therefore,

${\displaystyle {dy \over dx}(1+\tan ^{2}y)=1}$

Substituting ${\displaystyle x=\tan y\,\!}$ in from above, we get

${\displaystyle {dy \over dx}(1+x^{2})=1}$
${\displaystyle {dy \over dx}={\frac {1}{1+x^{2}}}}$

### Differentiating the inverse cotangent function

We let

${\displaystyle y=\operatorname {arccot} x}$

where ${\displaystyle -\infty and ${\displaystyle 0. Then

${\displaystyle \cot y=x}$

Taking a derivative with respect to ${\displaystyle x}$ on both sides,

${\displaystyle {\frac {d}{dx}}\cot y={\frac {d}{dx}}x}$
${\displaystyle -\csc ^{2}y\cdot {\frac {dy}{dx}}=1}$
${\displaystyle {\frac {dy}{dx}}=-{\frac {1}{\csc ^{2}y}}}$

Substituting the Pythagorean identity ${\displaystyle 1+\cot ^{2}y=\csc ^{2}y}$ and ${\displaystyle x=\cot y}$,

${\displaystyle {\frac {dy}{dx}}=-{\frac {1}{1+\cot ^{2}y}}=-{\frac {1}{1+x^{2}}}}$

### Differentiating the inverse secant function

Let

${\displaystyle y=\operatorname {arcsec} x\ \ |x|\geq 1}$

Then

${\displaystyle x=\sec y\ \ y\in \left[0,{\frac {\pi }{2}}\right)\cup \left({\frac {\pi }{2}},\pi \right]}$
${\displaystyle {\frac {dx}{dy}}=\sec y\tan y=|x|{\sqrt {x^{2}-1}}}$

(It is necessary to use the absolute value of x such that the radical ${\displaystyle x^{2}-1}$ in the derivation is always its true, unnegated value.)

${\displaystyle {\frac {dy}{dx}}={\frac {1}{|x|{\sqrt {x^{2}-1}}}}}$

### Differentiating the inverse cosecant function

Let

${\displaystyle y=\operatorname {arccsc} x\ \ |x|\geq 1}$

Then

${\displaystyle x=\csc y\ \ \ y\in \left[-{\frac {\pi }{2}},0\right)\cup \left(0,{\frac {\pi }{2}}\right]}$
${\displaystyle {\frac {dx}{dy}}=-\csc y\cot y=-|x|{\sqrt {x^{2}-1}}}$
${\displaystyle {\frac {dy}{dx}}={\frac {-1}{|x|{\sqrt {x^{2}-1}}}}}$