Steply

f′(x) = 3x^2 - 4x + 1, f(2) = 5, find f(x)

Step by step, with the reason for every step · Initial value problems · Calculus 1

Step by step

The question

Question: find f(x), if f′(x) = 3x² − 4x + 1 and f(2) = 5.

f′(x) = 3x2 − 4x + 1

1 Find the antiderivative

Go backwards: the antiderivative.

Add 1 to each power, divide by the new power.

And + C.

f(x) = 3 × x33 − 4 × x22 + x + C

Now we have f(x) = x³ − 2x² + x + C.

= x3 − 2x2 + x + C

Every antiderivative has + C.

The point will tell us what C is.

+ C: we do not know it yet

2 Find C

Put in x = 2.

f(2) = 23 − 2(2)2 + 2 + C

Work it out: 2 + C.

= 2 + C

It must equal 5.

2 + C = 5

Take away 2 on both sides: C = 3.

C = 5 − 2 = 3

Careful!

C is not just the f value.

The other terms at x = 2 are not 0 here.

Careful: not C = 5 ✗

3 Write the function

So f(x) = x³ − 2x² + x + 3.

f(x) = x3 − 2x2 + x + 3

4 Check

Let's check: its derivative is 3x² − 4x + 1, the slope we were given.

f′(x) = 3x2 − 4x + 1

And at x = 2 it gives 5.

Right!

x = 2: 2 + 3 = 5

Let's look back.

First: find the antiderivative.

Then: find C.

Then: write the function.

Last: check.

Answer
f(x) = x3 − 2x2 + x + 3

Your turn

Try this one yourself, then check:

Find f(x), if f′(x) = 3x2 − 2x + 1
Show the answer
f(x) = x3 − x2 + x − 4

More from Initial value problems

The whole lesson: Initial value problems →