Step by step
The question
Question: solve y″ − y = 3x².
The answer has two parts: the plain part, which solves the equation with 0 on the right, plus one extra solution that makes 3x².
1 Solve with 0 on the right
Try y = e^(rx): the characteristic equation is r² − 1 = 0.
Two numbers that multiply to −1 and add to 0: 1 and −1.
So it factors: (r + 1)(r − 1) = 0.
Each bracket can be 0: 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₂.
So the plain part is C₁e^(−x) + C₂eˣ.
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.
Careful!
Every lower power is needed too: the derivatives make them.
So we guess Ax² + Bx + C for the extra part.
A, B and C are the numbers we must find.
3 Put the guess in
Its derivative.
And once more.
Put them into the left side.
Multiply out and put like parts together.
4 Match the parts
The two sides must match, part by part: the same amount of each shape.
So A = −3.
So B = 0.
Put in what we know.
So C = −6.
So the extra part is −3x² − 6.
5 Add the parts
Add the parts: y = C₁e^(−x) + C₂eˣ − 3x² − 6.
6 Check
Let's check the extra part: put −3x² − 6 into the left side.
It gives 3x²: the right side.
Right!
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.