mastree

Equation of a tangent to a curve, step by step

What this lesson covers

  • A tangent touches the curve at a point and has the same gradient as the curve there.
  • The equation of a tangent needs a point and a gradient, and the gradient comes from the derivative.
Key idea

What a tangent is

  • A straight line that touches the curve at one point.
  • It has the curve's gradient at that point.
  • To write it you need a point and a gradient.
Worked example

The tangent to y = x² − 4x + 1 at x = 3

  • The point: y = −2, so (3, −2).
  • The gradient: 2x − 4 = 2.
  • Up 2 for every 1 across: that is the tangent.
The tangent to y = x² − 4x + 1 at x = 3
Key idea

Four steps, every time

  • Point from y, gradient from dy/dx.
  • Put both into y − y₁ = m(x − x₁).
  • Tidy into y = mx + c.
StepFindHow
1the pointsubstitute x into y
2the gradientsubstitute x into dy/dx
3the liney − y₁ = m(x − x₁)
4tidyy = mx + c
Key idea

Try it: slide the tangent

Key idea

Try it: a tangent at any point

Worked example

The working, written out

  • Point, gradient, line.
  • Then tidy to y = mx + c.
  1. y = 3² − 4(3) + 1the point
  2. = 9 − 12 + 1 = −2
  3. point (3, −2)
  4. dy/dx = 2x − 4the gradient
  5. m = 2(3) − 4 = 2
  6. y − (−2) = 2(x − 3)y − y₁ = m(x − x₁)
  7. y + 2 = 2x − 6expand
  8. y = 2x − 8subtract 2
Key idea

Check it

  • Does the point fit?
  • Do the gradients match?
  • Two checks, ten seconds.
  1. y = 2(3) − 8 = 6 − 8 = −2the point fits
  2. line m = 2, curve m = 2gradients match
Worked example

A cubic: y = 2x³ at x = −1

  • Brackets round −1.
  • The same four steps.
  1. y = 2(−1)³ = 2(−1) = −2point (−1, −2)
  2. dy/dx = 6x²
  3. m = 6(−1)² = 6brackets round −1
  4. y − (−2) = 6(x − (−1))y − y₁ = m(x − x₁)
  5. y + 2 = 6(x + 1)
  6. y + 2 = 6x + 6expand
  7. y = 6x + 4subtract 2
Worked example

Where is the gradient 9?

  • Set dy/dx equal to 9.
  • x² = 4: two points.
  1. dy/dx = 3x² − 3
  2. 3x² − 3 = 9gradient 9
  3. 3x² = 12, so x² = 4
  4. x = 2 or x = −2two solutions
  5. x = 2: y = 2³ − 3(2) = 8 − 6 = 2
  6. x = −2: y = (−2)³ − 3(−2)
  7. = −8 + 6 = −2
  8. points (2, 2) and (−2, −2)
Worked example

Using the tangent

  • On the x-axis, y = 0.
  • Keep the tangent tidy.
  1. y = 2x − 8
  2. 0 = 2x − 8set y = 0
  3. 2x = 8, so x = 4
  4. crosses at (4, 0)
Worked example

A flat tangent: y = 3x² − x³ at x = 2

  • Gradient 0: flat tangent.
  • The curve turns there.
  1. y = 3(2)² − 2³ = 12 − 8 = 4
  2. dy/dx = 6x − 3x²
  3. m = 6(2) − 3(2)² = 12 − 12 = 0
  4. y − 4 = 0(x − 2)
  5. y = 4horizontal
Key idea

Graphing calculator

Key idea

Try it: build, check and use a tangent

Key idea

Where the marks are

  • Achieved: the gradient at the point.
  • Merit: the equation of the tangent.
  • Excellence: using it to solve a problem.
Summary

What to take away

  • A point from y, a gradient from dy/dx, then the line.
Pointfrom y
Gradientfrom dy/dx
Liney − y₁ = m(x − x₁)
Given gradientset dy/dx equal to it
Checkthe point satisfies your line

