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.
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.
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.

Four steps, every time
- Point from y, gradient from dy/dx.
- Put both into y − y₁ = m(x − x₁).
- Tidy into y = mx + c.
| Step | Find | How |
|---|---|---|
| 1 | the point | substitute x into y |
| 2 | the gradient | substitute x into dy/dx |
| 3 | the line | y − y₁ = m(x − x₁) |
| 4 | tidy | y = mx + c |
Try it: slide the tangent
Try it: a tangent at any point
The working, written out
- Point, gradient, line.
- Then tidy to y = mx + c.
- y = 3² − 4(3) + 1the point
- = 9 − 12 + 1 = −2
- point (3, −2)
- dy/dx = 2x − 4the gradient
- m = 2(3) − 4 = 2
- y − (−2) = 2(x − 3)y − y₁ = m(x − x₁)
- y + 2 = 2x − 6expand
- y = 2x − 8subtract 2
Check it
- Does the point fit?
- Do the gradients match?
- Two checks, ten seconds.
- y = 2(3) − 8 = 6 − 8 = −2the point fits
- line m = 2, curve m = 2gradients match
A cubic: y = 2x³ at x = −1
- Brackets round −1.
- The same four steps.
- y = 2(−1)³ = 2(−1) = −2point (−1, −2)
- dy/dx = 6x²
- m = 6(−1)² = 6brackets round −1
- y − (−2) = 6(x − (−1))y − y₁ = m(x − x₁)
- y + 2 = 6(x + 1)
- y + 2 = 6x + 6expand
- y = 6x + 4subtract 2
Where is the gradient 9?
- Set dy/dx equal to 9.
- x² = 4: two points.
- dy/dx = 3x² − 3
- 3x² − 3 = 9gradient 9
- 3x² = 12, so x² = 4
- x = 2 or x = −2two solutions
- x = 2: y = 2³ − 3(2) = 8 − 6 = 2
- x = −2: y = (−2)³ − 3(−2)
- = −8 + 6 = −2
- points (2, 2) and (−2, −2)
Using the tangent
- On the x-axis, y = 0.
- Keep the tangent tidy.
- y = 2x − 8
- 0 = 2x − 8set y = 0
- 2x = 8, so x = 4
- crosses at (4, 0)
A flat tangent: y = 3x² − x³ at x = 2
- Gradient 0: flat tangent.
- The curve turns there.
- y = 3(2)² − 2³ = 12 − 8 = 4
- dy/dx = 6x − 3x²
- m = 6(2) − 3(2)² = 12 − 12 = 0
- y − 4 = 0(x − 2)
- y = 4horizontal
Graphing calculator
Where the marks are
- Achieved: the gradient at the point.
- Merit: the equation of the tangent.
- Excellence: using it to solve a problem.
What to take away
- A point from y, a gradient from dy/dx, then the line.
| Point | from y |
| Gradient | from dy/dx |
| Line | y − y₁ = m(x − x₁) |
| Given gradient | set dy/dx equal to it |
| Check | the 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² = −6Bracket 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: four questions
- Use the four steps.
- Question 3 wants a point, not a line.
Find the tangent to y = x² at x = 2.
Find the tangent to y = x³ at x = 1.
Where on y = x² + 2x is the gradient 6?
Find the tangent to y = x² − 4x + 1 at x = 0.
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.
The answers: questions 1 and 2
- 1. y = 2² = 4: point (2, 4)
- dy/dx = 2x, m = 2(2) = 4
- y − 4 = 4(x − 2) = 4x − 8
- y = 4x − 4add 4
- 2. y = 1³ = 1: point (1, 1)
- dy/dx = 3x², m = 3(1)² = 3
- y − 1 = 3(x − 1) = 3x − 3
- y = 3x − 2add 1
The answers: questions 3 and 4
- 3. dy/dx = 2x + 2
- 2x + 2 = 6, so 2x = 4, x = 2gradient 6
- y = 2² + 2(2) = 4 + 4 = 8
- the point (2, 8)
- 4. y = 0 − 0 + 1 = 1, so (0, 1)
- dy/dx = 2x − 4, m = 2(0) − 4 = −4
- y − 1 = −4(x − 0)
- y = −4x + 1add 1
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
- A tangent is a straight line, so it needs a point and a gradient.
- The point: put x = 2 into the curve. y = 4 − 4 + 3 = 3, so the point is (2, 3).
- The gradient: differentiate, dydx = 2x − 2. At x = 2, the gradient is 4 − 2 = 2.
- 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.
- Use y − y₁ = m(x − x₁) with the point (2, 3) and m = 2: y − 3 = 2(x − 2).
- Expand and tidy: y − 3 = 2x − 4, so y = 2x − 1.
- Check: the line passes through (2, 3), since 2 × 2 − 1 = 3. Correct.
Full working
- y(2) = 4 − 4 + 3 = 3point (2, 3)
- dydx = 2x − 2 = 2 at x = 2gradient
- y − 3 = 2(x − 2)y − y₁ = m(x − x₁)
- y = 2x − 1
Sample questions: Merit
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
- Parallel lines have equal gradients, so each tangent has gradient 9.
- Differentiate: dydx = 3x² − 3. Set it equal to 9: 3x² = 12, so x² = 4 and x = 2 or x = −2.
- Classic mistake: giving only x = 2. A square root has a positive and a negative answer, so there are two tangents.
- At x = 2: y = 8 − 6 + 1 = 3. The point is (2, 3).
- Tangent: y − 3 = 9(x − 2), so y = 9x − 18 + 3 = 9x − 15.
- At x = −2: y = −8 + 6 + 1 = −1. The point is (−2, −1).
- Tangent: y + 1 = 9(x + 2), so y = 9x + 18 − 1 = 9x + 17.
- Both have gradient 9, so both are parallel to y = 9x + 4.
- 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
- 3x² − 3 = 9, so x = ±2parallel: same gradient 9
- x = 2: y = 3; y − 3 = 9(x − 2)
- y = 9x − 15
- x = −2: y = −1; y + 1 = 9(x + 2)
- y = 9x − 15 and y = 9x + 17
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
- The point: x = 1 gives y = 2 − 3 + 4 = 3, so (1, 3).
- The gradient: dydx = 4x − 3, which is 1 at x = 1.
- The tangent: y − 3 = 1(x − 1), so y = x + 2.
- A is on the x-axis, so y = 0: 0 = x + 2 gives x = −2. A is (−2, 0).
- B is on the y-axis, so x = 0: y = 2. B is (0, 2).
- 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.
- Area = 12 × 2 × 2 = 2 square units.
- Classic mistake: using −2 as the base and getting an area of −2. Lengths and areas are never negative.
- Check: the tangent passes through (1, 3), since 1 + 2 = 3. Correct.
Full working
- y(1) = 3; dydx = 4x − 3 = 1 at x = 1
- y − 3 = 1(x − 1), so y = x + 2tangent
- A(−2, 0) and B(0, 2)y = 0 and x = 0
- Area = 12 × 2 × 2
- 2 square units
Sample questions: Excellence
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
- The point (1, −3) is not on the curve, since 1² = 1, not −3. So you cannot use it as the point of contact.
- Instead, let the tangent touch the curve at an unknown point (a, a²).
- The gradient there is dydx = 2a. So the tangent is y − a² = 2a(x − a), which simplifies to y = 2ax − a².
- The tangent must pass through (1, −3). Substitute x = 1 and y = −3: −3 = 2a − a².
- Rearrange: a² − 2a − 3 = 0, so (a − 3)(a + 1) = 0. That gives a = 3 or a = −1, one for each tangent.
- a = 3: the tangent is y = 6x − 9, touching at (3, 9).
- a = −1: the tangent is y = −2x − 1, touching at (−1, 1).
- 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).
- Check both pass through (1, −3): 6 − 9 = −3 and −2 − 1 = −3. Correct.
- 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
- tangent at (a, a²): y = 2ax − a²gradient 2a
- −3 = 2a − a²passes through (1, −3)
- a² − 2a − 3 = 0, so a = 3 or a = −1
- a = 3: y = 6x − 9 at (3, 9)
- a = −1: y = −2x − 1 at (−1, 1)
- y = 6x − 9 and y = −2x − 1
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
- At x = 1: y = 1 and dydx = 3x² = 3. Tangent: y − 1 = 3(x − 1), so y = 3x − 2.
- Where does it meet the curve? Set x³ = 3x − 2, so x³ − 3x + 2 = 0.
- 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.
- Divide: x³ − 3x + 2 = (x − 1)²(x + 2). Expand to check: (x² − 2x + 1)(x + 2) = x³ − 3x + 2. Correct.
- So the other root is x = −2, and y = (−2)³ = −8. The tangent meets the curve again at (−2, −8).
- Now the general case. At x = a: y = a³ and gradient 3a². Tangent: y − a³ = 3a²(x − a), so y = 3a²x − 2a³.
- Meeting points: x³ = 3a²x − 2a³, so x³ − 3a²x + 2a³ = 0.
- 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.
- 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.
- 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.
- Check with a = 1: −2a = −2, which matches the first part.
Full working
- y = 3x − 2point (1, 1), gradient 3
- x³ − 3x + 2 = (x − 1)²(x + 2) = 0x = 1 is a repeated root
- x = −2, y = −8
- tangent at x = a: y = 3a²x − 2a³
- x³ − 3a²x + 2a³ = (x − a)²(x + 2a)expand to check
- y = 3x − 2 meets again at (−2, −8); in general at x = −2a
Practise this
Report a mistake
More in AS 91262
The derivative: what the gradient function means6 min
Differentiating polynomials, fractions and all7 min
Equation of a tangent to a curve, step by step8 min
Turning points: finding and proving max or min8 min
Sketching the gradient graph of a function7 min
Optimisation with calculus: the biggest box8 min
Anti-differentiation and why you need + c7 min
Kinematics: displacement, velocity and acceleration8 min
The derivative: 7 exam questions solved step by step11 min
Differentiating: 7 exam questions solved step by step11 min
Tangents: 7 exam questions solved step by step11 min
Turning points: 7 exam questions solved step by step12 min
Gradient graphs: 7 exam questions solved step by step12 min
Optimisation: 7 exam questions solved step by step11 min
Anti-differentiation: 7 exam questions solved step by step11 min
Kinematics: 7 exam questions solved step by step11 minIs your child on track?
Take the free placement test