1.07PureCore

Derivatives of Functions

The gradient of a straight line is the same everywhere. The gradient of a curve changes from point to point, and differentiation\textbf{differentiation} finds a formula for it. That single idea — the rate of change at an instant — lets you find the steepness of a curve, the velocity of a moving object, and the maximum and minimum values of anything you can write as a function.

50 min Differentiation

The big picture

The derivative is defined as a limit: the gradient of a chord between two points on the curve, as the points slide together. Working that limit out once for xnx^{n} gives the power rule, and everything else in the topic is built from a short list of standard derivatives plus three combination rules. The chain rule handles functions inside functions; the product rule handles functions multiplied together; the quotient rule handles one divided by another. Learn to recognise the structure of an expression — which is exactly the decomposition skill from the functions chapter — and differentiating even complicated expressions becomes mechanical.

What you'll be able to do

  • Understand the derivative as the limit of the gradient of a chord, and differentiate from first principles
  • Differentiate xnx^{n}, ekx\mathrm{e}^{kx}, axa^{x}, ln⁡x\ln x, sin⁡kx\sin kx, cos⁡kx\cos kx and tan⁡kx\tan kx
  • Apply the chain rule, product rule and quotient rule
  • Use Leibniz notation dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} and function notation f′(x)\mathrm{f}^{\prime}(x)
1

Differentiation from first principles

The chord from (x,f(x))(x, \mathrm{f}(x)) to (x+h,f(x+h))(x + h, \mathrm{f}(x + h)) has gradient f(x+h)−f(x)h\dfrac{\mathrm{f}(x + h) - \mathrm{f}(x)}{h}. As h→0h \to 0, the chord approaches the tangent, and its gradient approaches the derivative\textbf{derivative}.

OCR expects you to carry out this limit for simple polynomials, and to show that hh is cancelled before\textit{before} it is set to zero.

f′(x)=lim⁡h→0f(x+h)−f(x)h\mathrm{f}^{\prime}(x) = \lim_{h \to 0} \dfrac{\mathrm{f}(x + h) - \mathrm{f}(x)}{h}
The definition of the derivative.
Example 1Differentiate f(x)=x3\mathrm{f}(x) = x^{3} from first principles.
1f(x+h)−f(x)=(x+h)3−x3=3x2h+3xh2+h3\mathrm{f}(x + h) - \mathrm{f}(x) = (x + h)^{3} - x^{3} = 3x^{2}h + 3xh^{2} + h^{3}.
2Divide by hh: 3x2+3xh+h23x^{2} + 3xh + h^{2}.
3As h→0h \to 0, the terms 3xh3xh and h2h^{2} tend to 00.
Answerf′(x)=3x2\mathrm{f}^{\prime}(x) = 3x^{2}
Why this works

You cannot simply put h=0h = 0 into the chord gradient — that gives 00\tfrac00. The algebra that cancels hh first is the whole point of the method, and it is what the marks are for.

2

Standard derivatives

Powers\textbf{Powers}: ddxxn=nxn−1\dfrac{\mathrm{d}}{\mathrm{d}x}x^{n} = nx^{n-1} for any rational nn. Rewrite roots and reciprocals as powers first: 1x=x−1/2\dfrac{1}{\sqrt{x}} = x^{-1/2}.

Exponentials and logs\textbf{Exponentials and logs}: ekx\mathrm{e}^{kx} differentiates to kekxk\mathrm{e}^{kx}; axa^{x} to axln⁡aa^{x}\ln a; and ln⁡x\ln x to 1x\dfrac{1}{x}.

Trigonometric functions\textbf{Trigonometric functions} (in radians): sin⁡kx→kcos⁡kx\sin kx \to k\cos kx, cos⁡kx→−ksin⁡kx\cos kx \to -k\sin kx, tan⁡kx→ksec⁡2kx\tan kx \to k\sec^{2}kx.

Derivatives of sums are sums of derivatives, and constant multiples carry through.