Common mistakes

  • Tangent to y = x² − 4x + 1 at x = 3: y + 2 = (2x − 4)(x − 3)
    m is a number: substitute x = 3 into dy/dx to get m = 2, so y + 2 = 2(x − 3), giving y = 2x − 8.
  • At x = 3 the point is (3, 2), because 2(3) − 4 = 2.
    The point comes from y, not dy/dx: y = 9 − 12 + 1 = −2, so the point is (3, −2).
  • y = 2x³ at x = −1: m = 6 × −1² = −6
    Bracket the −1 before squaring: m = 6(−1)² = 6, so the tangent is y = 6x + 4.
  • 3x² − 3 = 9 gives x² = 4, so x = 2.
    x² = 4 has two solutions, x = 2 and x = −2, so there are two points: (2, 2) and (−2, −2).
Your turn

Your turn: eight questions

  • Use the eight steps.
  • Question 3 wants a point, not a line.
1

Find the tangent to y = x² at x = 2.

2

Find the tangent to y = x³ at x = 1.

3

Where on y = x² + 2x is the gradient 6?

4

Find the tangent to y = x² − 4x + 1 at x = 0.

5

Find the tangent to y = x² − 6x + 11 at x = 3.

6

The tangent to y = x² at x = 3 is y = 6x − 9. Where does it cross the x-axis?

7

Find the points on y = x³ − 6x where the tangent is parallel to y = 6x + 1.

8

The line y = 2x + k is a tangent to y = x² − 4x + 10. Find k.

Show answer

1. Point (2, 4), gradient 2x = 4, so y − 4 = 4(x − 2): y = 4x − 4. 2. Point (1, 1), gradient 3x² = 3, so y = 3x − 2. 3. 2x + 2 = 6, x = 2, and y = 4 + 4 = 8: the point (2, 8). 4. Point (0, 1), gradient −4, so y = −4x + 1. 5. y = 2. The point is (3, 2), and dy/dx = 2x − 6 = 0 there, so the tangent is flat: y = 2. 6. (1.5, 0). On the x-axis y = 0, so 6x − 9 = 0 and x = 1.5. 7. (2, −4) and (−2, 4). Parallel means gradient 6: 3x² − 6 = 6, so x = ±2, and y = 8 − 12 = −4 or −8 + 12 = 4. 8. k = 1. The gradient 2x − 4 = 2 gives x = 3, so the point is (3, 7), and 7 = 2 × 3 + k gives k = 1.

Worked example

The answers: questions 1 and 2

  1. 1. y = 2² = 4: point (2, 4)
  2. dy/dx = 2x, m = 2(2) = 4
  3. y − 4 = 4(x − 2) = 4x − 8
  4. y = 4x − 4add 4
  5. 2. y = 1³ = 1: point (1, 1)
  6. dy/dx = 3x², m = 3(1)² = 3
  7. y − 1 = 3(x − 1) = 3x − 3
  8. y = 3x − 2add 1
Worked example

The answers: questions 3 and 4

  1. 3. dy/dx = 2x + 2
  2. 2x + 2 = 6, so 2x = 4, x = 2gradient 6
  3. y = 2² + 2(2) = 4 + 4 = 8
  4. the point (2, 8)
  5. 4. y = 0 − 0 + 1 = 1, so (0, 1)
  6. dy/dx = 2x − 4, m = 2(0) − 4 = −4
  7. y − 1 = −4(x − 0)
  8. y = −4x + 1add 1
Your turn

Sample question: Achieved

Find the equation of the tangent to the curve y = x² − 2x + 3 at the point where x = 2.

Hint

You need a point and a gradient. The point comes from the curve; the gradient comes from dydx at x = 2.

Answer

y = 2x − 1

Step by step
  1. A tangent is a straight line, so it needs a point and a gradient.
  2. The point: put x = 2 into the curve. y = 4 − 4 + 3 = 3, so the point is (2, 3).
  3. The gradient: differentiate, dydx = 2x − 2. At x = 2, the gradient is 4 − 2 = 2.
  4. Classic mistake: using dydx = 2x − 2 itself as the gradient of the line. The tangent's gradient is one number, the value at x = 2.
  5. Use y − y₁ = m(x − x₁) with the point (2, 3) and m = 2: y − 3 = 2(x − 2).
  6. Expand and tidy: y − 3 = 2x − 4, so y = 2x − 1.
  7. Check: the line passes through (2, 3), since 2 × 2 − 1 = 3. Correct.
