Differentiation and the gradient of a curve

AS · P1 · 13 min

A straight line has one gradient everywhere, but a curve gets steeper and shallower as you move along it. Differentiation is the tool that gives the gradient of a curve at every point at once, as a formula called the derivative. Everything else in the Paper 1 calculus questions (tangents and normals, stationary points, rates of change, optimisation, and integration as the reverse process) is built on the rules in this note, so they have to be fast and error-free.

The gradient of a curve

Gradient at a point means gradient of the tangent

The tangent to a curve at a point PP is the straight line that touches the curve at PP and has the same direction as the curve there. The gradient of the curve at PP is defined to be the gradient of that tangent.

The difficulty is that a tangent passes through only one known point, and you need two points to calculate a gradient. The way round this is to approximate the tangent by chords.

Chords that close in on the tangent

Take the curve y=x3y = x^3 and the point P(2,8)P(2, 8). Pick a second point QQ on the curve with xx-coordinate 2+h2 + h, so QQ is (2+h, (2+h)3)\big(2 + h,\ (2 + h)^3\big). The gradient of the chord PQPQ is

(2+h)3−8(2+h)−2=8+12h+6h2+h3−8h=12+6h+h2\frac{(2 + h)^3 - 8}{(2 + h) - 2} = \frac{8 + 12h + 6h^2 + h^3 - 8}{h} = 12 + 6h + h^2

Now slide QQ towards PP by making hh smaller:

hhGradient of chord PQPQ
111919
0.10.112.6112.61
0.010.0112.060112.0601
0.0010.00112.00600112.006001

As hh gets closer to 00, the chord gradients get closer and closer to 1212. The chord turns into the tangent, so the gradient of the curve at (2,8)(2, 8) is 1212. In the language of limits, 12+6h+h2→1212 + 6h + h^2 \to 12 as h→0h \to 0.

y = x^3 (2, 8) -- (3, 27) y = 12x - 16 (2, 8) (3, 27)

The graph shows y=x3y = x^3, the chord from (2,8)(2, 8) to (3,27)(3, 27) (the case h=1h = 1, gradient 1919) and the tangent y=12x−16y = 12x - 16 at (2,8)(2, 8), gradient 1212. Smaller values of hh give chords that lie closer and closer to the tangent.

Definition

The gradient of a curve at a point is the gradient of the tangent at that point. It is the limit of the gradients of chords PQPQ as QQ moves along the curve towards PP.

Only an informal idea of a limit is expected: you should be able to set up the chord gradient for a specific curve, simplify it, and say what it tends to as h→0h \to 0. You are not asked to differentiate general functions from first principles.

The derivative and its notation

Repeat the chord argument at a general point (x,x2)(x, x^2) on y=x2y = x^2, with QQ at x+hx + h:

(x+h)2−x2h=2xh+h2h=2x+h  →  2x as h→0\frac{(x + h)^2 - x^2}{h} = \frac{2xh + h^2}{h} = 2x + h \;\to\; 2x \text{ as } h \to 0

So the gradient of y=x2y = x^2 at any point is 2x2x. At x=3x = 3 the gradient is 66; at x=−1x = -1 it is −2-2. A formula like this, which gives the gradient at every point, is the gradient function or derivative.

Definition

The derivative of yy with respect to xx is the function that gives the gradient of the curve y=f(x)y = f(x) at each value of xx. It is written

dydxorf′(x)\frac{dy}{dx} \qquad\text{or}\qquad f'(x)

Finding the derivative is called differentiating. Differentiating again gives the second derivative, written d2ydx2\dfrac{d^2y}{dx^2} or f′′(x)f''(x).

dydx\dfrac{dy}{dx} is a single symbol, read "dee yy by dee xx". It is not a fraction you can cancel, although in the chain rule it often behaves like one. The notation ddx(…)\dfrac{d}{dx}(\ldots) means "the derivative of (…)(\ldots) with respect to xx", so ddx(x2)=2x\dfrac{d}{dx}(x^2) = 2x.