ddxxn=nxn−1\dfrac{\mathrm{d}}{\mathrm{d}x}x^{n} = nx^{n-1}
Power rule.
ddxekx=kekx,ddxln⁡x=1x\dfrac{\mathrm{d}}{\mathrm{d}x}\mathrm{e}^{kx} = k\mathrm{e}^{kx}, \qquad \dfrac{\mathrm{d}}{\mathrm{d}x}\ln x = \dfrac{1}{x}
Exponential and log.
ddxsin⁡kx=kcos⁡kx,ddxcos⁡kx=−ksin⁡kx\dfrac{\mathrm{d}}{\mathrm{d}x}\sin kx = k\cos kx, \qquad \dfrac{\mathrm{d}}{\mathrm{d}x}\cos kx = -k\sin kx
Trigonometric, radians only.
Example 1Differentiate y=4x−3x2+5e2xy = 4\sqrt{x} - \dfrac{3}{x^{2}} + 5\mathrm{e}^{2x}.
1Rewrite: y=4x1/2−3x−2+5e2xy = 4x^{1/2} - 3x^{-2} + 5\mathrm{e}^{2x}.
2Differentiate term by term.
Answerdydx=2x−1/2+6x−3+10e2x\dfrac{\mathrm{d}y}{\mathrm{d}x} = 2x^{-1/2} + 6x^{-3} + 10\mathrm{e}^{2x}

Tip — The trigonometric derivatives only hold in radians. In degrees an extra factor of π180\tfrac{\pi}{180} appears, which is why calculus always uses radians.

3

The chain rule

For a composite y=f(g(x))y = \mathrm{f}(\mathrm{g}(x)), let u=g(x)u = \mathrm{g}(x). Then dydx=dydu×dudx\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{\mathrm{d}y}{\mathrm{d}u} \times \dfrac{\mathrm{d}u}{\mathrm{d}x}.

In words: differentiate the outer function, leaving the inside alone, then multiply by the derivative of the inside.

A related result: dydx=1dx/dy\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{1}{\mathrm{d}x/\mathrm{d}y}, useful when xx is given as a function of yy.

dydx=dydu×dudx\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{\mathrm{d}y}{\mathrm{d}u} \times \dfrac{\mathrm{d}u}{\mathrm{d}x}
Chain rule.
Example 1Differentiate y=(3x2−1)5y = (3x^{2} - 1)^{5} and y=ln⁡(cos⁡x)y = \ln(\cos x).
1First: outer u5u^{5} gives 5u45u^{4}; inner derivative 6x6x. So 5(3x2−1)4×6x5(3x^{2} - 1)^{4} \times 6x.
2Second: outer ln⁡u\ln u gives 1u\dfrac{1}{u}; inner derivative −sin⁡x-\sin x. So −sin⁡xcos⁡x\dfrac{-\sin x}{\cos x}.
Answer30x(3x2−1)430x(3x^{2} - 1)^{4} and −tan⁡x-\tan x
4

Product and quotient rules

For a product y=uvy = uv of two functions of xx: dydx=udvdx+vdudx\dfrac{\mathrm{d}y}{\mathrm{d}x} = u\dfrac{\mathrm{d}v}{\mathrm{d}x} + v\dfrac{\mathrm{d}u}{\mathrm{d}x}.

For a quotient y=uvy = \dfrac{u}{v}: dydx=vdudx−udvdxv2\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{v\dfrac{\mathrm{d}u}{\mathrm{d}x} - u\dfrac{\mathrm{d}v}{\mathrm{d}x}}{v^{2}}. The order in the numerator matters because of the minus sign.

Set out uu, vv, u′u^{\prime} and v′v^{\prime} as four separate lines before combining them. It keeps the working checkable.