Full working
  1. y(2) = 4 − 4 + 3 = 3point (2, 3)
  2. dydx = 2x − 2 = 2 at x = 2gradient
  3. y − 3 = 2(x − 2)y − y₁ = m(x − x₁)
  4. y = 2x − 1
Your turn

Sample questions: Merit

1

Find the equations of the two tangents to the curve y = x³ − 3x + 1 that are parallel to the line y = 9x + 4.

Hint

Parallel lines have the same gradient, 9. Solve dydx = 9 to find where the tangents touch, then find each equation.

Answer

y = 9x − 15 (touching at (2, 3)) and y = 9x + 17 (touching at (−2, −1))

Step by step
  1. Parallel lines have equal gradients, so each tangent has gradient 9.
  2. Differentiate: dydx = 3x² − 3. Set it equal to 9: 3x² = 12, so x² = 4 and x = 2 or x = −2.
  3. Classic mistake: giving only x = 2. A square root has a positive and a negative answer, so there are two tangents.
  4. At x = 2: y = 8 − 6 + 1 = 3. The point is (2, 3).
  5. Tangent: y − 3 = 9(x − 2), so y = 9x − 18 + 3 = 9x − 15.
  6. At x = −2: y = −8 + 6 + 1 = −1. The point is (−2, −1).
  7. Tangent: y + 1 = 9(x + 2), so y = 9x + 18 − 1 = 9x + 17.
  8. Both have gradient 9, so both are parallel to y = 9x + 4.
  9. Check: (2, 3) is on y = 9x − 15 since 18 − 15 = 3, and (−2, −1) is on y = 9x + 17 since −18 + 17 = −1.
Full working
  1. 3x² − 3 = 9, so x = ±2parallel: same gradient 9
  2. x = 2: y = 3; y − 3 = 9(x − 2)
  3. y = 9x − 15
  4. x = −2: y = −1; y + 1 = 9(x + 2)
  5. y = 9x − 15 and y = 9x + 17
2

The tangent to y = 2x² − 3x + 4 at x = 1 meets the x-axis at A and the y-axis at B. Find the area of triangle OAB, where O is the origin.

Hint

Find the tangent's equation first. Then put y = 0 for A and x = 0 for B, and use area = half × base × height.

Answer

The tangent is y = x + 2, with A(−2, 0) and B(0, 2); the area is 2 square units

Step by step
  1. The point: x = 1 gives y = 2 − 3 + 4 = 3, so (1, 3).
  2. The gradient: dydx = 4x − 3, which is 1 at x = 1.
  3. The tangent: y − 3 = 1(x − 1), so y = x + 2.
  4. A is on the x-axis, so y = 0: 0 = x + 2 gives x = −2. A is (−2, 0).
  5. B is on the y-axis, so x = 0: y = 2. B is (0, 2).
  6. Triangle OAB has a right angle at O. Its base OA is 2 long (a length is positive, even though A is at x = −2) and its height OB is 2.
  7. Area = 12 × 2 × 2 = 2 square units.
  8. Classic mistake: using −2 as the base and getting an area of −2. Lengths and areas are never negative.
  9. Check: the tangent passes through (1, 3), since 1 + 2 = 3. Correct.
Full working
  1. y(1) = 3; dydx = 4x − 3 = 1 at x = 1
  2. y − 3 = 1(x − 1), so y = x + 2tangent
  3. A(−2, 0) and B(0, 2)y = 0 and x = 0
  4. Area = 12 × 2 × 2
  5. 2 square units
Your turn

Sample questions: Excellence

1

The point (1, −3) is below the curve y = x². Find the equations of the two tangents to y = x² that pass through (1, −3), and the points where they touch the curve.

Hint

Let a tangent touch at (a, a²). Write its equation in terms of a, then make (1, −3) satisfy it. That gives an equation for a.

Answer

y = 6x − 9 touching at (3, 9), and y = −2x − 1 touching at (−1, 1)

