Learn
Lesson · First-Order Linear Equations · Forcing

Exponential and Sinusoidal Forcing

An exponential forcing is met by an exponential with the same exponent, a sine or cosine forcing by a combination of both with the same frequency, and the coefficients are fixed by matching. The sine and cosine always travel together, because each is the other's derivative. The one trap is a forcing e^(−a·t) that is itself a solution of the homogeneous equation; the left side then gives zero, and the guess needs a factor of t.

forcing e^(bt): try A·e^(bt), A = 1/(a + b) forcing cos(ωt): try A·cos(ωt) + B·sin(ωt) cos(ωt) terms, sin(ωt) terms: two equations b = −a is resonant: try A·t·e^(bt) a ≠ 0: the sinusoid never resonates
Three forms of guess, and the one trap

Core ideas

What this lesson establishes

Three ideas. Two of them say what to guess; the third says when the guess collapses and what to do.

1

An exponential comes back as itself

The derivative of e^(bt) is b·e^(bt), so the left side of y′ + a·y applied to A·e^(bt) is (b + a)·A·e^(bt). For forcing e^(bt) that gives A = 1/(a + b), and it is exact whenever a + b ≠ 0. The sum, not the difference, is what appears.

2

Sine and cosine come back as each other

The derivative of cos(ωt) is −ω·sin(ωt) and of sin(ωt) is ω·cos(ωt), so a guess with only a cosine produces a sine on the left that nothing on the right can match. The guess carries both, A·cos(ωt) + B·sin(ωt), and matching the cosine terms and the sine terms gives two equations in two unknowns.

3

Resonance is a guess the left side annihilates

If the forcing is e^(−a·t), the guess A·e^(−a·t) is a solution of the homogeneous equation, so the left side gives 0 and can never equal the forcing. The remedy is one more factor of t: A·t·e^(−a·t), whose derivative contributes the term that survives.

The material

Three guesses, the equations they give, and the case that fails

An exponential forcing and its proof, a cosine forcing and its two equations, the general result for a sinusoid, and the resonant case with its factor of t.

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 forcing

If 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 forcing

For 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 growth

The 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.

Interactive

First-order linear equations

μ, y_h, y_p and the constant, exactly

A first-order linear equationy′ + p(t)·y = q(t), solved symbolically
solutiony_py_hEuler's steps (exact)

Method

Choosing the form and fitting the coefficients

Read the shape of the forcing, test it against the homogeneous solution, write the guess, match, and check before fitting the constant.

1

Read the forcing's shape

A polynomial, an exponential e^(bt), or a sine or cosine of ω·t. Each has a standard guess with the same exponent or frequency.

2

Test it against the homogeneous solution

The homogeneous solution is C·e^(−a·t). If the forcing is e^(−a·t) itself, the guess gets a factor of t. A sinusoid never fails this test when a ≠ 0.

3

Write the guess with unknown coefficients

A·e^(bt), or A·cos(ωt) + B·sin(ωt), or A·t·e^(bt) in the resonant case. Always both a sine and a cosine, even if the forcing has only one.

4

Substitute and match like terms

Collect the cosine terms and the sine terms separately, or the coefficient of the one exponential, and set each equal to the forcing's. Solve the resulting equations exactly.

5

Check y_p alone, then fit C last

Substitute y_p into y′ + a·y and read the forcing back. Then add C·e^(−a·t) and use the initial value with y_p(t₀) already subtracted.

Forms, coefficients and the resonant case

Score 0 / 0

y′ + 2y = cos(t) with a cosine and a sine in the guess

The forcing is a cosine and a = 2, so the guess carries both a cosine and a sine. Matching gives two equations in two unknowns.

guess: y_p = A·cos(t) + B·sin(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 y_p = (2/5)·cos(t) + (1/5)·sin(t) check cos(t): 2·(2/5) + 1/5 = 1 check sin(t): 2·(1/5) − 2/5 = 0 fit y(0) = 0: 2/5 + C = 0, so C = −2/5

The solution is the sum of the oscillating particular part and the decaying homogeneous part −(2/5)·e^(−2t). The exponential is never zero, but it is soon smaller than the drawing can show, and what is left is the particular part: a steady oscillation at the frequency of the forcing, which no starting value can change.

For a rehearsal, take the third preset, y′ + 2y = e^(−2t). Check whether the forcing matches the homogeneous solution before writing any guess, then find the coefficient of t·e^(−2t) and the constant from y(0) = 1.

Common mistakes

1
Guessing A·cos(t) alone for a cosine forcingFor y′ + 2y = cos(t) the guess A·cos(t) gives −A·sin(t) + 2A·cos(t). The cosine terms need 2A = 1 and the sine terms need −A = 0, and no A does both: with A = 1/2 the residual is −(1/2)·sin(t). The derivative of a cosine is a sine, so the guess has to hold both.
2
Using 1/(a − b) instead of 1/(a + b)For y′ + 2y = e^t the slip gives A = 1/(2 − 1) = 1. Substituting e^t gives e^t + 2e^t = 3e^t, which is three times the forcing. The derivative contributes +b and the term a·y contributes +a, so they add: A = 1/3, as the lab prints.
3
Concluding there is no solution when the guess gives zeroFor y′ + 2y = e^(−2t) the guess A·e^(−2t) gives zero. That says the guess was wrong, not that the equation cannot be solved. The function t·e^(−2t) has derivative e^(−2t) − 2t·e^(−2t), and adding 2t·e^(−2t) leaves exactly e^(−2t): the residual is zero, and a solution exists.

Check your understanding

✓
Finish when you can write and fit the particular solution of y′ + a·y = q for an exponential or a sinusoidal q, including the resonant case.

You should be able to choose the guess from the shape of the forcing, decide by comparing with the homogeneous solution whether it needs a factor of t, write the matching equations for the cosine and sine terms or for the single exponential, solve them as exact fractions, and check the result by substitution.

Note: With polynomials, exponentials and sinusoids the method now covers every forcing that the lab accepts. What to do with it is the next lesson, and the equations are not abstract ones: a capacitor charging, a tank being flushed and a loan being repaid are each the same equation with their own letters, and the constant forcing makes the particular solution the steady state.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.