ddx(uv)=uv′+vu′\dfrac{\mathrm{d}}{\mathrm{d}x}(uv) = uv^{\prime} + vu^{\prime}
Product rule.
ddx(uv)=vu′−uv′v2\dfrac{\mathrm{d}}{\mathrm{d}x}\left(\dfrac{u}{v}\right) = \dfrac{vu^{\prime} - uv^{\prime}}{v^{2}}
Quotient rule.
Example 1Differentiate y=x2e3xy = x^{2}\mathrm{e}^{3x} and y=sin⁡xxy = \dfrac{\sin x}{x}.
1Product: u=x2u = x^{2}, u′=2xu^{\prime} = 2x; v=e3xv = \mathrm{e}^{3x}, v′=3e3xv^{\prime} = 3\mathrm{e}^{3x}. So 3x2e3x+2xe3x3x^{2}\mathrm{e}^{3x} + 2x\mathrm{e}^{3x}.
2Quotient: u=sin⁡xu = \sin x, u′=cos⁡xu^{\prime} = \cos x; v=xv = x, v′=1v^{\prime} = 1. So xcos⁡x−sin⁡xx2\dfrac{x\cos x - \sin x}{x^{2}}.
Answerxe3x(3x+2)x\mathrm{e}^{3x}(3x + 2) and xcos⁡x−sin⁡xx2\dfrac{x\cos x - \sin x}{x^{2}}

Tip — Factorise the answer to a product-rule derivative. Setting it equal to zero, as you will for stationary points, is far easier in factorised form.

5

Prove both trigonometric derivatives from first principles

Use the radian limits sin⁡h/h→1\sin h/h\to1 and (cos⁡h−1)/h→0(\cos h-1)/h\to0. The compound-angle formula separates the h-dependent terms so those limits can be used. This is a derivation, rather than merely quoting a derivative rule.

For sine, the difference quotient becomes sin⁡x cos⁡h−1h+cos⁡x sin⁡hh\sin x\,\dfrac{\cos h-1}{h}+\cos x\,\dfrac{\sin h}{h}, whose limit is cos⁡x\cos x. The cosine proof below uses the same two limits.

Example 1Derive d(cos⁡x)/dx=−sin⁡xd(\cos x)/dx=-\sin x from first principles.
1Start with lim⁡h→0[cos⁡(x+h)−cos⁡x]/h\lim_{h\to0}[\cos(x+h)-\cos x]/h.
2Expand cos⁡(x+h)=cos⁡xcos⁡h−sin⁡xsin⁡h\cos(x+h)=\cos x\cos h-\sin x\sin h.
3Group to obtain cos⁡x [(cos⁡h−1)/h]−sin⁡x [sin⁡h/h]\cos x\,[(\cos h-1)/h]-\sin x\,[\sin h/h].
4As h tends to zero, the limits of the brackets are 0 and 1, respectively. The result is 0−sin⁡x0-\sin x.
Answerd(cos⁡x)/dx=−sin⁡xd(\cos x)/dx=-\sin x, provided x is measured in radians.

Think like an examiner

  • In first-principles proofs, cancel hh before letting h→0h \to 0, and write the limit notation.
  • Rewrite roots and reciprocals as powers before differentiating.
  • Show uu, vv, u′u^{\prime}, v′v^{\prime} explicitly for product and quotient rules.
  • Work in radians whenever trigonometric functions are differentiated.

Common misconceptions

Differentiating e3x\mathrm{e}^{3x} as 3xe3x−13x\mathrm{e}^{3x-1}.
Exponentials are not powers of xx: ddxe3x=3e3x\dfrac{\mathrm{d}}{\mathrm{d}x}\mathrm{e}^{3x} = 3\mathrm{e}^{3x}.
Differentiating (2x+1)4(2x + 1)^{4} as 4(2x+1)34(2x + 1)^{3}.
Multiply by the inner derivative: 8(2x+1)38(2x + 1)^{3}.
Writing ddxcos⁡x=sin⁡x\dfrac{\mathrm{d}}{\mathrm{d}x}\cos x = \sin x.
ddxcos⁡x=−sin⁡x\dfrac{\mathrm{d}}{\mathrm{d}x}\cos x = -\sin x.
Differentiating a product as the product of the derivatives.
Use uv′+vu′uv^{\prime} + vu^{\prime}.

