Derivatives of Trigonometric Functions

• The basic trigonometric functions include the following $$6$$ functions: sine $$\left(\sin x\right),$$ cosine $$\left(\cos x\right),$$ tangent $$\left(\tan x\right),$$ cotangent $$\left(\cot x\right),$$ secant $$\left(\sec x\right)$$ and cosecant $$\left(\csc x\right).$$

All these functions are continuous and differentiable in their domains. Below we make a list of derivatives for these functions.

Derivatives of Basic Trigonometric Functions

We have already derived the derivatives of sine and cosine on the Definition of the Derivative page. They are as follows:

${{\left( {\sin x} \right)^\prime } = \cos x,\;\;}\kern-0.3pt{{\left( {\cos x} \right)^\prime } = – \sin x.}$

Using the quotient rule it is easy to obtain an expression for the derivative of tangent:

${{\left( {\tan x} \right)^\prime } }={ {\left( {\frac{{\sin x}}{{\cos x}}} \right)^\prime } } = {\frac{{{{\left( {\sin x} \right)}^\prime }\cos x – \sin x{{\left( {\cos x} \right)}^\prime }}}{{{{\cos }^2}x}} } = {\frac{{\cos x \cdot \cos x – \sin x \cdot \left( { – \sin x} \right)}}{{{{\cos }^2}x}} } = {\frac{{{{\cos }^2}x + {{\sin }^2}x}}{{{{\cos }^2}x}} } = {\frac{1}{{{{\cos }^2}x}}.}$

The derivative of cotangent can be found in the same way. However, this can be also done using the chain rule for differentiating a composite function:

$\require{cancel} {{\left( {\cot x} \right)^\prime } = {\left( {\frac{1}{{\tan x}}} \right)^\prime } } = { – \frac{1}{{{{\tan }^2}x}} \cdot {\left( {\tan x} \right)^\prime } } = { – \frac{1}{{\frac{{{{\sin }^2}x}}{{{{\cos }^2}x}}}} \cdot \frac{1}{{{{\cos }^2}x}} } = { – \frac{\cancel{{{\cos }^2}x}}{{{{\sin }^2}x \cdot \cancel{{{\cos }^2}x}}} } = { – \frac{1}{{{{\sin }^2}x}}.}$

Similarly, we find the derivatives of secant and cosecant:

${{\left( {\sec x} \right)^\prime } = {\left( {\frac{1}{{\cos x}}} \right)^\prime } } = { – \frac{1}{{{{\cos }^2}x}} \cdot {\left( {\cos x} \right)^\prime } } = {\frac{{\sin x}}{{{{\cos }^2}x}} } = {\frac{{\sin x}}{{\cos x}} \cdot \frac{1}{{\cos x}} } = {\tan x\sec x,}$

${{\left( {\csc x} \right)^\prime } = {\left( {\frac{1}{{\sin x}}} \right)^\prime } } = { – \frac{1}{{{{\sin }^2}x}} \cdot {\left( {\sin x} \right)^\prime } } = {-\frac{{\cos x}}{{{{\sin }^2}x}} } = {-\frac{{\cos x}}{{\sin x}} \cdot \frac{1}{{\sin x}} } = {-\cot x\csc x.}$

Table of Derivatives of Trigonometric Functions

The table below summarizes the derivatives of $$6$$ basic trigonometric functions:

In the examples below, find the derivative of the given function.

• Solved Problems

Click a problem to see the solution.

Example 1

$y = \cos 2x – 2\sin x$

Example 2

$y = \tan x + \frac{1}{3}{\tan ^3}x$

Example 3

$y = \cos x – {\frac{1}{3}}{\cos ^3}x$

Example 4

$y = \frac{1}{{{{\cos }^n}x}}$

Example 5

$y = {\frac{{\sin x}}{{1 + \cos x}}}$

Example 6

$y = {\cos ^2}\sin x$

Example 7

$y = x\sin x + \cos x$

Example 8

$y = {\sin ^2}\sqrt x$

Example 9

$y = \cos {\frac{1}{x}}$

Example 10

$y = {\sin ^3}x + {\cos ^3}x$

Example 11

$y = \tan \frac{x}{2} – \cot \frac{x}{2}$

Example 12

$y = {x^2}\sin x + 2x\cos x – 2\sin x$

Example 13

$y = {\tan ^2}x + \ln {\cos ^2}x$

Example 14

$y = {\sin ^n}x\cos nx$

Example 15

$y = \ln \sqrt {{\frac{{1 – \sin x}}{{1 + \sin x}}}}$

Example 16

Calculate the derivative of the function $y = \left( {2 – {x^2}} \right)\cos x + 2x\sin x$ at $$x = \pi.$$

Example 17

Calculate the derivative of the function $y = \left( {x + 1} \right)\cos x + \left( {x + 2} \right)\sin x$ at $$x = 0.$$

Example 18

$y = {\sec ^2}{\frac{x}{2}} + {\csc ^2}{\frac{x}{2}}$

Example 19

${y = {\left( {\tan x} \right)^{\cos x}},\;\;\;}\kern0pt {\text{where}\;\;0 \lt x \lt \frac{\pi }{2}.}$

Example 20

$y = \frac{{{{\sin }^2}x}}{{1 + \cot x}} + \frac{{{{\cos }^2}x}}{{1 + \tan x}}$

Example 1.

$y = \cos 2x – 2\sin x$

Solution.

Using the linear properties of the derivative, the chain rule and the double angle formula, we obtain:

${y’\left( x \right) }={ {\left( {\cos 2x – 2\sin x} \right)^\prime } } = {{\left( {\cos 2x} \right)^\prime } – {\left( {2\sin x} \right)^\prime } } = {\left( { – \sin 2x} \right) \cdot {\left( {2x} \right)^\prime } – 2{\left( {\sin x} \right)^\prime } } = { – 2\sin 2x – 2\cos x } = { – 2\sin x\cos x – 2\cos x } = { – 2\cos x\left( {\sin x + 1} \right).}$

Example 2.

$y = \tan x + \frac{1}{3}{\tan ^3}x$

Solution.

The derivative of this function is

${y’\left( x \right) }={ {\left( {\tan x + \frac{1}{3}{{\tan }^3}x} \right)^\prime } } = {{\left( {\tan x} \right)^\prime } + {\left( {\frac{1}{3}{{\tan }^3}x} \right)^\prime } } = {\frac{1}{{{{\cos }^2}x}} + \frac{1}{3} \cdot 3{\tan ^2}x \cdot {\left( {\tan x} \right)^\prime } } = {\frac{1}{{{{\cos }^2}x}} + {\tan ^2}x \cdot \frac{1}{{{{\cos }^2}x}} } = {\frac{{1 + {{\tan }^2}x}}{{{{\cos }^2}x}}.}$

The numerator can be simplified using the trigonometric identity

${1 + {\tan^2}x = {\sec ^2}x } = {\frac{1}{{{{\cos }^2}x}}.}$

Therefore

${y’\left( x \right) }={ \frac{{1 + {{\tan }^2}x}}{{{{\cos }^2}x}} } = {\frac{{\frac{1}{{{{\cos }^2}x}}}}{{{{\cos }^2}x}} } = {\frac{1}{{{{\cos }^4}x}} } = {{\sec ^4}x.}$

Example 3.

$y = \cos x – {\frac{1}{3}}{\cos ^3}x$

Solution.

Using the power rule and the chain rule, we get

${y^\prime = \left( {\cos x – \frac{1}{3}{{\cos }^3}x} \right)^\prime }={ \left( {\cos x} \right)^\prime – \left( {\frac{1}{3}{{\cos }^3}x} \right)^\prime }={ – \sin x – \frac{1}{3} \cdot 3{\cos ^2}x \cdot \left( {\cos x} \right)^\prime }={ – \sin x – {\cos ^2}x \cdot \left( { – \sin x} \right) }={ – \sin x + {\cos ^2}x\sin x }={ – \sin x\left( {1 – {{\cos }^2}x} \right) }={ – \sin x\,{\sin ^2}x }={ – {\sin ^3}x.}$

Example 4.

$y = \frac{1}{{{{\cos }^n}x}}$

Solution.

We find the derivative of this function using the power rule and the chain rule:

${y’\left( x \right) = {\left( {\frac{1}{{{{\cos }^n}x}}} \right)^\prime } } = {{\left[ {{{\left( {\cos x} \right)}^{ – n}}} \right]^\prime } } = { – n{\left( {\cos x} \right)^{ – n – 1}} \cdot {\left( {\cos x} \right)^\prime } } = { – n{\left( {\cos x} \right)^{ – n – 1}} \cdot \left( { -\sin x} \right) } = {\frac{{n\sin x}}{{{{\cos }^{n + 1}}x}}.}$

Here we assume that $$\cos x \ne 0$$, that is $$x \ne {\large\frac{\pi }{2}\normalsize} + \pi n,$$ $$n \in \mathbb{Z}.$$

Example 5.

$y = {\frac{{\sin x}}{{1 + \cos x}}}$

Solution.

By the quotient rule,

$\require{cancel}{y^\prime = \left( {\frac{{\sin x}}{{1 + \cos x}}} \right)^\prime }={ \frac{{\cos x \left( {1 + \cos x} \right) – \sin x \cdot \left( { – \sin x} \right)}}{{{{\left( {1 + \cos x} \right)}^2}}} }={ \frac{{\cos x + {{\cos }^2}x + {{\sin }^2}x}}{{{{\left( {1 + \cos x} \right)}^2}}} }={ \frac{\cancel{1 + \cos x}}{{{{\left( {1 + \cos x} \right)}^\cancel{2}}}} }={ \frac{1}{{1 + \cos x}}.}$

Example 6.

$y = {\cos ^2}\sin x$

Solution.

Applying the power rule and the chain rule, we obtain:

${y’\left( x \right) = {\left( {{{\cos }^2}\sin x} \right)^\prime } } = {2\cos \sin x \cdot {\left( {\cos \sin x} \right)^\prime } } = {2\cos \sin x \cdot \left( { – \sin\sin x} \right) \cdot}\kern0pt{ {\left( {\sin x} \right)^\prime } } = { – 2\cos \sin x \cdot \sin \sin x \cdot}\kern0pt{ \cos x.}$

The last expression can be simplified by the double angle formula:

${2\cos \sin x \cdot \sin \sin x } = {\sin \left( {2\sin x} \right).}$

Consequently, the derivative is

${y’\left( x \right) }={ – \sin \left( {2\sin x} \right)\cos x.}$

Example 7.

$y = x\sin x + \cos x$

Solution.

Using the product rule, we can write:

${y^\prime = \left( {x\sin x + \cos x} \right)^\prime }={ \left( {x\sin x} \right)^\prime + \left( {\cos x} \right)^\prime }={ x^\prime\sin x + x\left( {\sin x} \right)^\prime + \left( {\cos x} \right)^\prime }={ 1 \cdot \sin x + x \cdot \cos x + \left( { – \sin x} \right) }={ \cancel{\sin x} + x\cos x – \cancel{\sin x} }={ x\cos x.}$

Page 1
Problems 1-7
Page 2
Problems 8-20