Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Maths - Methods (Unit 3 & Unit 4) Differentiation

Differentiation of trigonometric functions

20 practice questions 0 video lessons Theory + worked examples
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

Differentiating trigonometric functions (in radians) uses the standard rules \(\dfrac{d}{dx}\sin x=\cos x\), \(\dfrac{d}{dx}\cos x=-\sin x\) and \(\dfrac{d}{dx}\tan x=\sec^{2}x\). For a composite such as \(\sin(3x)\) use the chain rule, and combine with the product and quotient rules when a trig function multiplies a polynomial or \(e^{x}\).

The derivative of a trigonometric function gives the gradient of its curve. In radians, the three standard results are \(\dfrac{d}{dx}\sin x=\cos x\), \(\dfrac{d}{dx}\cos x=-\sin x\) and \(\dfrac{d}{dx}\tan x=\sec^{2}x=\dfrac{1}{\cos^{2}x}\). The minus sign belongs to the derivative of cosine; the \(\tan\) result follows from the quotient rule on \(\tan x=\dfrac{\sin x}{\cos x}\).

For a composite function, the chain rule applies: \(\dfrac{d}{dx}\sin\!\big(f(x)\big)=f'(x)\cos\!\big(f(x)\big)\) and \(\dfrac{d}{dx}\cos\!\big(f(x)\big)=-f'(x)\sin\!\big(f(x)\big)\). You differentiate the outer trig function and multiply by the derivative of the inside — never dropping that inner factor.