The second derivative measures how fast the gradient itself is changing. You will use it to decide whether a stationary point is a maximum or a minimum.

The power rule

The same chord argument for x3x^3, x4x^4, and so on reveals a pattern:

yyxxx2x^2x3x^3x4x^4
dydx\dfrac{dy}{dx}112x2x3x23x^24x34x^3

The power comes down in front, and the power drops by one. This works for every rational power, including negative powers and fractions.

Key result
ddx(xn)=nxn−1for any rational n\frac{d}{dx}\left(x^n\right) = nx^{n - 1} \qquad \text{for any rational } n
  • Constant multiples stay: ddx(kxn)=knxn−1\dfrac{d}{dx}\left(kx^n\right) = knx^{n-1}.
  • Sums and differences differentiate term by term: ddx(f(x)±g(x))=f′(x)±g′(x)\dfrac{d}{dx}\big(f(x) \pm g(x)\big) = f'(x) \pm g'(x).
  • Constants differentiate to zero: ddx(c)=0\dfrac{d}{dx}(c) = 0, because y=cy = c is a horizontal line.
  • Linear terms give their coefficient: ddx(kx)=k\dfrac{d}{dx}(kx) = k, because y=kxy = kx is a line of gradient kk.

For example, if y=4x3−5x2+7x−2y = 4x^3 - 5x^2 + 7x - 2 then dydx=12x2−10x+7\dfrac{dy}{dx} = 12x^2 - 10x + 7, and d2ydx2=24x−10\dfrac{d^2y}{dx^2} = 24x - 10.

Rewrite as powers first

The power rule only works on terms of the form kxnkx^n. Roots, reciprocals, products and quotients must be rewritten before you differentiate.

Written asRewrite asDerivative
x\sqrt{x}x12x^{\frac{1}{2}}12x−12=12x\tfrac{1}{2}x^{-\frac{1}{2}} = \dfrac{1}{2\sqrt{x}}
1x\dfrac{1}{x}x−1x^{-1}−x−2=−1x2-x^{-2} = -\dfrac{1}{x^2}
5x3\dfrac{5}{x^3}5x−35x^{-3}−15x−4-15x^{-4}
3x\dfrac{3}{\sqrt{x}}3x−123x^{-\frac{1}{2}}−32x−32-\tfrac{3}{2}x^{-\frac{3}{2}}
x23\sqrt[3]{x^2}x23x^{\frac{2}{3}}23x−13\tfrac{2}{3}x^{-\frac{1}{3}}
12x\dfrac{1}{2x}12x−1\tfrac{1}{2}x^{-1}−12x−2-\tfrac{1}{2}x^{-2}
(x+2)(x−5)(x + 2)(x - 5)x2−3x−10x^2 - 3x - 102x−32x - 3
x2+3x\dfrac{x^2 + 3}{x}x+3x−1x + 3x^{-1}1−3x−21 - 3x^{-2}

Two of these are traps worth naming. 12x\dfrac{1}{2x} is 12x−1\tfrac{1}{2}x^{-1}, not 2x−12x^{-1}: only the xx is in the denominator's power. And a fraction with several terms on top is split into separate terms, each divided by the denominator. There is no product rule or quotient rule in Paper 1; you never need one, because every P1 product or quotient can be expanded or split.

Differentiating a P1 expression
  1. Expand any brackets (unless it is a bracket raised to a power, which needs the chain rule).
  2. Split any fraction with more than one term in the numerator.
  3. Write every term as kxnkx^n, using xpq=xp/q\sqrt[q]{x^p} = x^{p/q} and 1xn=x−n\dfrac{1}{x^n} = x^{-n}.
  4. Differentiate each term: multiply by the power, then reduce the power by one.
  5. If a value is asked for, substitute after differentiating. Convert back to roots and fractions only if it helps.

Using the derivative

