Advanced level

The derivative

A derivative measures how fast a function changes at a point — it is the slope of the tangent to the graph. Meet the definition through the difference quotient and the six rules that compute it without taking a limit every time.

Before you start

This topic builds on earlier ideas. Before you start, it's worth working through the lessons below — they'll make everything click:

All formulas

  • Definition of the derivative

    f(x0)=limh0f(x0+h)f(x0)hf'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}

    the limit of the difference quotient as the increment shrinks to zero

  • Power rule

    (xn)=nxn1(x^n)' = n \cdot x^{n-1}

    the exponent steps in front of x and drops by one

  • Constants and sums

    (cf)=cf,(f+g)=f+g(c \cdot f)' = c \cdot f', \qquad (f + g)' = f' + g'

    a constant factor passes through; a sum differentiates term by term

  • Product rule

    (fg)=fg+fg(f \cdot g)' = f' g + f g'

    the derivative of a product is NOT the product of the derivatives

  • Quotient rule

    (fg)=fgfgg2\left(\frac{f}{g}\right)' = \frac{f' g - f g'}{g^2}

    a difference on top — the order matters

  • Chain rule

    (f(g(x)))=f(g(x))g(x)\big(f(g(x))\big)' = f'(g(x)) \cdot g'(x)

    the outer derivative times the derivative of the inside

  • Root and reciprocal

    (x)=12x,(1x)=1x2(\sqrt{x})' = \frac{1}{2\sqrt{x}}, \qquad \left(\frac{1}{x}\right)' = -\frac{1}{x^2}

    the same power rule with exponents ½ and −1

  • Trigonometric functions

    (sinx)=cosx,(cosx)=sinx(\sin x)' = \cos x, \qquad (\cos x)' = -\sin x

    the cosine picks up a minus sign

The graph of a function is rarely a straight line, so the question "how fast does it grow" has no single answer — at every point it grows differently. The derivative is the tool that gives that rate for one point.

The difference quotient: an average rate of change

Start with something we can already compute: the slope of a secant, the line through two points of the graph.

−1012340246810xysecantA(1, 1)B(3, 9)f(x) = x²
A secant through A(1, 1) and B(3, 9). From 1 to 3 the value rose by 8 while the argument rose by 2, so the average rate of change is 4.

For f(x)=x2f(x) = x^2, the point x0=1x_0 = 1 and an increment h=2h = 2:

f(1+h)f(1)h=912=4\frac{f(1 + h) - f(1)}{h} = \frac{9 - 1}{2} = 4

This fraction is the difference quotient. It only speaks about the whole stretch, though — and what we want is the rate exactly at 11.

From secant to tangent

So let hh shrink. The point BB slides down the curve towards AA and the secant rotates about AA:

hhpoint BBdifference quotient
22(3,9)(3, 9)44
11(2,4)(2, 4)33
0.50.5(1.5, 2.25)(1.5,\ 2.25)2.52.5
0.10.1(1.1, 1.21)(1.1,\ 1.21)2.12.1
0.010.01(1.01, 1.0201)(1.01,\ 1.0201)2.012.01

The numbers head for 22 — and that is no coincidence, because the difference quotient simplifies:

(1+h)212h=1+2h+h21h=h(2+h)h=2+h\frac{(1 + h)^2 - 1^2}{h} = \frac{1 + 2h + h^2 - 1}{h} = \frac{h(2 + h)}{h} = 2 + h

As h0h \to 0 only 22 remains. The secant stops being a secant: it touches the graph at a single point and becomes the tangent.

−101234−20246810xyy = 2x − 1f′(1) = 2f(x) = x²
The limit of those secants: the tangent to the parabola at (1, 1). Its slope is 2 — exactly the value of the derivative there.

The definition

f(x0)=limh0f(x0+h)f(x0)hf'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}

The derivative of ff at x0x_0 is the limit of the difference quotient as the increment tends to zero. Note that at h=0h = 0 the fraction reads 00\tfrac{0}{0} — without the limit from the previous lesson this definition would make no sense at all.

Three readings of the same number:

  • geometric — the slope of the tangent to the graph at x0x_0;
  • physical — the instantaneous speed, when the argument is time and the value is distance;
  • practical — roughly how much the value moves when the argument grows by one unit.

Asking for the derivative at every point at once produces a new function, written ff' — and that function is usually what the computation is after.

Use the definition to differentiate f(x) = x² + 3x at an arbitrary point x.

The power rule

Computing every derivative from the definition would be punishing. Fortunately the definition yields rules that are then applied mechanically. The most important one:

(xn)=nxn1(x^n)' = n \cdot x^{n-1}

The exponent steps in front of xx and drops by one. The rule holds for any exponent — fractional and negative included, which settles roots and reciprocals:

functionas a powerderivative
cc (a constant)cx0c \cdot x^000
xxx1x^111
x3x^3x3x^33x23x^2
x\sqrt{x}x1/2x^{1/2}12x\dfrac{1}{2\sqrt{x}}
1x\dfrac{1}{x}x1x^{-1}1x2-\dfrac{1}{x^2}
1x2\dfrac{1}{x^2}x2x^{-2}2x3-\dfrac{2}{x^3}
sinx\sin xcosx\cos x
cosx\cos xsinx-\sin x

The derivative of a constant is zero, because a constant function does not change — its graph is horizontal, and the slope of a horizontal line is 00.

Constants, sums and polynomials

Two rules that break any polynomial into pieces:

(cf)=cf,(f+g)=f+g(c \cdot f)' = c \cdot f', \qquad (f + g)' = f' + g'

A constant factor passes through the derivative untouched, and a sum is differentiated term by term. Together with the power rule that is a recipe for any polynomial:

(4x35x2+7x9)=12x210x+7(4x^3 - 5x^2 + 7x - 9)' = 12x^2 - 10x + 7

Every term on its own, and the constant term disappears.

The product rule

(fg)=fg+fg(f \cdot g)' = f' g + f g'

The derivative of a product is not the product of the derivatives — worth checking on the simplest example there is. With f=g=xf = g = x we get (xx)=(x2)=2x(x \cdot x)' = (x^2)' = 2x, while the product of the derivatives is 11=11 \cdot 1 = 1.

Differentiate f(x) = (2x + 1)(x² − 3).

The quotient rule

(fg)=fgfgg2\left(\frac{f}{g}\right)' = \frac{f' g - f g'}{g^2}

There is a difference on top, so the order matters — swapping the two terms flips the sign of the whole answer. The denominator is squared.

Differentiate f(x) = (3x + 2)/(x − 4).

The chain rule

(f(g(x)))=f(g(x))g(x)\big(f(g(x))\big)' = f'(g(x)) \cdot g'(x)

When a function is a composition — something substituted into something else — differentiate the outer function as if its inside were a plain xx, then multiply by the derivative of the inside. That multiplication is the easiest thing in calculus to forget.

((2x+1)5)=5(2x+1)42=10(2x+1)4\big((2x + 1)^5\big)' = 5(2x + 1)^4 \cdot 2 = 10(2x + 1)^4 (sin3x)=cos3x3=3cos3x\big(\sin 3x\big)' = \cos 3x \cdot 3 = 3\cos 3x (4x+5)=124x+54=24x+5\big(\sqrt{4x + 5}\big)' = \frac{1}{2\sqrt{4x + 5}} \cdot 4 = \frac{2}{\sqrt{4x + 5}}
Differentiate f(x) = (x² − 3)⁴ and point out where the derivative of the inside shows up in the answer.

Exercises

The exercises walk through every rule in this lesson in turn: a power with a non-integer exponent, a polynomial, a product, a quotient, a composition, and the value of a derivative at a point. Where the question asks for f(x)f'(x) the answer is a function — type it in any correct form, because what is graded is equality of functions rather than of strings (6x^2 + 2x - 6 and 6x²+2x−6 pass alike). Only the last kind of question, about f(x0)f'(x_0), expects a number.

Practice

Work through a set of exercises — they get harder as you go. At the end you'll see your score and the mistakes worth reviewing.

Exercise 1 of 8Score: 0
f(x) = 2/x → f′(x)

Common mistakes

  • Dropping the derivative of the inside(sin3x)=3cos3x\big(\sin 3x\big)' = 3\cos 3x, not cos3x\cos 3x.
  • Multiplying derivatives instead of using the product rule(fg)=fg+fg(fg)' = f'g + fg', never fgf'g'.
  • Reversing the quotient rule — the numerator is fgf'g first, then fgfg' subtracted.
  • A constant differentiating to a constant — a constant function does not change, so its derivative is 00.
  • Losing the minus in 1/x and in the cosine(1x)=1x2\left(\tfrac{1}{x}\right)' = -\tfrac{1}{x^2} and (cosx)=sinx(\cos x)' = -\sin x.
  • Confusing f′(x) with f′(x₀) — the first is a function, the second a number: that function's value at one point.

Formula card

Topic: The derivative

  • Definition of the derivative

    f(x0)=limh0f(x0+h)f(x0)hf'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}

    the limit of the difference quotient as the increment shrinks to zero

  • Power rule

    (xn)=nxn1(x^n)' = n \cdot x^{n-1}

    the exponent steps in front of x and drops by one

  • Constants and sums

    (cf)=cf,(f+g)=f+g(c \cdot f)' = c \cdot f', \qquad (f + g)' = f' + g'

    a constant factor passes through; a sum differentiates term by term

  • Product rule

    (fg)=fg+fg(f \cdot g)' = f' g + f g'

    the derivative of a product is NOT the product of the derivatives

  • Quotient rule

    (fg)=fgfgg2\left(\frac{f}{g}\right)' = \frac{f' g - f g'}{g^2}

    a difference on top — the order matters

  • Chain rule

    (f(g(x)))=f(g(x))g(x)\big(f(g(x))\big)' = f'(g(x)) \cdot g'(x)

    the outer derivative times the derivative of the inside

  • Root and reciprocal

    (x)=12x,(1x)=1x2(\sqrt{x})' = \frac{1}{2\sqrt{x}}, \qquad \left(\frac{1}{x}\right)' = -\frac{1}{x^2}

    the same power rule with exponents ½ and −1

  • Trigonometric functions

    (sinx)=cosx,(cosx)=sinx(\sin x)' = \cos x, \qquad (\cos x)' = -\sin x

    the cosine picks up a minus sign

−1012340246810xysecantA(1, 1)B(3, 9)f(x) = x²
A secant through A(1, 1) and B(3, 9) on the parabola y = x². Its slope of 4 is the difference quotient — the average rate of change from 1 to 3.
−101234−20246810xyy = 2x − 1f′(1) = 2f(x) = x²
The tangent to y = x² at the point (1, 1). Its slope of 2 is the value of the derivative: f′(1) = 2.

Frequently asked questions

Related articles