7. Undetermined coefficients¶
We now tackle the ODE
where \(f(t)\) is a nonzero forcing function. The first step is to find the general homogeneous solution \(x_h(t)\). To finish the problem we must find a particular solution \(x_p(t)\) in the forced case. The method of undetermined coefficients is the simplest strategy, when it is applicable: forcing in the form of a polynomial, exponential, or sin/cos.
The procedure is the same as for first-order problems. Using our earlier table, we make an educated guess at \(x_p\) with some unknown coefficients that are determined through substitution into (7.3).
Example
Find a particular solution of \(x'' +4x'+4x=8t^2\).
Solution
The correct form of \(x_p\) is a quadratic polynomial, i.e.,
Plugging that into the ODE yields
This has to be an identity for all \(t\). Matching like powers, we get a \(3\times 3\) linear system for the coefficients. Fortunately, it can be solved easily if we go in order: first we read off \(C=2\), then \(B=-2C=-4\), and finally \(A=-B-C/2=3\). This provides us with
Example
Find a particular solution of \(x'' - 2x'-3x=10e^{4t}\).
Solution
The proper choice is
Everything else is algebra.
From this it’s clear that \(A=2\).
Example
Find the general solution of \(x''+x'=\sin(2t)\).
Solution
The homogeneous problem \(x''+x'=0\) has roots \(0\) and \(-1\), hence
For the particular solution we must choose
Inserting this into the original ODE leads to
This is identically true for all time if and only if we match the coefficients of like trig functions:
The solution of these equations is \(A=-1/10\), \(B=-1/5\). Thus
The examples above are the fundamental ones. There are rules for more intricate combinations of the same functions, but we won’t go into them here.
We have to repeat the warning from the first time we saw this method: we have only used a subset of the complete rules, and thus occasionally it fails.
Example
The equation \(x''+x=\cos(\omega t)\) suggests the particular solution \(x_p(t)=A\cos(\omega t)+B\sin(\omega t)\). Upon substitution,
which leads to the conclusion that \(B=0\) and, if \(\omega^2 \neq 1\), \(A=1/(1-\omega^2)\). However, if \(\omega = 1\), the substitution would leave us with \(0=\cos(t)\), which is impossible to satisfy for all \(t\).
The failure of the example above at \(\omega = 1\) was due to the fact that the \(x_p\) we picked is actually a homogeneous solution. There are additional rules to cover this case, but we will resort to alternatives instead.
Example (continued)
Here is one interesting workaround. Since the method works for all \(\omega\neq 1\), we try taking a limiting value as \(\omega\to 1\).
That won’t work for the \(x_p\) above, but we can subtract a homogeneous solution and still have a particular solution:
Then L’Hôpital applies in the limit to give us
This is easy to verify as a particular solution for \(\omega=1\):
so that \(x_p''+x_p=\cos(t)\) as required.