Anti-differentiation and why you need + c
What this lesson covers
- Anti-differentiation reverses differentiation, and every answer has a family of curves, so + c is needed.
- A known point on the curve fixes the value of c.
Going backwards
- Differentiating takes a function to its gradient.
- Anti-differentiating goes back the other way.
- Given the gradient, find the function.
The rule, reversed
- Raise the power by one.
- Divide by the new power.
- Then add + c.
| Term | Do | Get |
|---|---|---|
| xⁿ | raise the power by 1 | xⁿ⁺¹ |
| divide by the new power | xⁿ⁺¹/(n + 1) | |
| a constant k | becomes | kx |
| always | add | + c |
Anti-differentiate 6x² − 4x + 3
- Term by term.
- Three terms in, three out.
- 6x² → 6x³/3 = 2x³power 2 to 3, ÷ 3
- −4x → −4x²/2 = −2x²power 1 to 2, ÷ 2
- 3 → 3xa constant k → kx
- 2x³ − 2x² + 3x + cadd + c
- check: 6x² − 4x + 3differentiate back
Fractions, and checking
- Same rule for fractions.
- Differentiate back to check.
- x² → x³/3 + cpower 2 to 3, ÷ 3
- 3 − x/2 = 3 − ½xx/2 is ½x
- 3 → 3xa constant k → kx
- −½x → −½ × x²/2power 1 to 2, ÷ 2
- = −x²/4½ ÷ 2 = ¼
- 3x − x²/4 + c
- check: 3 − 2x/4 = 3 − x/2differentiate back
Why + c: a family of curves
- x², x² + 2 and x² − 2 all have gradient 2x.
- At x = 1 they are all equally steep.
- The gradient cannot tell them apart.

Try it: a family of curves
A point picks one curve
- Suppose the curve passes through (1, 3).
- 1 + c = 3, so c = 2.
- Only y = x² + 2 goes through it.

