Derivatives of Trigonometric Functions
The derivative of $\sin x$ is $\cos x$, the derivative of $\cos x$ is $-\sin x$ and the derivative of $\tan x$ is $\sec^2 x = \dfrac{1}{\cos^2 x}$. Here are all six trig derivatives, why they are true and how to use them with the chain rule. (Angles are always in radians.)
📋 Table of trigonometric derivatives
| Function | Derivative |
|---|---|
| $\sin x$ | $\cos x$ |
| $\cos x$ | $-\sin x$ |
| $\tan x$ | $\sec^2 x = \dfrac{1}{\cos^2 x} = 1+\tan^2 x$ |
| $\cot x$ | $-\csc^2 x = -\dfrac{1}{\sin^2 x} = -(1+\cot^2 x)$ |
| $\sec x = \dfrac{1}{\cos x}$ | $\sec x\tan x$ |
| $\csc x = \dfrac{1}{\sin x}$ | $-\csc x\cot x$ |
💡 Memory aid: the derivatives of the "co"-functions ($\cos$, $\cot$, $\csc$) all start with a minus sign.
🔗 Trig functions of an inner function
With the chain rule, multiply by the derivative of the argument $u(x)$:
Typical cases: $(\sin 3x)' = 3\cos 3x$, $(\cos x^2)' = -2x\sin x^2$, $(\tan(5x-1))' = 5\sec^2(5x-1)$.
🔍 Proofs
Derivative of sin x
With the addition theorem $\sin(x+h) = \sin x\cos h + \cos x\sin h$:
using the standard limits $\lim_{h\to0}\frac{\sin h}{h} = 1$ and $\lim_{h\to0}\frac{\cos h-1}{h} = 0$ (valid in radians).
Derivative of cos x
$\cos x = \sin\!\left(x+\frac{\pi}{2}\right)$, so $(\cos x)' = \cos\!\left(x+\frac{\pi}{2}\right) = -\sin x$.
Derivative of tan x
Quotient rule with $\tan x = \frac{\sin x}{\cos x}$:
✏️ Worked examples
Example 1: $3\sin x - 2\cos x$
$f'(x) = 3\cos x + 2\sin x$
Example 2: $\sin(2x)$
$f'(x) = 2\cos(2x)$
Example 3: $\cos^2 x$
Power of a function: $2\cos x\cdot(-\sin x)$.
$f'(x) = -2\sin x\cos x = -\sin(2x)$
Example 4: $x\cos x$
$f'(x) = \cos x - x\sin x$
Example 5: $\tan(x^2)$
$f'(x) = 2x\sec^2(x^2) = \dfrac{2x}{\cos^2(x^2)}$
Example 6: $\dfrac{\sin x}{x}$
Quotient rule:
$f'(x) = \dfrac{x\cos x - \sin x}{x^2}$
Example 7: $e^x\sin x$
$f'(x) = e^x(\sin x + \cos x)$
🔁 Higher derivatives of sin and cos
Differentiating $\sin x$ repeatedly cycles through four functions:
So the $n$-th derivative repeats every four steps: $\frac{d^{4}}{dx^{4}}\sin x = \sin x$, $\frac{d^{10}}{dx^{10}}\sin x = -\sin x$.
⚠️ Common mistakes
Forgetting the minus sign of $(\cos x)' = -\sin x$.
Using degrees: the formulas only hold in radians. In degrees, $(\sin x^\circ)' = \frac{\pi}{180}\cos x^\circ$.
Confusing $\sin^2 x$ and $\sin(x^2)$: $(\sin^2x)' = 2\sin x\cos x$, but $(\sin x^2)' = 2x\cos x^2$.
Missing inner derivative: $(\cos 4x)' = -4\sin 4x$, not $-\sin 4x$.
🧮 Try it with the step-by-step calculator
Open any of these examples in the calculator to see every single differentiation step:
Or enter your own function on the derivative calculator.
❓ Frequently asked questions
What is the derivative of sin(x)?
$\frac{d}{dx}\sin x = \cos x$ (with $x$ in radians).
What is the derivative of cos(x)?
$\frac{d}{dx}\cos x = -\sin x$.
What is the derivative of tan(x)?
$\frac{d}{dx}\tan x = \sec^2 x = \frac{1}{\cos^2 x} = 1 + \tan^2 x$.
What is the derivative of sec(x)?
$\frac{d}{dx}\sec x = \sec x\,\tan x$.
What is the derivative of cot(x)?
$\frac{d}{dx}\cot x = -\csc^2 x = -\frac{1}{\sin^2 x}$.
What is the derivative of sin(2x)?
By the chain rule $\frac{d}{dx}\sin(2x) = 2\cos(2x)$.
What is the derivative of sin²(x)?
$\frac{d}{dx}\sin^2 x = 2\sin x\cos x = \sin(2x)$.