Start with y′ + 2y = e^t. Try y_p = A·e^t: the derivative is A·e^t, so the left side is A·e^t + 2A·e^t = 3A·e^t, and matching e^t gives 3A = 1. The particular solution is (1/3)·e^t. Nothing needed to be solved: one equation, one unknown, and the unknown multiplies the forcing's own shape.
Theorem · Exponential forcingIf a + b ≠ 0, then y_p = e^(bt)/(a + b) is a particular solution of y′ + a·y = e^(bt).
The derivative of e^(bt)/(a + b) is b·e^(bt)/(a + b).
Adding a times the function gives (b + a)·e^(bt)/(a + b) = e^(bt). The division by a + b is the only step that needs the condition, and it is exactly the condition under which the formula has an answer.
□
A cosine needs a sine
Two facts about sine and cosine are used from here on, and they are stated rather than derived: the rate of sin(t) is cos(t), and the rate of cos(t) is −sin(t), so that cos(ωt) has rate −ω·sin(ωt) and sin(ωt) has rate ω·cos(ωt). The next course opens with them, in “Sine, Cosine and Their Rates”, where their quotients are computed and the claim is demonstrated; here they are the claim the matching rests on.
For y′ + 2y = cos(t) the guess A·cos(t) alone gives −A·sin(t) + 2A·cos(t). The sine term needs −A = 0 and the cosine term needs 2A = 1, which contradict each other. The derivative of the cosine is a sine, so the guess has to contain one.
y_p = A·cos(t) + B·sin(t)
y_p′ = −A·sin(t) + B·cos(t)
y_p′ + 2y_p = (2A + B)·cos(t) + (2B − A)·sin(t)
cos(t) terms: 2A + B = 1
sin(t) terms: 2B − A = 0
A = 2B, so 5B = 1: B = 1/5, A = 2/5
The particular solution is (2/5)·cos(t) + (1/5)·sin(t), and the forcing had no sine in it at all. The check is exact: 2·(2/5) + 1/5 = 1 for the cosine and 2·(1/5) − 2/5 = 0 for the sine. The sine appears because the unknown's rate depends on its own value, so the response lags the forcing.
Theorem · Sinusoidal forcingFor a ≠ 0, a particular solution of y′ + a·y = cos(ωt) is A·cos(ωt) + B·sin(ωt) with A = a/(a² + ω²) and B = ω/(a² + ω²).
Matching gives a·A + ω·B = 1 for the cosine and a·B − ω·A = 0 for the sine. The second equation says A = a·B/ω, and putting that into the first gives B·(a²/ω + ω) = 1, so B = ω/(a² + ω²) and then A = a/(a² + ω²).
The denominator a² + ω² is positive whenever a ≠ 0, so the system always has an answer. A sinusoid forcing cannot be resonant for a real nonzero a: the guess never collapses. With a = 2 and ω = 1 the formulas give 2/5 and 1/5.
□
When the forcing is already a solution
Take y′ + 2y = e^(−2t). The homogeneous solutions are C·e^(−2t), so the forcing is one of them. The guess A·e^(−2t) gives −2A·e^(−2t) + 2A·e^(−2t) = 0, which no choice of A turns into e^(−2t). The formula 1/(a + b) fails too, since a + b = 2 − 2 = 0.
y_p = A·t·e^(−2t)
y_p′ = A·e^(−2t) − 2A·t·e^(−2t)
y_p′ + 2y_p = A·e^(−2t)
A = 1, y_p = t·e^(−2t)
Example · The factor of t is a repair, not a growthThe general solution is (t + C)·e^(−2t). With y(0) = 1 the constant is C = 1, and the solution (t + 1)·e^(−2t) still goes to zero, because the exponential falls faster than t rises.
The t is there so that the derivative can leave behind a term the left side does not cancel. It is a device for finding a solution, and it says nothing about whether the solution grows.
That leaves three shapes of guess for three shapes of forcing, and one test before substituting: does the forcing appear in the homogeneous solution C·e^(−a·t)? If it does, multiply by t. The lab's third preset is exactly this case, and its particular-solution tile prints the factor of t.