Finding c, written out
- Anti-differentiate, with + c.
- Substitute the point.
- Solve for c.
- f′(x) = 2x + 5
- f(x) = x² + 5x + canti-differentiate
- f(1) = 1² + 5(1) + c = 10through (1, 10)
- 6 + c = 10, so c = 4
- f(x) = x² + 5x + 4
- check: f′(x) = 2x + 5
- check: f(1) = 1 + 5 + 4 = 10
The two ways marks go
- Leaving out + c.
- Dropping a term from a long expression.
- Count terms in, count terms out.
Graphing calculator
In context: filling a tank
- It starts with 50 litres.
- V(0) = 50 fixes c.
- dV/dt = 20 − 2tlitres a minute
- V = 20t − 2t²/2 + canti-differentiate
- = 20t − t² + c
- V(0) = 0 − 0 + c = 5050 L at the start
- c = 50, V = 20t − t² + 50
- V(5) = 20 × 5 − 5² + 50
- = 100 − 25 + 50 = 125 L
Try it: check by going back
Where the marks are
- Achieved: a general anti-derivative with + c.
- Merit: c found from a point.
- Excellence: used in a real problem.
What to take away
- Raise, divide, + c, then let a point fix c.
| Anti-differentiate | raise the power, divide by it |
| Constant k | becomes kx |
| Every time | + c |
| Why | a family of curves, same gradient |
| A point | fixes c |
| Check | differentiate your answer back |
Common mistakes
- 6x² − 4x + 3 anti-differentiates to 2x³ − 2x² + 3xAdd + c every time, because any constant differentiates to 0: the answer is 2x³ − 2x² + 3x + c.
- The constant 3 anti-differentiates to 0.A constant k becomes kx, because 3x differentiates back to 3. Count terms in, count terms out.
- x²/2 anti-differentiates to x³/2 + cRaise the power, then divide by the new power: x²/2 → x³/(2 × 3) = x³/6 + c.
- f′(x) = 6x and f(2) = 15, so f(x) = 3x² + 15Substitute the point to find c: 3 × 2² + c = 15 gives c = 3, so f(x) = 3x² + 3.
Your turn: eight questions
- Every answer needs + c, or a value for it.
- Check by differentiating back.
Anti-differentiate 4x³ + 2x.
f′(x) = 6x and f(2) = 15. Find f(x).
Anti-differentiate x²/2.
Gradient 2x − 3, through (0, 4). Find the curve.
Which of these is an anti-derivative of 6x² − 4?
Why does every anti-derivative need + c?
A student anti-differentiates 8x³ − 6x + 1 and writes 2x⁴ − 3x² + c. What is the mistake?
A Rotorua hot pool fills at dV/dt = 60 − 3t litres per minute and starts with 100 litres. How much water is in it after 10 minutes?
Show answer
1. x⁴ + x² + c. 2. f(x) = 3x² + c; 12 + c = 15, so c = 3 and f(x) = 3x² + 3. 3. x³/6 + c. 4. y = x² − 3x + c; at (0, 4), c = 4, so y = x² − 3x + 4. 5. 2x³ − 4x + 9: differentiating it back gives 6x² − 4, and + 9 is just one choice of c. 6. A constant differentiates to 0, so a whole family of curves has the same gradient function. 7. A term is missing: the constant 1 becomes x, so the answer is 2x⁴ − 3x² + x + c. 8. 550 L. V = 60t − 1.5t² + c and V(0) = 100 gives c = 100, so V(10) = 600 − 150 + 100 = 550.
The answers: questions 1 and 2
- 1. 4x³ → 4x⁴/4 = x⁴power 3 to 4, ÷ 4
- 2x → 2x²/2 = x²power 1 to 2, ÷ 2
- x⁴ + x² + cadd + c
- 2. f(x) = 6x²/2 + c = 3x² + canti-differentiate
- f(2) = 3 × 2² + c = 15f(2) = 15
- 12 + c = 15, so c = 3
- f(x) = 3x² + 3
The answers: questions 3 and 4
- 3. x²/2 → x³/(2 × 3)power 2 to 3, ÷ 3
- = x³/6 + cadd + c
- 4. 2x → x², −3 → −3xanti-differentiate
- y = x² − 3x + c
- 4 = 0² − 3(0) + cthrough (0, 4)
- c = 4
- y = x² − 3x + 4
- check: dy/dx = 2x − 3
Sample question: Achieved
A curve has gradient function dydx = 6x² − 4x + 5 and passes through the point (1, 8). Find the equation of the curve.
Hint
Anti-differentiate each term (add 1 to the power, then divide by the new power), include + c, then use the point to find c.
Answer
y = 2x³ − 2x² + 5x + 3
Step by step
- Anti-differentiating undoes differentiating. The rule for each term: add 1 to the power, then divide by the new power.
- 6x²: the power goes up to 3, then divide by 3, giving 6x³3 = 2x³.
- −4x: the power goes up to 2, then divide by 2, giving −2x². And 5 becomes 5x.
- Add + c, because any constant differentiates to zero. So y = 2x³ − 2x² + 5x + c.
- Classic mistake: leaving out + c. Then the curve cannot be made to pass through (1, 8), and the answer loses marks.
- Use the point: when x = 1, y = 8. So 8 = 2 − 2 + 5 + c, which gives 8 = 5 + c and c = 3.
- The curve is y = 2x³ − 2x² + 5x + 3.
- Check by differentiating: dydx = 6x² − 4x + 5, which is what we started with. And at x = 1, y = 2 − 2 + 5 + 3 = 8. Correct.
Full working
- y = 6x³3 − 4x²2 + 5x + cadd 1 to the power, divide by the new power
- y = 2x³ − 2x² + 5x + c
- 8 = 2 − 2 + 5 + c, so c = 3the point (1, 8)
- y = 2x³ − 2x² + 5x + 3
Sample questions: Merit
Given f′(x) = (2x − 1)(x + 3) and f(2) = 10, find f(x).
Hint
You cannot anti-differentiate a product of brackets term by term. Expand first, then anti-differentiate and use f(2) = 10.
Answer
f(x) = 2x³3 + 5x²2 − 3x + 23
Step by step
- There is no simple rule for anti-differentiating a product, so expand the brackets first.
- (2x − 1)(x + 3) = 2x² + 6x − x − 3 = 2x² + 5x − 3.
- Classic mistake: anti-differentiating each bracket separately and multiplying. That does not undo differentiation.
- Anti-differentiate each term: 2x² gives 2x³3, 5x gives 5x²2, and −3 gives −3x.
- Add + c: f(x) = 2x³3 + 5x²2 − 3x + c.
- Use f(2) = 10. 2 × 83 = 163, 5 × 42 = 10, and −3 × 2 = −6. So 163 + 10 − 6 + c = 10.
- 163 + 4 = 283, so c = 10 − 283 = 303 − 283 = 23.
- So f(x) = 2x³3 + 5x²2 − 3x + 23. Keep the fractions exact; decimals like 0.667 lose accuracy.
- Check by differentiating: 2x² + 5x − 3, which is (2x − 1)(x + 3) expanded. Correct.
Full working
- f′(x) = 2x² + 5x − 3expand first
- f(x) = 2x³3 + 5x²2 − 3x + canti-differentiate each term
- 163 + 10 − 6 + c = 10f(2) = 10
- c = 10 − 283 = 23
- f(x) = 2x³3 + 5x²2 − 3x + 23
Water flows into a tank so that the volume V litres changes at a rate dVdt = 40 − 2t litres per minute, t minutes after the tap is turned on. The tank holds 100 litres at t = 0. Find V in terms of t, the volume after 10 minutes, and the volume when water stops flowing in.
Hint
Anti-differentiate the rate and use V = 100 at t = 0 to find c. The water stops flowing in when the rate is zero.
Answer
V = 40t − t² + 100; 400 litres after 10 minutes; 500 litres when the flow stops at t = 20
Step by step
- The rate dVdt is the derivative of V, so anti-differentiate it to get V.
- 40 becomes 40t, and −2t becomes −2t²2 = −t². So V = 40t − t² + c.
- Use the starting volume: at t = 0, V = 100. So 100 = 0 − 0 + c and c = 100.
- Classic mistake: thinking c is always 0. Here c is the volume already in the tank at the start.
- So V = 40t − t² + 100.
- After 10 minutes: V = 400 − 100 + 100 = 400 litres.
- Water stops flowing in when the rate is zero: 40 − 2t = 0, so t = 20 minutes.
- At t = 20: V = 800 − 400 + 100 = 500 litres.
- Check by differentiating: dVdt = 40 − 2t, as given. And the rate is positive for t < 20, so the volume rises the whole time up to 500 litres.
Full working
- V = 40t − t² + canti-differentiate the rate
- 100 = cV = 100 at t = 0
- V(10) = 400 − 100 + 100 = 400 L
- 40 − 2t = 0, so t = 20the flow stops
- V = 40t − t² + 100; 400 L; 500 L at t = 20
Sample questions: Excellence
A curve has gradient function dydx = 3x² − 12. The local minimum value of the curve is −10. Find the equation of the curve, and the coordinates of its local maximum.
Hint
Find where the gradient is zero and decide which turning point is the minimum. Then anti-differentiate and use the minimum point to find c.
Answer
y = x³ − 12x + 6; the local maximum is (−2, 22)
Step by step
- Turning points are where the gradient is zero: 3x² − 12 = 0, so x² = 4 and x = 2 or x = −2.
- Decide which one is the minimum. Differentiate the gradient: the second derivative is 6x.
- At x = 2 it is 12, which is positive, so x = 2 is a minimum. At x = −2 it is −12, negative, so x = −2 is a maximum.
- Anti-differentiate the gradient: y = x³ − 12x + c.
- The minimum value is the y value at the minimum, so the point (2, −10) is on the curve.
- Substitute: −10 = 8 − 24 + c = −16 + c, so c = 6.
- The curve is y = x³ − 12x + 6.
- Classic mistake: putting y = −10 at x = −2. The question says minimum, so you must first work out which x is the minimum.
- The maximum is at x = −2: y = −8 + 24 + 6 = 22. So the local maximum is (−2, 22).
- Check: the maximum (22) is higher than the minimum (−10), as it must be for a cubic with a positive x³ term.
Full working
- 3x² − 12 = 0, so x = ±2turning points
- d²ydx² = 6x: 12 > 0 at x = 2 (min), −12 < 0 at x = −2 (max)
- y = x³ − 12x + canti-differentiate
- −10 = 8 − 24 + c, so c = 6minimum at (2, −10)
- y(−2) = −8 + 24 + 6 = 22
- y = x³ − 12x + 6; maximum (−2, 22)
A curve has gradient function dydx = kx(x − 4), where k is a constant. The curve has a turning point at (0, 5) and passes through (3, −4). Find k and the equation of the curve. Then find the other turning point and show whether it is a maximum or a minimum.
Hint
Expand, then anti-differentiate with k still in it. The point (0, 5) gives c, and (3, −4) then gives k.
Answer
k = 1, y = x³3 − 2x² + 5; the other turning point is (4, −173), a minimum
Step by step
- Expand the gradient function: dydx = kx² − 4kx. Leave k as a letter for now.
- Anti-differentiate: y = kx³3 − 4kx²2 + c = kx³3 − 2kx² + c.
- There are two unknowns, k and c, so use the two given points.
- (0, 5): every k term is zero at x = 0, so 5 = c.
- (3, −4): −4 = k × 273 − 2k × 9 + 5 = 9k − 18k + 5 = −9k + 5. So −9k = −9 and k = 1.
- The curve is y = x³3 − 2x² + 5.
- The gradient is x(x − 4), which is zero at x = 0 and x = 4. So the other turning point is at x = 4.
- y = 643 − 32 + 5 = 643 − 27 = 643 − 813 = −173. The point is (4, −173).
- Nature: check the gradient either side of x = 4. At x = 3 it is 3 × (−1) = −3 (falling). At x = 5 it is 5 × 1 = 5 (rising).
- Falling then rising means a minimum. So (4, −173) is a local minimum.
- Classic mistake: forgetting that k multiplies every term, and anti-differentiating x(x − 4) without it. Then the point (3, −4) cannot be used to find anything.
- Check: differentiate y to get x² − 4x = x(x − 4), and y(3) = 9 − 18 + 5 = −4. Both fit.
Full working
- dydx = kx² − 4kxexpand
- y = kx³3 − 2kx² + c
- c = 5the point (0, 5)
- −4 = 9k − 18k + 5, so k = 1the point (3, −4)
- x(x − 4) = 0 at x = 4: y = 643 − 27 = −173
- gradient −3 at x = 3, +5 at x = 5falling then rising: minimum
- k = 1, y = x³3 − 2x² + 5; minimum at (4, −173)
Calculus Grapher

