Steply

Solve y'' - 3y' + 2y = 6e^x

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

Step by step

The question

Question: solve y″ − 3y′ + 2y = 6eˣ.

y″ − 3y′ + 2y = 6ex

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

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² − 3r + 2 = 0.

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

Two numbers that multiply to 2 and add to −3: −1 and −2.

−1 × (−2) = 2, −1 + (−2) = −3

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

(r − 1)(r − 2) = 0

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

r = 1 or r = 2

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ˣ + C₂e^(2x).

yc = C1ex + C2e^(2x)

2 Guess the extra part

The extra part has the same shape as the right side: a number times the same e power.

e to the kx → Ae^(kx)

But eˣ is already in the plain part: it gives 0 on the left.

So we multiply it by x.

already in yc → times x

Careful!

That one is already in the plain part, so it can only give 0.

Times x.

Careful: not yp = Aex ✗

So we guess Ax eˣ for the extra part.

A is the numbers we must find.

yp = Axex

3 Put the guess in

Its derivative.

y′p = Aex + Axex

And once more.

y″p = 2Aex + Axex

Put them into the left side.

2Aex + Axex − 3(Aex + Axex) + 2 × Axex = 6ex

Multiply out and put like parts together.

−Aex = 6ex

4 Match the parts

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

ex parts: −A = 6
same shape → same number

So A = −6.

A = −6

So the extra part is −6x eˣ.

yp = −6xex

5 Add the parts

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

y = C1ex + C2e^(2x) − 6xex

6 Check

Let's check the extra part: put −6x eˣ into the left side.

put in yp: −12ex − 6xex − 3(−6ex − 6xex) + 2(−6xex)

It gives 6eˣ: the right side.

Right!

= 6ex

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 = C1ex + C2e^(2x) − 6xex

Your turn

Try this one yourself, then check:

Solve y″ − 3y′ + 2y = 2ex
Show the answer
y = C1ex + C2e^(2x) − 2xex

More from Undetermined coefficients

The whole lesson: Undetermined coefficients →