Step by step
The question
Question: solve y″ − y = 2e^(2x), with y(0) = 1 and y′(0) = 0.
The answer has two parts: the plain part, which solves the equation with 0 on the right, plus one extra solution that makes 2e^(2x).
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 number times the same e power.
So we guess Ae^(2x) for the extra part.
A is 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 = 2/3.
So the extra part is 2/3 × e^(2x).
5 Add the parts
Add the parts first.
The starting values are for the whole y.
6 Use the starting values
We need y′ too: the derivative of our y.
Put x = 0 into y: C₁ + C₂ + 666667/1000000 = 1.
Move the 666667/1000000 over.
Put x = 0 into y′: −C₁ + C₂ + 1333333/1000000 = 0.
Move the 1333333/1000000 over.
From ①: C₁ = 333333/1000000 − C₂.
Put it into ②.
Open the bracket and collect: −1 × 333333/1000000 moves over.
So C₂ = −1/2, and C₁ = 833333/1000000.
Put them in: y = 833333/1000000 × e^(−x) − ½eˣ + 2/3 × e^(2x).
7 Check
Let's check the extra part: put 2/3 × e^(2x) into the left side.
It gives 2e^(2x): the right side.
Right!
And the starting values: 1 and 0.
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.
Then: use the starting values.
Last: check.