Step by step
  1. The point (1, −3) is not on the curve, since 1² = 1, not −3. So you cannot use it as the point of contact.
  2. Instead, let the tangent touch the curve at an unknown point (a, a²).
  3. The gradient there is dydx = 2a. So the tangent is y − a² = 2a(x − a), which simplifies to y = 2ax − a².
  4. The tangent must pass through (1, −3). Substitute x = 1 and y = −3: −3 = 2a − a².
  5. Rearrange: a² − 2a − 3 = 0, so (a − 3)(a + 1) = 0. That gives a = 3 or a = −1, one for each tangent.
  6. a = 3: the tangent is y = 6x − 9, touching at (3, 9).
  7. a = −1: the tangent is y = −2x − 1, touching at (−1, 1).
  8. Classic mistake: working out dydx at x = 1 and using gradient 2. That is the gradient at (1, 1) on the curve, not a tangent through (1, −3).
  9. Check both pass through (1, −3): 6 − 9 = −3 and −2 − 1 = −3. Correct.
  10. Check they are tangents: x² = 6x − 9 gives (x − 3)² = 0, a single touching point. x² = −2x − 1 gives (x + 1)² = 0, also touching.
Full working
  1. tangent at (a, a²): y = 2ax − a²gradient 2a
  2. −3 = 2a − a²passes through (1, −3)
  3. a² − 2a − 3 = 0, so a = 3 or a = −1
  4. a = 3: y = 6x − 9 at (3, 9)
  5. a = −1: y = −2x − 1 at (−1, 1)
  6. y = 6x − 9 and y = −2x − 1
2

Find the equation of the tangent to y = x³ at x = 1, and the point where it meets the curve again. Then prove that, for any a ≠ 0, the tangent to y = x³ at x = a meets the curve again at x = −2a.

Hint

Set x³ equal to the tangent and rearrange to zero. The touching point x = a is a repeated root, so (x − a)² is a factor.

Answer

y = 3x − 2, meeting the curve again at (−2, −8); in general x³ − 3a²x + 2a³ = (x − a)²(x + 2a), so the other meeting point is x = −2a

Step by step
  1. At x = 1: y = 1 and dydx = 3x² = 3. Tangent: y − 1 = 3(x − 1), so y = 3x − 2.
  2. Where does it meet the curve? Set x³ = 3x − 2, so x³ − 3x + 2 = 0.
  3. We know x = 1 is a root, and because the line touches there it is a repeated root. So (x − 1)² = x² − 2x + 1 is a factor.
  4. Divide: x³ − 3x + 2 = (x − 1)²(x + 2). Expand to check: (x² − 2x + 1)(x + 2) = x³ − 3x + 2. Correct.
  5. So the other root is x = −2, and y = (−2)³ = −8. The tangent meets the curve again at (−2, −8).
  6. Now the general case. At x = a: y = a³ and gradient 3a². Tangent: y − a³ = 3a²(x − a), so y = 3a²x − 2a³.
  7. Meeting points: x³ = 3a²x − 2a³, so x³ − 3a²x + 2a³ = 0.
  8. Claim: this equals (x − a)²(x + 2a). Expand: (x² − 2ax + a²)(x + 2a) = x³ + 2ax² − 2ax² − 4a²x + a²x + 2a³ = x³ − 3a²x + 2a³. It matches.
  9. So the roots are x = a (twice, the touching point) and x = −2a. Since a ≠ 0, −2a is a different point: the tangent meets the curve again there.
  10. Classic mistake: thinking a tangent can only meet a curve once. That is true for a circle, but a tangent to a cubic can cross the curve somewhere else.
  11. Check with a = 1: −2a = −2, which matches the first part.
Full working
  1. y = 3x − 2point (1, 1), gradient 3
  2. x³ − 3x + 2 = (x − 1)²(x + 2) = 0x = 1 is a repeated root
  3. x = −2, y = −8
  4. tangent at x = a: y = 3a²x − 2a³
  5. x³ − 3a²x + 2a³ = (x − a)²(x + 2a)expand to check
  6. y = 3x − 2 meets again at (−2, −8); in general at x = −2a

Challenge

1

