We cannot find a tangent's gradient directly, because we only know one point on it. Instead we take a second point $Q$ on the curve, find the gradient of the chord $PQ$, and see what happens as $Q$ moves towards $P$.
$P$ is the point $(1, 1)$ on $y = x^2$. $Q$ is the point on the curve with $x$-coordinate $1 + h$. Find the gradient of $PQ$ for several values of $h$.
| $h$ | $Q$ | Gradient of $PQ = \dfrac{(1+h)^2 - 1}{h}$ |
|---|---|---|
| $2$ | $(3,\, 9)$ | $\dfrac{9 - 1}{2} = 4$ |
| $1$ | $(2,\, 4)$ | $\dfrac{4 - 1}{1} = 3$ |
| $0.5$ | $(1.5,\, 2.25)$ | $\dfrac{1.25}{0.5} = 2.5$ |
| $0.1$ | $(1.1,\, 1.21)$ | $\dfrac{0.21}{0.1} = 2.1$ |
| $0.01$ | $(1.01,\, 1.0201)$ | $\dfrac{0.0201}{0.01} = 2.01$ |
| $-0.01$ | $(0.99,\, 0.9801)$ | $\dfrac{-0.0199}{-0.01} = 1.99$ |
Doing the table algebraically for a general point gives a formula for the gradient everywhere at once. For $y = \mathrm{f}(x)$, take $P\left(x,\, \mathrm{f}(x)\right)$ and $Q\left(x + h,\, \mathrm{f}(x+h)\right)$:
"$\displaystyle\lim_{h \to 0}$" means the value the expression approaches as $h$ gets closer and closer to $0$. We never actually put $h = 0$ into the fraction โ that would give $\frac00$. We simplify first, so that the $h$ in the denominator cancels, and only then let $h \to 0$.
| Notation | Read as | Meaning |
|---|---|---|
| $\mathrm{f}'(x)$ | "f dash of $x$" | The derivative (gradient function) of $\mathrm{f}$ |
| $\dfrac{\mathrm{d}y}{\mathrm{d}x}$ | "dee $y$ by dee $x$" | The rate of change of $y$ with respect to $x$ |
| $\delta x$, $\delta y$ | "delta $x$", "delta $y$" | A small change in $x$ and the matching change in $y$ |
- Write down $\mathrm{f}(x + h)$ and expand it fully.
- Subtract $\mathrm{f}(x)$ โ every term without an $h$ should cancel.
- Divide by $h$ โ every remaining term has an $h$ to cancel.
- Let $h \to 0$ and state the result with $\displaystyle\lim_{h \to 0}$ written in.
Prove from first principles that the derivative of $x^2$ is $2x$.
Prove from first principles that $\dfrac{\mathrm{d}}{\mathrm{d}x}\left(x^3\right) = 3x^2$.
Find $\mathrm{f}'(x)$ from first principles, where $\mathrm{f}(x) = 5x^2 - 3x$.
Use first principles to differentiate (a) $\mathrm{f}(x) = mx + c$ (b) $\mathrm{g}(x) = k$ (a constant).
| $\mathrm{f}(x)$ | $1$ | $x$ | $x^2$ | $x^3$ | $x^4$ |
|---|---|---|---|---|---|
| $\mathrm{f}'(x)$ | $0$ | $1$ | $2x$ | $3x^2$ | $4x^3$ |
This rule โ which also works for negative and fractional $n$ โ is developed and used on the Differentiating Powers of $x$ page. Here is one case with a negative power, done from first principles.
Show from first principles that the derivative of $\mathrm{f}(x) = \dfrac1x$ is $-\dfrac{1}{x^2}$.
Gradient of a curve
The gradient of the tangent at that point.
Chord
Gradient $\dfrac{\mathrm{f}(x+h) - \mathrm{f}(x)}{h}$
Definition
$\mathrm{f}'(x) = \displaystyle\lim_{h\to0}\dfrac{\mathrm{f}(x+h)-\mathrm{f}(x)}{h}$
Notation
$\mathrm{f}'(x)$ and $\dfrac{\mathrm{d}y}{\mathrm{d}x}$ mean the same.
Method
Expand, subtract, divide by $h$, let $h \to 0$.
$x^2$
Chord gradient $2x + h \to 2x$
$x^3$
$3x^2 + 3xh + h^2 \to 3x^2$
Pattern
$kx^n \to knx^{n-1}$
Never
substitute $h = 0$ before cancelling.
Find the gradient of the chord joining the points on $y = x^2$ with $x = 2$ and $x = 2.1$. What does this suggest about the gradient of the curve at $x = 2$?
โถ Show solution
Points $(2, 4)$ and $(2.1, 4.41)$. Gradient $= \dfrac{0.41}{0.1} = 4.1$.
This suggests the gradient at $x = 2$ is a little less than $4.1$ โ in fact it is $2 \times 2 = 4$.
Points $P$ and $Q$ on $y = x^2$ have $x$-coordinates $3$ and $3 + h$. Show that the gradient of $PQ$ is $6 + h$, and deduce the gradient of the curve at $P$.
โถ Show solution
$\dfrac{(3+h)^2 - 9}{h} = \dfrac{9 + 6h + h^2 - 9}{h} = \dfrac{6h + h^2}{h} = 6 + h$.
As $h \to 0$, the gradient tends to $6$.
Differentiate $\mathrm{f}(x) = 3x^2$ from first principles.
โถ Show solution
$\mathrm{f}(x+h) = 3x^2 + 6xh + 3h^2$
$\dfrac{\mathrm{f}(x+h) - \mathrm{f}(x)}{h} = \dfrac{6xh + 3h^2}{h} = 6x + 3h$
$\mathrm{f}'(x) = \displaystyle\lim_{h\to0}(6x + 3h) = 6x$
Differentiate $\mathrm{f}(x) = x^2 + 5x$ from first principles.
โถ Show solution
$\mathrm{f}(x+h) = x^2 + 2xh + h^2 + 5x + 5h$
$\mathrm{f}(x+h) - \mathrm{f}(x) = 2xh + h^2 + 5h$
Divide by $h$: $2x + h + 5$
$\mathrm{f}'(x) = \displaystyle\lim_{h\to0}(2x + h + 5) = 2x + 5$
Use first principles to show that the gradient of $y = 4x - 7$ is $4$ everywhere.
โถ Show solution
$\dfrac{4(x+h) - 7 - (4x - 7)}{h} = \dfrac{4h}{h} = 4$
This does not depend on $h$, so the limit is $4$, for every $x$.
Prove from first principles that the derivative of $x^3$ is $3x^2$.
โถ Show solution
$\mathrm{f}(x+h) = (x+h)^3 = x^3 + 3x^2h + 3xh^2 + h^3$
$\dfrac{\mathrm{f}(x+h) - \mathrm{f}(x)}{h} = \dfrac{3x^2h + 3xh^2 + h^3}{h} = 3x^2 + 3xh + h^2$
$\mathrm{f}'(x) = \displaystyle\lim_{h\to0}\left(3x^2 + 3xh + h^2\right) = 3x^2$ $\blacksquare$
Differentiate $\mathrm{f}(x) = 2x^3 - x$ from first principles.
โถ Show solution
$\mathrm{f}(x+h) = 2\left(x^3 + 3x^2h + 3xh^2 + h^3\right) - x - h$
$\mathrm{f}(x+h) - \mathrm{f}(x) = 6x^2h + 6xh^2 + 2h^3 - h$
Divide by $h$: $6x^2 + 6xh + 2h^2 - 1$
$\mathrm{f}'(x) = \displaystyle\lim_{h\to0}\left(6x^2 + 6xh + 2h^2 - 1\right) = 6x^2 - 1$
$P(1, 1)$ and $Q\left(1 + h,\, (1+h)^3\right)$ lie on $y = x^3$. (a) Show that the gradient of $PQ$ is $3 + 3h + h^2$. (b) Find the gradient when $h = 0.1$ and when $h = 0.01$. (c) State the gradient of the curve at $P$.
โถ Show solution
(a) $\dfrac{(1+h)^3 - 1}{h} = \dfrac{1 + 3h + 3h^2 + h^3 - 1}{h} = 3 + 3h + h^2$
(b) $h = 0.1$: $3 + 0.3 + 0.01 = 3.31$. $h = 0.01$: $3 + 0.03 + 0.0001 = 3.0301$.
(c) As $h \to 0$ the gradient tends to $3$.
Prove from first principles that the derivative of $\dfrac{1}{x}$ is $-\dfrac{1}{x^2}$, for $x \neq 0$.
โถ Show solution
$\dfrac{1}{x+h} - \dfrac{1}{x} = \dfrac{x - x - h}{x(x+h)} = \dfrac{-h}{x(x+h)}$
Dividing by $h$: $\dfrac{-1}{x(x+h)}$
$\mathrm{f}'(x) = \displaystyle\lim_{h\to0}\dfrac{-1}{x(x+h)} = -\dfrac{1}{x^2}$ $\blacksquare$
Let $\mathrm{f}(x) = x^4$.
(a) Expand $(x + h)^4$. (b) Hence prove from first principles that $\mathrm{f}'(x) = 4x^3$. (c) Find the gradient of $y = x^4$ at $x = -2$. (d) Using your results for $x^2$, $x^3$ and $x^4$, suggest the derivative of $x^n$, and explain briefly why the binomial expansion supports this.
โถ Show solution
(a) Using coefficients $1, 4, 6, 4, 1$: $(x+h)^4 = x^4 + 4x^3h + 6x^2h^2 + 4xh^3 + h^4$.
(b) $\dfrac{(x+h)^4 - x^4}{h} = \dfrac{4x^3h + 6x^2h^2 + 4xh^3 + h^4}{h} = 4x^3 + 6x^2h + 4xh^2 + h^3$.
Every term except $4x^3$ contains $h$, so $\mathrm{f}'(x) = \displaystyle\lim_{h\to0}\left(4x^3 + 6x^2h + 4xh^2 + h^3\right) = 4x^3$. $\blacksquare$
(c) $4(-2)^3 = -32$.
(d) $\dfrac{\mathrm{d}}{\mathrm{d}x}\left(x^n\right) = nx^{n-1}$. In $(x+h)^n = x^n + nx^{n-1}h + \ldots$ the second term is always $nx^{n-1}h$, and all later terms contain $h^2$ or higher. After subtracting $x^n$ and dividing by $h$, only $nx^{n-1}$ survives as $h \to 0$.