Differentiation rules

ddxxn=nxn−1\tfrac{\mathrm{d}}{\mathrm{d}x}x^{n} = nx^{n-1}
Power rule.
dydx=dydududx\tfrac{\mathrm{d}y}{\mathrm{d}x} = \tfrac{\mathrm{d}y}{\mathrm{d}u}\tfrac{\mathrm{d}u}{\mathrm{d}x}
Chain rule.
(uv)′=uv′+vu′(uv)^{\prime} = uv^{\prime} + vu^{\prime}
Product rule.
(uv)′=vu′−uv′v2\left(\tfrac{u}{v}\right)^{\prime} = \tfrac{vu^{\prime} - uv^{\prime}}{v^{2}}
Quotient rule.

Stretch yourself

Prove from first principles that the derivative of sin⁡x\sin x is cos⁡x\cos x, given that sin⁡hh→1\dfrac{\sin h}{h} \to 1 and cos⁡h−1h→0\dfrac{\cos h - 1}{h} \to 0 as h→0h \to 0 (with hh in radians).

Hint — Expand sin⁡(x+h)\sin(x + h) with the compound angle formula, then group the terms containing sin⁡x\sin x and cos⁡x\cos x.

Reveal solution
SolutionThe chord gradient is sin⁡(x+h)−sin⁡xh=sin⁡xcos⁡h+cos⁡xsin⁡h−sin⁡xh\dfrac{\sin(x + h) - \sin x}{h} = \dfrac{\sin x\cos h + \cos x\sin h - \sin x}{h}. Grouping, this is sin⁡x(cos⁡h−1h)+cos⁡x(sin⁡hh)\sin x\left(\dfrac{\cos h - 1}{h}\right) + \cos x\left(\dfrac{\sin h}{h}\right). As h→0h \to 0, the first bracket tends to 00 and the second to 11, so the limit is sin⁡x×0+cos⁡x×1=cos⁡x\sin x \times 0 + \cos x \times 1 = \cos x. Hence ddxsin⁡x=cos⁡x\dfrac{\mathrm{d}}{\mathrm{d}x}\sin x = \cos x. The two given limits are only true in radians — which is precisely why the result requires radians. ■\blacksquare

Questions students ask

What does dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} actually mean?
The rate of change of yy with respect to xx — the gradient of the curve at a point. It is a single symbol, not a fraction, although it often behaves like one.
When do I use the chain rule?
Whenever a function is applied to something other than plain xx — a bracket to a power, e\mathrm{e} to a power, sine of an expression, and so on.
Can I avoid the quotient rule?
Yes: write uv\dfrac{u}{v} as uv−1uv^{-1} and use the product and chain rules. The result is the same, though it may need simplifying.
Why must trig derivatives use radians?
The limit sin⁡hh→1\dfrac{\sin h}{h} \to 1 only holds in radians. In degrees every derivative gains a factor of π180\tfrac{\pi}{180}.

Key takeaways

  • The derivative is the limit of the chord gradient as h→0h \to 0.
  • Power rule nxn−1nx^{n-1}; ekx→kekx\mathrm{e}^{kx} \to k\mathrm{e}^{kx}; ln⁡x→1x\ln x \to \tfrac1x; trig derivatives in radians.
  • Chain rule for composites: outer derivative times inner derivative.
  • Product rule uv′+vu′uv^{\prime} + vu^{\prime}; quotient rule vu′−uv′v2\dfrac{vu^{\prime} - uv^{\prime}}{v^{2}}.
  • Rewrite expressions as powers and factorise results.

How this fits the course

Test yourself

Answer a few questions, then review anything you missed.

Next step

Keep practising

Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.

Browse practice topics

Related lessons

All 6 lessons

Put the methods into practice: see how A-Level maths duels work. An account is required to play; the overview and sample are public.