Steply

Solve y' + 3y = 9, y(0) = 0

Step by step, with the reason for every step · The integrating factor · Differential Equations

Step by step

The question

Question: solve y′ + 3y = 9, with y(0) = 0.

y′ + 3y = 9

y(0) = 0 is the starting value.

y(0) = 0

1 Standard form

Linear means this form: y′ + P y = Q.

P and Q have only x.

linear: y′ + P(x) y = Q(x)

Here P = 3 and Q = 9.

P = 3, Q = 9

2 The integrating factor

The integrating factor is e to the integral of P.

Multiplying by it makes the left side one derivative.

integrating factor: μ = e^(∫P dx)

First the integral of P: the integral of 3 is 3x.

∫ 3 dx = 3x

So the integrating factor is e^(3x).

No + C needed here: any one factor works.

μ = e^(3x)

3 Multiply both sides

Multiply both sides by e^(3x).

Every term, on both sides.

e^(3x)y′ + 3e^(3x)y = 9e^(3x)

Careful!

The right side is multiplied by e^(3x) too.

Both sides, always.

Careful: not (e^(3x)y)′ = 9 ✗

4 One derivative on the left

By the product rule, the derivative of e^(3x) × y is exactly our left side.

(μy)′ = μy′ + μ′y
μ′ = 3e^(3x)

So the left side is just (e^(3x)y)′: one derivative.

(e^(3x)y)′ = 9e^(3x)

5 Integrate both sides

Integrate both sides.

The integral of a derivative is the function itself.

e^(3x)y = ∫ (9e^(3x)) dx

On the right: 3e^(3x), and + C.

e^(3x)y = 3e^(3x) + C

6 Solve for y

Divide both sides by e^(3x).

y = 3e^(3x) + Ce^(3x)

Divide each term.

Dividing by e to a power is the same as e to minus that power.

y = 3 + Ce^(−3x)
C over e^(3x) = Ce^(−3x)

7 Use the starting value

Put in x = 0 and y = 0.

e⁰ = 1.

0 = 3 + C × 1

So C = −3.

C = −3

So y = 3 − 3e^(−3x).

y = 3 − 3e^(−3x)

8 Check

Let's check: put y back in.

First y′ is 9e^(−3x).

y′ = 9e^(−3x)

Then y′ + 3y.

y′ + 3y = 9e^(−3x) + 3(3 − 3e^(−3x))

The e parts cancel, and we get 9: Q again.

Right!

= 9

Let's look back.

First: standard form.

Then: the integrating factor.

Then: multiply both sides.

Then: one derivative on the left.

Then: integrate both sides.

Then: solve for y.

Then: use the starting value.

Last: check.

Answer
y = 3 − 3e^(−3x)

Your turn

Try this one yourself, then check:

Solve y′ + 2y = 6
Show the answer
y = 3 + 2e^(−2x)

More from The integrating factor

The whole lesson: The integrating factor →