Once you have dydx\dfrac{dy}{dx} there are three things you can do with it.

  • Find the gradient at a given point: substitute the xx-coordinate into dydx\dfrac{dy}{dx}.
  • Find where the gradient has a given value: set dydx\dfrac{dy}{dx} equal to that value and solve for xx, then substitute into the curve's equation (not the derivative) for yy.
  • Find unknown constants: if the curve contains letters such as aa and bb, each piece of information (a point on the curve, a gradient at a point) gives one equation.
y = x^3 - 6x^2 + 5 y = -9x + 9 y = -9x + 5 (1, 0) (3, -22)

The curve y=x3−6x2+5y = x^3 - 6x^2 + 5 has gradient −9-9 at two points, (1,0)(1, 0) and (3,−22)(3, -22), so it has two parallel tangents of gradient −9-9. A derivative that is a quadratic can take the same value twice, which is why "find the points where the gradient is mm" usually has two answers. This is Example 4 below.

Differentiating a polynomial

Given that y=4x3−5x2+7x−2y = 4x^3 - 5x^2 + 7x - 2, find dydx\dfrac{dy}{dx} and d2ydx2\dfrac{d^2y}{dx^2}, and find the gradient of the curve at the point where x=−1x = -1.

Solution

Differentiate term by term:

dydx=12x2−10x+7,d2ydx2=24x−10\frac{dy}{dx} = 12x^2 - 10x + 7, \qquad \frac{d^2y}{dx^2} = 24x - 10

At x=−1x = -1:

dydx=12(1)−10(−1)+7=12+10+7=29\frac{dy}{dx} = 12(1) - 10(-1) + 7 = 12 + 10 + 7 = 29

The gradient at x=−1x = -1 is 2929.

Roots and reciprocals

Find dydx\dfrac{dy}{dx} when y=6x−8x2+32xy = 6\sqrt{x} - \dfrac{8}{x^2} + \dfrac{3}{2x}.

Solution

Rewrite every term as a power of xx. Note that 32x=32x−1\dfrac{3}{2x} = \tfrac{3}{2}x^{-1}.

y=6x12−8x−2+32x−1y = 6x^{\frac{1}{2}} - 8x^{-2} + \tfrac{3}{2}x^{-1}

Differentiate:

dydx=3x−12+16x−3−32x−2=3x+16x3−32x2\frac{dy}{dx} = 3x^{-\frac{1}{2}} + 16x^{-3} - \tfrac{3}{2}x^{-2} = \frac{3}{\sqrt{x}} + \frac{16}{x^3} - \frac{3}{2x^2}

The middle term is −8×(−2)x−3=+16x−3-8 \times (-2)x^{-3} = +16x^{-3}: two negatives make a positive.

Splitting a fraction

A curve has equation y=3x2−2xxy = \dfrac{3x^2 - 2\sqrt{x}}{x}. Find the gradient of the curve at the point where x=4x = 4.

Solution

Split the fraction, dividing each term of the numerator by xx:

y=3x2x−2x12x=3x−2x−12y = \frac{3x^2}{x} - \frac{2x^{\frac{1}{2}}}{x} = 3x - 2x^{-\frac{1}{2}}

Differentiate:

dydx=3−2×(−12)x−32=3+x−32\frac{dy}{dx} = 3 - 2 \times \left(-\tfrac{1}{2}\right)x^{-\frac{3}{2}} = 3 + x^{-\frac{3}{2}}

At x=4x = 4, x−32=143/2=18x^{-\frac{3}{2}} = \dfrac{1}{4^{3/2}} = \dfrac{1}{8}, so the gradient is

3+18=2583 + \frac{1}{8} = \frac{25}{8}
Points with a given gradient

Find the coordinates of the points on the curve y=x3−6x2+5y = x^3 - 6x^2 + 5 at which the gradient is −9-9.

Solutiondydx=3x2−12x\frac{dy}{dx} = 3x^2 - 12x

Set the gradient equal to −9-9:

3x2−12x=−93x2−12x+9=0x2−4x+3=0(x−1)(x−3)=0\begin{aligned} 3x^2 - 12x &= -9 \\ 3x^2 - 12x + 9 &= 0 \\ x^2 - 4x + 3 &= 0 \\ (x - 1)(x - 3) &= 0 \end{aligned}

So x=1x = 1 or x=3x = 3. Substitute into the curve for the yy-coordinates:

x=1: y=1−6+5=0,x=3: y=27−54+5=−22x = 1:\ y = 1 - 6 + 5 = 0, \qquad x = 3:\ y = 27 - 54 + 5 = -22

The points are (1,0)(1, 0) and (3,−22)(3, -22).

Finding unknown constants

The curve y=ax2+bxy = ax^2 + \dfrac{b}{x}, where aa and bb are constants, passes through the point (2,6)(2, 6), and its gradient at that point is 99.

(a) Find the values of aa and bb.

(b) Find the value of d2ydx2\dfrac{d^2y}{dx^2} at the point (2,6)(2, 6).

Solution

(a) The point (2,6)(2, 6) lies on the curve:

6=4a+b2(1)6 = 4a + \frac{b}{2} \qquad (1)

Write y=ax2+bx−1y = ax^2 + bx^{-1}, so

dydx=2ax−bx−2=2ax−bx2\frac{dy}{dx} = 2ax - bx^{-2} = 2ax - \frac{b}{x^2}

The gradient at x=2x = 2 is 99:

9=4a−b4(2)9 = 4a - \frac{b}{4} \qquad (2)

Subtract (2) from (1): b2+b4=6−9\dfrac{b}{2} + \dfrac{b}{4} = 6 - 9, so 3b4=−3\dfrac{3b}{4} = -3 and b=−4b = -4. Then from (1), 4a−2=64a - 2 = 6, so a=2a = 2.

(b) With a=2a = 2, b=−4b = -4, dydx=4x+4x−2\dfrac{dy}{dx} = 4x + 4x^{-2}, so

d2ydx2=4−8x−3=4−8x3\frac{d^2y}{dx^2} = 4 - 8x^{-3} = 4 - \frac{8}{x^3}

At x=2x = 2: d2ydx2=4−88=3\dfrac{d^2y}{dx^2} = 4 - \dfrac{8}{8} = 3.

Gradient as the limit of chords

The points P(1,4)P(1, 4) and Q(1+h, (1+h)2+3(1+h))Q\big(1 + h,\ (1 + h)^2 + 3(1 + h)\big) lie on the curve y=x2+3xy = x^2 + 3x.

(a) Show that the gradient of the chord PQPQ is 5+h5 + h.

(b) Hence state the gradient of the curve at PP, and check your answer by differentiation.

Solution

(a) The gradient of PQPQ is

(1+h)2+3(1+h)−4(1+h)−1=1+2h+h2+3+3h−4h=5h+h2h=5+h\frac{(1 + h)^2 + 3(1 + h) - 4}{(1 + h) - 1} = \frac{1 + 2h + h^2 + 3 + 3h - 4}{h} = \frac{5h + h^2}{h} = 5 + h

(b) As QQ approaches PP, h→0h \to 0, so the chord gradient 5+h→55 + h \to 5. The gradient of the curve at PP is 55.

Check: dydx=2x+3\dfrac{dy}{dx} = 2x + 3, which is 55 at x=1x = 1.

Watch out

Differentiating before rewriting. ddx(1x2)\dfrac{d}{dx}\left(\dfrac{1}{x^2}\right) is not 12x\dfrac{1}{2x}. Write x−2x^{-2} first, then differentiate to get −2x−3-2x^{-3}.

Getting the new power wrong for negative powers. Reducing −2-2 by one gives −3-3, not −1-1. Reducing −12-\tfrac{1}{2} by one gives −32-\tfrac{3}{2}.

