Forced Harmonic Oscillators
Consider a non-homogeneous equation:
d 2y dy
+p + qy = g (t) (N)
dt 2 dt
where g (t) may represent an external forcing term.
General Solution of (N)
1. Solve the associated homogeneous equation:
d 2y dy
+p + qy = 0 (H)
dt 2 dt
Let the general solution be k1 y1 (t) + k2 y2 (t).
2. Find a particular solution yp (t) of (N) (usually by guessing).
3. Combine:
y (t) = k1 y1 (t) + k2 y2 (t) + yp (t)
by the extended linearity principle.
1 / 11
Method of Undetermined Coefficients
To find yp (t):
1. Make a reasonable guess based on the form of g (t), with
undetermined coefficients.
2. Substitute into (N) and solve for those coefficients.
Example: y 00 + 4y 0 + 13y = e −t
Homogeneous solution:
yh (t) = k1 e −2t cos 3t + k2 e −2t sin 3t.
Guess yp (t) = ce −t . Substituting:
(ce −t )00 + 4(ce −t )0 + 13(ce −t ) = e −t
1
c − 4c + 13c = 1 ⇒ c= 10 .
Thus:
1 −t
y (t) = k1 e −2t cos 3t + k2 e −2t sin 3t + e .
10
2 / 11
When the First Guess Fails
Consider:
y 00 + 4y 0 + 3y = e −t .
Guess yp (t) = ce −t :
c − 4c + 3c = 0,
which fails since e −t solves the homogeneous equation.
Instead, multiply by t:
yp (t) = cte −t .
Substitute:
(cte −t )00 + 4(cte −t )0 + 3(cte −t ) = 2ce −t = e −t ,
so c = 21 . Therefore:
1 −t
yp (t) = te .
2
3 / 11
Sinusoidal Forcing
Consider:
y 00 + py 0 + qy = g (t),
where g (t) is sin or cos.
Example: y 00 + 2y 0 + 2y = cos t
Guess:
yp (t) = a sin t + b cos t.
Substitute:
(−a sin t − b cos t) + 2(a cos t − b sin t) + 2(a sin t + b cos t)
= (a − 2b) sin t + (2a + b) cos t = cos t.
This gives a − 2b = 0, 2a + b = 1, hence a = 52 , b = 15 .
4 / 11
Combining Solutions
From the previous example:
2 1
yp (t) = sin t + cos t.
5 5
Homogeneous solution:
yh (t) = k1 e −t sin t + k2 e −t cos t.
General solution:
2 1
y (t) = k1 e −t sin t + k2 e −t cos t + sin t + cos t.
5 5
As t → ∞, y (t) → yp (t) (steady-state response).
5 / 11
Guessing Guidelines for yp (t)
For y 00 + py 0 + qy = g (t):
g (t) Guess yp (t)
1 c
t c1 + c2 t
t2 c1 + c2 t + c3 t 2
e at ce at or cte at
sin at c1 sin at + c2 cos at
cos at c1 sin at + c2 cos at
6 / 11
Exercise
Consider:
y 00 + 2y 0 + y = 2 cos 2t.
1. Find the homogeneous solution.
2. Find a particular solution and hence the general solution.
3. Describe the long-term behavior.
4. Solve the IVP y (0) = y 0 (0) = 0.
7 / 11
Solution
1. Homogeneous: yh (t) = k1 e −t + k2 te −t .
6 8
2. Particular: yp (t) = − 25 cos 2t + 25 sin 2t. General:
−t −t 6 8
y (t) = k1 e + k2 te − 25 cos 2t + 25 sin 2t.
6 8
3. Long-term: y (t) → − 25 cos 2t + 25 sin 2t as t → ∞.
6 16 6
4. IVP: k1 − 25 = 0, −k1 + k2 + 25 = 0. Solution: k1 = 25 , k2 = − 52 .
8 / 11
Superposition Principle
If y1 (t) solves
y 00 + py 0 + qy = g (t),
and y2 (t) solves
y 00 + py 0 + qy = h(t),
then y1 (t) + y2 (t) solves
y 00 + py 0 + qy = g (t) + h(t).
9 / 11
Exercise
1. Find the general solution:
y 00 + 5y 0 + 6y = e −t + 4.
2. Solve:
y 00 + 4y = t + e −t , y (0) = y 0 (0) = 0.
10 / 11
Solutions to Exercises
1. y 00 + 5y 0 + 6y = e −t + 4 Homogeneous: yh = k1 e −2t + k2 e −3t .
Particular: yp1 = Ae −t gives A = 12 . yp2 = B (constant) gives
6B = 4 ⇒ B = 23 . General solution:
1 2
y (t) = k1 e −2t + k2 e −3t + e −t + .
2 3
2. y 00 + 4y = t + e −t , y (0) = 0, y 0 (0) = 0 Homogeneous:
yh = c1 cos 2t + c2 sin 2t. Particular for t: yp1 = at + b, substituting
gives a = 41 , b = 0. Particular for e −t : yp2 = Ae −t , substituting gives
A = 15 . General:
1 1
y (t) = c1 cos 2t + c2 sin 2t + t + e −t .
4 5
From y (0) = 0: c1 + 15 = 0 ⇒ c1 = − 15 . From y 0 (0) = 0:
2c2 + 41 − 15 = 0 ⇒ c2 = − 40
1
. Final solution:
1 1 1 1
y (t) = − cos 2t − sin 2t + t + e −t .
5 40 4 5
11 / 11