Steply

Solve y' + y = e^x

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

Step by step

The question

Question: solve y′ + y = eˣ.

y′ + y = ex

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 = 1 and Q = eˣ.

P = 1, Q = ex

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 1 is x.

∫ 1 dx = x

So the integrating factor is eˣ.

No + C needed here: any one factor works.

μ = ex

3 Multiply both sides

Multiply both sides by eˣ.

Every term, on both sides.

exy′ + exy = e^(2x)

Careful!

The right side is multiplied by eˣ too.

Both sides, always.

Careful: not (exy)′ = ex ✗

4 One derivative on the left

By the product rule, the derivative of eˣ × y is exactly our left side.

(μy)′ = μy′ + μ′y
μ′ = ex

So the left side is just (eˣy)′: one derivative.

(exy)′ = e^(2x)

5 Integrate both sides

Integrate both sides.

The integral of a derivative is the function itself.

exy = ∫ e^(2x) dx

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

exy = 12e^(2x) + C

6 Solve for y

Divide both sides by eˣ.

y = 12e^(2x) + Cex

Divide each term.

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

y = 12ex + Ce^(−x)
C over ex = Ce^(−x)

7 Check

Let's check: put y back in.

First y′ is ½eˣ − Ce^(−x).

y′ = 12ex − Ce^(−x)

Then y′ + 1y.

y′ + y = 12ex − Ce^(−x) + 1(12ex + Ce^(−x))

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

Right!

= ex

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.

Last: check.

Answer
C over ex = Ce^(−x)

Your turn

Try this one yourself, then check:

Solve y′ + y = 6ex
Show the answer
y = 3ex + Ce^(−x)

More from The integrating factor

The whole lesson: The integrating factor →