Steply

Solve y'' + 3y' + 2y = 4x

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

Step by step

The question

Question: solve y″ + 3y′ + 2y = 4x.

y″ + 3y′ + 2y = 4x

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

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: 2 and 1.

2 × 1 = 2, 2 + 1 = 3

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

(r + 2)(r + 1) = 0

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

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

yc = C1e^(−2x) + C2e^(−x)

2 Guess the extra part

The extra part has the same shape as the right side: a polynomial of the same size, with every lower power too.

x → Ax + B

Careful!

Every lower power is needed too: the derivatives make them.

Careful: not yp = Ax ✗

So we guess Ax + B for the extra part.

A and B are the numbers we must find.

yp = Ax + B

3 Put the guess in

Its derivative.

y′p = A

And once more.

y″p = 0

Put them into the left side.

0 + 3 × A + 2(Ax + B) = 4x

Multiply out and put like parts together.

2Ax + 3A + 2B = 4x

4 Match the parts

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

x parts: 2A = 4
number parts: 3A + 2B = 0
same shape → same number

So A = 2.

A = 2

Put in what we know.

2B = −6

So B = −3.

B = −3

So the extra part is 2x − 3.

yp = 2x − 3

5 Add the parts

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

y = C1e^(−2x) + C2e^(−x) + 2x − 3

6 Check

Let's check the extra part: put 2x − 3 into the left side.

put in yp: 0 + 3 × 2 + 2(2x − 3)

It gives 4x: the right side.

Right!

= 4x

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^(−2x) + C2e^(−x) + 2x − 3

Your turn

Try this one yourself, then check:

Solve y″ + 3y′ + 2y = 12x
Show the answer
y = C1e^(−2x) + C2e^(−x) + 6x − 9

More from Undetermined coefficients

The whole lesson: Undetermined coefficients →