When a trig function is multiplied by (or divided by) another function — a polynomial or \(e^{x}\) — use the product rule \((uv)'=u'v+uv'\) or the quotient rule. Evaluating a derivative at an exact-value angle (\(\tfrac{\pi}{6},\tfrac{\pi}{4},\tfrac{\pi}{3}\)) gives an exact gradient, used to find tangents and stationary points.

Key idea. \(\dfrac{d}{dx}\sin x=\cos x\), \(\dfrac{d}{dx}\cos x=-\sin x\), \(\dfrac{d}{dx}\tan x=\sec^{2}x\); for \(\sin\!\big(f(x)\big)\) or \(\cos\!\big(f(x)\big)\) multiply by \(f'(x)\).
The derivative of sin x is cos xThe sine curve in blue and its derivative the cosine curve in dashed red over one period; the cosine gives the gradient of the sine at every point. x y y=sin x y'=cos x
Differentiating \(y=\sin x\) gives its gradient function \(y'=\cos x\)
Gradient of sin x at pi over 3The sine curve with a short red tangent line touching at the point where x equals pi over 3; the tangent gradient equals cos of pi over 3, which is one half. x y (π/3, 0.87) m=1/2
Gradient of \(y=\sin x\) at \(x=\tfrac{\pi}{3}\) is \(\cos\tfrac{\pi}{3}=\tfrac12\)

The three standard derivatives (radians):

\[\frac{d}{dx}\sin x=\cos x \qquad \frac{d}{dx}\cos x=-\sin x \qquad \frac{d}{dx}\tan x=\sec^{2}x=\frac{1}{\cos^{2}x}\]
ddxsinx=cosx

The chain rule for a composite trig function:

\[\frac{d}{dx}\sin\!\big(f(x)\big)=f'(x)\cos\!\big(f(x)\big) \qquad \frac{d}{dx}\cos\!\big(f(x)\big)=-f'(x)\sin\!\big(f(x)\big)\]
ddxsin(f(x))=f(x)cos(f(x))

The product rule (a trig function times another function):

\[(uv)'=u'v+uv' \qquad \frac{d}{dx}\big(x\sin x\big)=\sin x+x\cos x\]
(uv)=uv+uv
Degrees. The rules hold only in radians. For \(\sin x^{\circ}\), convert first: \(\sin x^{\circ}=\sin\dfrac{\pi x}{180}\), so \(\dfrac{d}{dx}\sin x^{\circ}=\dfrac{\pi}{180}\cos x^{\circ}\).

How to differentiate a trigonometric function

  1. Check it is in radians. If the angle is in degrees, rewrite it in radians first (\(x^{\circ}=\tfrac{\pi x}{180}\)) before differentiating.
  2. Apply the standard rule. \(\dfrac{d}{dx}\sin x=\cos x\), \(\dfrac{d}{dx}\cos x=-\sin x\), \(\dfrac{d}{dx}\tan x=\sec^{2}x\). Keep the minus sign on the cosine.
  3. Composite? Use the chain rule. For \(\sin\!\big(f(x)\big)\) or \(\cos\!\big(f(x)\big)\), multiply by \(f'(x)\); e.g. \(\dfrac{d}{dx}\cos(3x)=-3\sin(3x)\).
  4. Product or quotient? Combine the rules. When trig multiplies a polynomial or \(e^{x}\), use \((uv)'=u'v+uv'\) (or the quotient rule), then express in simplest and factorised form.
  5. Need a gradient, tangent or stationary point? Evaluate the derivative at the point for the gradient; set \(y'=0\) and solve to locate stationary points.
Simplest form. The syllabus asks for derivatives in simplest and factorised form — e.g. write \(e^{x}\sin x+e^{x}\cos x\) as \(e^{x}(\sin x+\cos x)\).
Example 1 — standard and chain rule
Differentiate (a) \(y=4\sin x-\cos x\) and (b) \(y=\sin(2x-1)\).
Solution
(a) \(y=4\sin x-\cos x\)
Differentiate term by term — \(\dfrac{d}{dx}\sin x=\cos x\), \(\dfrac{d}{dx}\cos x=-\sin x\):
\(y'\)\(=\)\(4\cos x-(-\sin x)\)
\(=\)\(4\cos x+\sin x\)
\(\therefore\) \(y'=4\cos x+\sin x\)
(b) \(y=\sin(2x-1)\)
Chain rule — the inner \(2x-1\) has derivative \(2\):
\(y'\)\(=\)\(\cos(2x-1)\times 2\)
\(=\)\(2\cos(2x-1)\)
\(\therefore\) \(y'=2\cos(2x-1)\)
y=2cos(2x-1)
Example 2 — product rule (with \(e^{x}\))
Differentiate \(y=e^{x}\sin x\) and express in factorised form.
Solution
Set up the product rule — \(u=e^{x}\), \(v=\sin x\):
\(u'\)\(=\)\(e^{x}\)
\(v'\)\(=\)\(\cos x\)
Apply \((uv)'=u'v+uv'\):
\(y'\)\(=\)\(e^{x}\sin x+e^{x}\cos x\)
Factorise — take out \(e^{x}\):
\(y'\)\(=\)\(e^{x}(\sin x+\cos x)\)
\(\therefore\) \(y'=e^{x}(\sin x+\cos x)\)
y=ex(sinx+cosx)
Example 3 — tangent at an exact angle
Find the equation of the tangent to \(y=\cos x\) at \(x=\dfrac{\pi}{2}\).
Solution
Point — substitute \(x=\dfrac{\pi}{2}\) into the curve:
\(y\!\left(\dfrac{\pi}{2}\right)\)\(=\)\(\cos\dfrac{\pi}{2}\)
\(=\)\(0\)

Point of contact: \(\left(\dfrac{\pi}{2},\ 0\right)\).

Gradient — differentiate, then substitute:
\(y'\)\(=\)\(-\sin x\)
\(m=y'\!\left(\dfrac{\pi}{2}\right)\)\(=\)\(-\sin\dfrac{\pi}{2}=-1\)
Line — use \(y-y_{1}=m(x-x_{1})\):
\(y-0\)\(=\)\(-1\left(x-\dfrac{\pi}{2}\right)\)
\(y\)\(=\)\(-x+\dfrac{\pi}{2}\)
\(\therefore\) Tangent: \(y=-x+\dfrac{\pi}{2}\)
Tangent to y=cos x at pi over 2The cosine curve with a red tangent line of gradient negative one touching at the point pi over 2, zero. x y (π/2, 0) y=-x+π/2
y=-x+π2
Example 4 — stationary points
Find the stationary points of \(y=\sin x+\cos x\) on \([0,2\pi]\).
Solution
Set the derivative to zero — stationary points have \(y'=0\):
\(y'\)\(=\)\(\cos x-\sin x\)
\(\cos x-\sin x\)\(=\)\(0\)
Solve for \(x\) on \([0,2\pi]\):
\(\cos x\)\(=\)\(\sin x\)
\(\tan x\)\(=\)\(1\)
\(x\)\(=\)\(\dfrac{\pi}{4},\ \dfrac{5\pi}{4}\)
At \(x=\dfrac{\pi}{4}\)
\(y\)\(=\)\(\sin\dfrac{\pi}{4}+\cos\dfrac{\pi}{4}\)
\(=\)\(\dfrac{1}{\sqrt2}+\dfrac{1}{\sqrt2}=\sqrt2\)

Maximum \(\left(\dfrac{\pi}{4},\ \sqrt2\right)\).

At \(x=\dfrac{5\pi}{4}\)
\(y\)\(=\)\(\sin\dfrac{5\pi}{4}+\cos\dfrac{5\pi}{4}\)
\(=\)\(-\dfrac{1}{\sqrt2}-\dfrac{1}{\sqrt2}=-\sqrt2\)

Minimum \(\left(\dfrac{5\pi}{4},\ -\sqrt2\right)\).

\(\therefore\) maximum \(\sqrt2\) at \(x=\dfrac{\pi}{4}\); minimum \(-\sqrt2\) at \(x=\dfrac{5\pi}{4}\)
x=π4,5π4

Common pitfalls

Keep the minus sign on \(\cos\). \(\dfrac{d}{dx}\cos x=-\sin x\). Writing \(+\sin x\) is the most frequent error.
Do not drop the inner factor. \(\dfrac{d}{dx}\cos(3x)=-3\sin(3x)\), not \(-\sin(3x)\). The chain rule multiplies by \(f'(x)\).
Radians, not degrees. The rules assume radians. To differentiate \(\sin x^{\circ}\), rewrite as \(\sin\dfrac{\pi x}{180}\) first, giving \(\dfrac{\pi}{180}\cos x^{\circ}\).

Frequently asked questions

What is the derivative of sin x and cos x?

In radians, \(\dfrac{d}{dx}\sin x=\cos x\) and \(\dfrac{d}{dx}\cos x=-\sin x\). Also \(\dfrac{d}{dx}\tan x=\sec^{2}x=\dfrac{1}{\cos^{2}x}\).

How do you differentiate sin(f(x)) or cos(f(x))?

Chain rule: \(\dfrac{d}{dx}\sin\!\big(f(x)\big)=f'(x)\cos\!\big(f(x)\big)\) and \(\dfrac{d}{dx}\cos\!\big(f(x)\big)=-f'(x)\sin\!\big(f(x)\big)\). E.g. \(\dfrac{d}{dx}\cos(3x)=-3\sin(3x)\).

Why must the angle be in radians?

The rules only hold in radians. For \(\sin x^{\circ}\), rewrite as \(\sin\dfrac{\pi x}{180}\); then \(\dfrac{d}{dx}\sin x^{\circ}=\dfrac{\pi}{180}\cos x^{\circ}\).

How do you differentiate x sin x or e^x sin x?

Product rule \((uv)'=u'v+uv'\). So \(\dfrac{d}{dx}(x\sin x)=\sin x+x\cos x\) and \(\dfrac{d}{dx}(e^{x}\sin x)=e^{x}(\sin x+\cos x)\).

How do you find the gradient at an exact angle?

Evaluate the derivative there. For \(y=\sin x\), \(y'=\cos x\), so at \(x=\dfrac{\pi}{3}\) the gradient is \(\cos\dfrac{\pi}{3}=\dfrac12\).

How do you find stationary points of a trig function?

Set \(y'=0\) and solve on the domain. For \(y=\sin x+\cos x\), \(y'=\cos x-\sin x=0\Rightarrow\tan x=1\), so \(x=\dfrac{\pi}{4},\dfrac{5\pi}{4}\) on \([0,2\pi]\).