On the curve y = x³ − 6x² + 9x, two tangents are perpendicular to the line x + 9y = 2. Find their equations. The tangent at the curve's local maximum is flat; it meets the two tangents at P and Q. Find the length PQ.

Hint

Rearrange x + 9y = 2 to read off its gradient; a perpendicular line has gradient −1 divided by that. Then set dydx equal to the new gradient. The flat tangent is where dydx = 0.

Answer

y = 9x (touching at (0, 0)) and y = 9x − 32 (touching at (4, 4)); the flat tangent is y = 4, and PQ = 329 units

Step by step
  1. x + 9y = 2 rearranges to y = −x9 + 29, so its gradient is −19. Perpendicular gradients multiply to −1, so each tangent has gradient 9.
  2. dydx = 3x² − 12x + 9. Setting it equal to 9 gives 3x² − 12x = 0, so 3x(x − 4) = 0 and x = 0 or x = 4.
  3. At x = 0 the point is (0, 0), giving y = 9x. At x = 4 the point is (4, 64 − 96 + 36) = (4, 4), giving y − 4 = 9(x − 4), so y = 9x − 32.
  4. The flat tangent: 3x² − 12x + 9 = 3(x − 1)(x − 3) = 0. The local maximum is at x = 1, where y = 4, so the flat tangent is y = 4.
  5. y = 4 meets y = 9x at x = 49 and meets y = 9x − 32 at x = 4. Both points are at height 4, so PQ = 4 − 49 = 329.
Full working
  1. x + 9y = 2 has gradient −19, so m = 9perpendicular: product of gradients is −1
  2. 3x² − 12x + 9 = 9, so 3x(x − 4) = 0, x = 0 or 4set dydx = 9
  3. (0, 0): y = 9x; (4, 4): y − 4 = 9(x − 4), so y = 9x − 32point and gradient
  4. 3(x − 1)(x − 3) = 0, maximum at (1, 4), so y = 4flat tangent
  5. 9x = 4 gives x = 49; 9x − 32 = 4 gives x = 4where y = 4 meets each tangent
  6. PQ = 4 − 49 = 329 units
2

On the curve y = x³ − 3x², the tangents at P and Q, where x = p and x = q with p ≠ q, are parallel. Show that p + q = 2, and that the midpoint of PQ is always (1, −2), whichever parallel pair you take. Find the equations of the two tangents with gradient 9. Then find the one gradient that exactly one tangent to this curve has, and that tangent's equation.

Hint

Parallel tangents have equal gradients: set 3p² − 6p = 3q² − 6q and factorise, using p ≠ q. For the midpoint, p³ + q³ = (p + q)³ − 3pq(p + q) and p² + q² = (p + q)² − 2pq. For the last part, complete the square on dydx.

Answer

p + q = 2 and the midpoint is (1, −2); the gradient 9 tangents are y = 9x − 27 (at (3, 0)) and y = 9x + 5 (at (−1, −4)); only the gradient −3 has a single tangent, y = −3x + 1 at (1, −2)

Step by step
  1. dydx = 3x² − 6x. Parallel tangents: 3p² − 6p = 3q² − 6q, so 3(p² − q²) − 6(p − q) = 0, which factorises to 3(p − q)(p + q − 2) = 0.
  2. Since p ≠ q, p − q is not zero, so p + q = 2. The midpoint of PQ has x-coordinate p + q2 = 1.
  3. Its y-coordinate is p³ + q³ − 3(p² + q²)2. With p + q = 2: p³ + q³ = 8 − 6pq and p² + q² = 4 − 2pq, so the top is 8 − 6pq − 12 + 6pq = −4. The pq terms cancel, so the y-coordinate is −2 for every parallel pair.
  4. Gradient 9: 3x² − 6x = 9 gives x² − 2x − 3 = 0, so x = 3 or x = −1 (and 3 + (−1) = 2, as it must). The points are (3, 0) and (−1, −4).
  5. y − 0 = 9(x − 3) gives y = 9x − 27, and y + 4 = 9(x + 1) gives y = 9x + 5. Check: the midpoint of (3, 0) and (−1, −4) is (1, −2).
  6. dydx = 3(x − 1)² − 3, so every gradient above −3 comes from two values of x (two tangents), gradients below −3 never happen, and −3 comes only from x = 1. That tangent touches at (1, −2): y + 2 = −3(x − 1), so y = −3x + 1.
