Steply

Solve y'' + y = 3e^(2x)

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

Step by step

The question

Question: solve y″ + y = 3e^(2x).

y″ + y = 3e^(2x)

The answer has two parts: the plain part, which solves the equation with 0 on the right, plus one extra solution that makes 3e^(2x).

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

It does not factor nicely, so we use the formula, with a = 1, b = 0, c = 1.

r = −b ± √b² − 4ac2a

Put the numbers in.

r = 0 ± √0² − 4 × 1 × 12 × 1

Under the root: −4.

r = 0 ± √−42

A minus under the root: √(−4) = 2i, because i = √(−1).

√−4 = √4 × √−1 = 2i
r = 0 ± 2i2

Divide both parts by 2: r = ±i.

Two complex roots.

r = ±i

Complex roots give cosines and sines.

The real part 0 goes in the e, the 1 goes inside cos and sin.

α ± βi: e^(αx)(C₁cos βx + C₂sin βx)

So the plain part is C₁cos x + C₂sin x.

yc = C1cos x + C2sin x

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)

So we guess Ae^(2x) for the extra part.

A is the numbers we must find.

yp = Ae^(2x)

3 Put the guess in

Its derivative.

y′p = 2Ae^(2x)

And once more.

y″p = 4Ae^(2x)

Put them into the left side.

4Ae^(2x) + Ae^(2x) = 3e^(2x)

Multiply out and put like parts together.

5Ae^(2x) = 3e^(2x)

4 Match the parts

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

e^(2x) parts: 5A = 3
same shape → same number

So A = 3/5.

A = 35

So the extra part is 3/5 × e^(2x).

yp = 35e^(2x)

5 Add the parts

Add the parts: y = C₁cos x + C₂sin x + 3/5 × e^(2x).

y = C1cos x + C2sin x + 35e^(2x)

6 Check

Let's check the extra part: put 3/5 × e^(2x) into the left side.

put in yp: 125e^(2x) + 35e^(2x)

It gives 3e^(2x): the right side.

Right!

= 3e^(2x)

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 = C1cos x + C2sin x + 35e^(2x)

Your turn

Try this one yourself, then check:

Solve y″ + y = 10e^(2x)
Show the answer
y = C1cos x + C2sin x + 2e^(2x)

More from Undetermined coefficients

The whole lesson: Undetermined coefficients →