Full screen · PhET Interactive Simulations, University of Colorado Boulder, CC BY 4.0
Challenge
A curve has gradient function dydx = ax² − 2x, where a is a constant. The line y = 4x − 7 is the tangent to the curve at the point (2, 1). Find a and the equation of the curve. Then find the other point on the curve where the gradient is 4.
Hint
The tangent tells you two things at x = 2: the gradient of the curve there, and a point on the curve. Use the gradient first.
Answer
a = 2, y = 2x³3 − x² − 13, and the other point is (−1, −2).
Step by step
- The tangent at (2, 1) has gradient 4, so dydx = 4 when x = 2. That gives a.
- Anti-differentiate the gradient function, with + c.
- The curve goes through (2, 1), so substitute it to find c.
- Set dydx = 4 again and solve the quadratic: x = 2 is one answer, the other is new.
- Find the height of the new point from the curve, not from the gradient.
Full working
- a(2)² − 2(2) = 4gradient of the tangent at x = 2
- 4a − 4 = 4, so a = 2solve
- y = 2x³3 − x² + canti-differentiate 2x² − 2x
- 2(8)3 − 4 + c = 1through (2, 1)
- 163 − 4 + c = 1, so c = −13solve for c
- 2x² − 2x = 4where else is the gradient 4?
- x² − x − 2 = 0, so (x − 2)(x + 1) = 0divide by 2, factorise
- x = −1x = 2 is the tangent point
- y = 2(−1)3 − 1 − 13 = −2height from the curve
- a = 2, y = 2x³3 − x² − 13, other point (−1, −2)
A curve has gradient function dydx = 3x² − 6x − 6. The line y = 3x + 1 is a tangent to the curve, but you are not told where it touches. Find every possible equation of the curve, and the point where the line touches each one.
Hint
At the touching point the curve's gradient equals the line's gradient. Find those x-values first, then make the curve go through the line's point there.
Answer
y = x³ − 3x² − 6x − 4, touching at (−1, −2), or y = x³ − 3x² − 6x + 28, touching at (3, 10).
Step by step
- Anti-differentiating gives a family of curves y = x³ − 3x² − 6x + c, one for each c.
- Where the line is a tangent, the curve's gradient must be 3, the line's gradient. That happens at two x-values.
- At a touching point the curve and the line also have the same height, so the point is on the line.
- Each x-value gives its own c, so there are two curves.
- Give each curve with its own touching point.
Full working
- y = x³ − 3x² − 6x + canti-differentiate
- 3x² − 6x − 6 = 3gradient of the line is 3
- x² − 2x − 3 = (x − 3)(x + 1) = 0, so x = 3 or x = −1solve
- x = 3: line height 3(3) + 1 = 10, curve 27 − 27 − 18 + c = c − 18 = 10, so c = 28same height
- x = −1: line height −2, curve −1 − 3 + 6 + c = c + 2 = −2, so c = −4same height
- y = x³ − 3x² − 6x + 28 touching at (3, 10), or y = x³ − 3x² − 6x − 4 touching at (−1, −2)
Curve A has gradient function dydx = 3x² + 2x − 1 and passes through (0, 5). Curve B has gradient function dydx = 2x + 2 and passes through (1, 6). Find the equation of each curve. Show that the curves touch at (1, 6), find the other point where they meet, and find the greatest vertical gap between the curves between these two points.
Hint
Write the gap as A − B, a single cubic. Where the curves touch, the gap has a double root.
Answer
A: y = x³ + x² − x + 5 and B: y = x² + 2x + 3. They touch at (1, 6), meet again at (−2, 3), and the greatest gap between them is 4, at x = −1.
Step by step
- Anti-differentiate each gradient function with its own constant, and use each curve's point to fix it.
- Both curves pass through (1, 6) with the same gradient there, so they share a tangent: they touch.
- The gap A − B is a cubic. Touching at x = 1 makes (x − 1)² a factor, and the last factor gives the other meeting point.
- The gap is greatest where its own derivative is 0, inside the interval −2 < x < 1.
- Check the gap at that point is bigger than at the ends, where it is 0.
Full working
- A: y = x³ + x² − x + c, c = 5through (0, 5)
- B: y = x² + 2x + k, 1 + 2 + k = 6, so k = 3through (1, 6)
- A(1) = 1 + 1 − 1 + 5 = 6, gradients 3 + 2 − 1 = 4 and 2 + 2 = 4same point, same gradient: they touch
- A − B = x³ − 3x + 2 = (x − 1)²(x + 2)the gap
- x = −2: A = −8 + 4 + 2 + 5 = 3, B = 4 − 4 + 3 = 3other meeting point (−2, 3)
- d(A − B)dx = 3x² − 3 = 0, so x = −1x = 1 is the end point
- A − B at x = −1: −1 + 3 + 2 = 4A = 6, B = 2
- A: y = x³ + x² − x + 5, B: y = x² + 2x + 3; meet again at (−2, 3); greatest gap 4 at x = −1
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 min