Steply

Solve y'' - y = 5

Step by step, with the reason for every step · Undetermined coefficients · Differential Equations

Step by step

The question

Question: solve y″ − y = 5.

y″ − y = 5

The answer has two parts: the plain part, which solves the equation with 0 on the right, plus one extra solution that makes 5.

y = yc + yp: the plain part + one extra solution

1 Solve with 0 on the right

Try y = e^(rx): the characteristic equation is r² − 1 = 0.

r2 − 1 = 0
y″ → r², y′ → r, y → 1

Two numbers that multiply to −1 and add to 0: 1 and −1.

1 × (−1) = −1, 1 + (−1) = 0

So it factors: (r + 1)(r − 1) = 0.

(r + 1)(r − 1) = 0

Each bracket can be 0: r = −1 or r = 1.

r = −1 or r = 1

Each root gives a solution e^(rx).

Any mix of the two works, so we add them with two numbers, C₁ and C₂.

two roots r₁, r₂: C₁e^(r₁x) + C₂e^(r₂x)

So the plain part is C₁e^(−x) + C₂eˣ.

yc = C1e^(−x) + C2ex

2 Guess the extra part

The extra part has the same shape as the right side: just a number.

a number → A

So we guess A for the extra part.

A is the numbers we must find.

yp = A

3 Put the guess in

Its derivative.

y′p = 0

And once more.

y″p = 0

Put them into the left side.

0 − A = 5

Multiply out and put like parts together.

−A = 5

4 Match the parts

The two sides must match, part by part: the same amount of each shape.

number parts: −A = 5
same shape → same number

So A = −5.

A = −5

So the extra part is −5.

yp = −5

5 Add the parts

Add the parts: y = C₁e^(−x) + C₂eˣ − 5.

y = C1e^(−x) + C2ex − 5

6 Check

Let's check the extra part: put −5 into the left side.

put in yp: 0 − (−5)

It gives 5: the right side.

Right!

= 5

Let's look back.

First: solve with 0 on the right.

Then: guess the extra part.

Then: put the guess in.

Then: match the parts.

Then: add the parts.

Last: check.

Answer
y = C1e^(−x) + C2ex − 5

Your turn

Try this one yourself, then check:

Solve y″ − y = 2
Show the answer
y = C1e^(−x) + C2ex − 2

More from Undetermined coefficients

The whole lesson: Undetermined coefficients →