Steply

Solve y' - y = 2

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

Step by step

The question

Question: solve y′ − y = 2.

y′ − y = 2

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

P = −1, Q = 2

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^(−x).

No + C needed here: any one factor works.

μ = e^(−x)

3 Multiply both sides

Multiply both sides by e^(−x).

Every term, on both sides.

e^(−x)y′ − e^(−x)y = 2e^(−x)

Careful!

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

Both sides, always.

Careful: not (e^(−x)y)′ = 2 ✗

4 One derivative on the left

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

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

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

(e^(−x)y)′ = 2e^(−x)

5 Integrate both sides

Integrate both sides.

The integral of a derivative is the function itself.

e^(−x)y = ∫ (2e^(−x)) dx

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

e^(−x)y = −2e^(−x) + C

6 Solve for y

Divide both sides by e^(−x).

y = −2e^(−x) + Ce^(−x)

Divide each term.

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

y = −2 + Cex
C over e^(−x) = Cex

7 Check

Let's check: put y back in.

First y′ is Ceˣ.

y′ = Cex

Then y′ − 1y.

y′ − y = Cex − 1(−2 + Cex)

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

Right!

= 2

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 e^(−x) = Cex

Your turn

Try this one yourself, then check:

Solve y′ − y = 3
Show the answer
y = −3 + Cex

More from The integrating factor

The whole lesson: The integrating factor →