Misplacing a coefficient. 32x\dfrac{3}{2x} means 32x−1\tfrac{3}{2}x^{-1}, but 32x\dfrac{3}{2}x is just 1.5x1.5x. And 14x=14x−12\dfrac{1}{4\sqrt{x}} = \tfrac{1}{4}x^{-\frac{1}{2}}, not 4x−124x^{-\frac{1}{2}}.

Differentiating a product term by term. ddx[(x+2)(x−5)]\dfrac{d}{dx}\big[(x + 2)(x - 5)\big] is not 1×1=11 \times 1 = 1. Expand to x2−3x−10x^2 - 3x - 10 first, giving 2x−32x - 3.

Using the derivative to find yy. After solving dydx=m\dfrac{dy}{dx} = m for xx, substitute into the equation of the curve to find yy, not into dydx\dfrac{dy}{dx}.

Exam tip
  • Show the rewritten form. Writing y=6x12−8x−2+32x−1y = 6x^{\frac{1}{2}} - 8x^{-2} + \tfrac{3}{2}x^{-1} before differentiating makes your method visible. If you then slip on one term, the method mark is still available.
  • "Find dydx\dfrac{dy}{dx}" questions are usually marked term by term: one mark for each correct term, or a method mark for reducing powers correctly plus accuracy marks.
  • Simplified form. Answers like 3x−123x^{-\frac{1}{2}} and 3x\dfrac{3}{\sqrt{x}} are both acceptable unless a form is asked for. Do not waste time converting back unless you are substituting a value.
  • Exact values. If a question asks for an exact gradient, give a fraction like 258\tfrac{25}{8}, not 3.1253.125 rounded.
  • Chord questions ask you to "show" a simplified chord gradient: expand fully, cancel the hh, and state the limit as h→0h \to 0 in words or symbols.
Summary
  • The gradient of a curve at a point is the gradient of the tangent there, the limit of chord gradients as the second point approaches the first.
  • dydx\dfrac{dy}{dx} and f′(x)f'(x) are the first derivative; d2ydx2\dfrac{d^2y}{dx^2} and f′′(x)f''(x) are the second derivative.
  • Power rule: ddx(xn)=nxn−1\dfrac{d}{dx}\left(x^n\right) = nx^{n-1} for any rational nn; constants give 00, kxkx gives kk.
  • Multiply constants through and differentiate sums term by term.
  • Rewrite roots as fractional powers, reciprocals as negative powers, expand products, and split fractions before differentiating.
  • To find where the gradient is mm, solve dydx=m\dfrac{dy}{dx} = m, then use the curve for yy.
  • Unknown constants need one equation per piece of information.

Practice questions

Question
  1. Find dydx\dfrac{dy}{dx} when y=5x4−3x2+8x−1y = 5x^4 - 3x^2 + 8x - 1.
  2. Find dydx\dfrac{dy}{dx} when y=3x2−4x+2y = \dfrac{3}{x^2} - 4\sqrt{x} + 2.
  3. Find dydx\dfrac{dy}{dx} when y=(2x+3)(x2−1)y = (2x + 3)(x^2 - 1).
  4. Given that f(x)=x2+4xf(x) = \dfrac{x^2 + 4}{\sqrt{x}} for x>0x > 0, find f′(x)f'(x) and evaluate f′(4)f'(4).
  5. Given that f(x)=x3−6xf(x) = x^3 - \dfrac{6}{x}, find f′′(x)f''(x) and the value of f′′(1)f''(1).
  6. The points P(1,1)P(1, 1) and Q(1+h,(1+h)3)Q\big(1 + h, (1 + h)^3\big) lie on y=x3y = x^3. Find, in terms of hh, the gradient of the chord PQPQ, simplifying your answer. Hence find the gradient of the curve at PP.
  7. Find the coordinates of the points on the curve y=2x3−3x2−10x+1y = 2x^3 - 3x^2 - 10x + 1 at which the gradient is 22.
  8. The curve y=ax3+bxy = ax^3 + bx has gradient 11 at the point where x=1x = 1 and gradient 1919 at the point where x=2x = 2. Find aa and bb, and the value of d2ydx2\dfrac{d^2y}{dx^2} when x=2x = 2.
  9. Find the set of values of the constant kk for which the gradient of the curve y=x3+kx2+3xy = x^3 + kx^2 + 3x is positive for every value of xx.