Full working
  1. 3p² − 6p = 3q² − 6q, so 3(p − q)(p + q − 2) = 0equal gradients
  2. p ≠ q, so p + q = 2 and the midpoint has x = 1
  3. p³ + q³ − 3(p² + q²) = (8 − 6pq) − 3(4 − 2pq) = −4, so y = −2pq cancels
  4. 3x² − 6x = 9: x = 3 or x = −1, points (3, 0) and (−1, −4)gradient 9
  5. y = 9x − 27 and y = 9x + 5point and gradient
  6. dydx = 3(x − 1)² − 3 ≥ −3, equal to −3 only at x = 1complete the square
  7. midpoint (1, −2); y = 9x − 27 and y = 9x + 5; only gradient −3 has one tangent, y = −3x + 1
3

The tangent to y = 12 − x² at the point where x = a (a > 0) meets the x-axis at A and the y-axis at B. O is the origin. Show that the tangent is y = −2ax + a² + 12, and that the area of triangle OAB is (a² + 12)² ÷ (4a). Find the tangent that makes this area 32 square units. Then show that no tangent of this kind cuts off a smaller triangle.

Hint

Find A by setting y = 0 and B by setting x = 0. For the area of 32, clear the fraction to get a quartic in a; check that (a² + 12)² − 128a = (a − 2)²(a² + 4a + 36) by expanding the right-hand side.

Answer

Area = (a² + 12)² ÷ (4a); the tangent is y = −4x + 16 (at a = 2, touching (2, 8)); since (a² + 12)² − 128a = (a − 2)²(a² + 4a + 36) ≥ 0 for a > 0, the area is never below 32

Step by step
  1. dydx = −2x, so at x = a the gradient is −2a and the point is (a, 12 − a²). The tangent is y − (12 − a²) = −2a(x − a), which tidies to y = −2ax + a² + 12.
  2. At B, x = 0, so OB = a² + 12. At A, y = 0, so 2ax = a² + 12 and OA = (a² + 12) ÷ (2a). Both are positive because a > 0.
  3. Area = ½ × OA × OB = ½ × (a² + 12) ÷ (2a) × (a² + 12) = (a² + 12)² ÷ (4a).
  4. Area 32: (a² + 12)² = 128a, so a⁴ + 24a² − 128a + 144 = 0. Expanding (a − 2)²(a² + 4a + 36) = (a² − 4a + 4)(a² + 4a + 36) gives exactly a⁴ + 24a² − 128a + 144.
  5. So (a − 2)²(a² + 4a + 36) = 0. The second bracket is (a + 2)² + 32, never zero, so a = 2. The tangent is y = −4x + 4 + 12 = −4x + 16, touching at (2, 8), with A = (4, 0), B = (0, 16) and area ½ × 4 × 16 = 32.
  6. Smaller area: area < 32 would need (a² + 12)² − 128a < 0, but that equals (a − 2)² × ((a + 2)² + 32), a square times a positive number, which is never negative. So 32 is the smallest possible area, reached only at a = 2.
Full working
  1. y − (12 − a²) = −2a(x − a), so y = −2ax + a² + 12gradient −2a at x = a
  2. OB = a² + 12, OA = (a² + 12) ÷ (2a)set x = 0, then y = 0
  3. area = ½ × OA × OB = (a² + 12)² ÷ (4a)
  4. (a² + 12)² − 128a = a⁴ + 24a² − 128a + 144 = (a − 2)²(a² + 4a + 36)area 32, expand to check
  5. a² + 4a + 36 = (a + 2)² + 32 > 0, so a = 2: y = −4x + 16the only root
  6. (a − 2)²((a + 2)² + 32) ≥ 0, so the area is always at least 32
  7. y = −4x + 16 gives area 32, and no tangent gives less

More challenge problems

Practice

Practise this

Worksheet with answersWithout answersDownload PDF
2026 practice paper with worked answersOpen the paper
Report a mistake

More in AS 91262