Answers
  1. dydx=20x3−6x+8\dfrac{dy}{dx} = 20x^3 - 6x + 8.

  2. y=3x−2−4x12+2y = 3x^{-2} - 4x^{\frac{1}{2}} + 2, so dydx=−6x−3−2x−12=−6x3−2x\dfrac{dy}{dx} = -6x^{-3} - 2x^{-\frac{1}{2}} = -\dfrac{6}{x^3} - \dfrac{2}{\sqrt{x}}.

  3. Expand: y=2x3+3x2−2x−3y = 2x^3 + 3x^2 - 2x - 3, so dydx=6x2+6x−2\dfrac{dy}{dx} = 6x^2 + 6x - 2.

  4. f(x)=x32+4x−12f(x) = x^{\frac{3}{2}} + 4x^{-\frac{1}{2}}, so f′(x)=32x12−2x−32f'(x) = \tfrac{3}{2}x^{\frac{1}{2}} - 2x^{-\frac{3}{2}}. Then f′(4)=32(2)−28=3−14=114f'(4) = \tfrac{3}{2}(2) - \dfrac{2}{8} = 3 - \tfrac{1}{4} = \tfrac{11}{4}.

  5. f(x)=x3−6x−1f(x) = x^3 - 6x^{-1}, f′(x)=3x2+6x−2f'(x) = 3x^2 + 6x^{-2}, f′′(x)=6x−12x−3f''(x) = 6x - 12x^{-3}. So f′′(1)=6−12=−6f''(1) = 6 - 12 = -6.

  6. Gradient of PQ=(1+h)3−1h=3h+3h2+h3h=3+3h+h2PQ = \dfrac{(1 + h)^3 - 1}{h} = \dfrac{3h + 3h^2 + h^3}{h} = 3 + 3h + h^2. As h→0h \to 0 this tends to 33, so the gradient at PP is 33 (and dydx=3x2=3\dfrac{dy}{dx} = 3x^2 = 3 at x=1x = 1 agrees).

  7. dydx=6x2−6x−10=2\dfrac{dy}{dx} = 6x^2 - 6x - 10 = 2, so 6x2−6x−12=06x^2 - 6x - 12 = 0, x2−x−2=0x^2 - x - 2 = 0, (x−2)(x+1)=0(x - 2)(x + 1) = 0. At x=2x = 2, y=16−12−20+1=−15y = 16 - 12 - 20 + 1 = -15; at x=−1x = -1, y=−2−3+10+1=6y = -2 - 3 + 10 + 1 = 6. Points (2,−15)(2, -15) and (−1,6)(-1, 6).

  8. dydx=3ax2+b\dfrac{dy}{dx} = 3ax^2 + b. At x=1x = 1: 3a+b=13a + b = 1. At x=2x = 2: 12a+b=1912a + b = 19. Subtracting, 9a=189a = 18, so a=2a = 2 and b=−5b = -5. Then d2ydx2=6ax=12x\dfrac{d^2y}{dx^2} = 6ax = 12x, which is 2424 at x=2x = 2.

  9. dydx=3x2+2kx+3\dfrac{dy}{dx} = 3x^2 + 2kx + 3. This quadratic has positive x2x^2 coefficient, so it is positive for all xx exactly when it has no real roots: discriminant (2k)2−4(3)(3)<0(2k)^2 - 4(3)(3) < 0, so 4k2<364k^2 < 36, k2<9k^2 < 9, giving −3<k<3-3 < k < 3.

How well do you know this?

Builds on

Where this leads

Console

Search notes, courses and tools, or run an action