9. Undetermined coefficients¶
Variation of parameters is all that we need for linear first-order problems, but as we have seen in some examples, it requires a fair amount of grunt work–in particular, two integrals. There is an easier path in the important special case when
The growth/decay rate coefficient \(a(t)\) is constant, and
The forcing function \(f(t)\) is a polynomial, exponential, sin, or cos, or a combination of these.
In this situation, we go through the same work as before to get the homogeneous part \(x_h\), but a valid \(x_p\) can be found without integration.
The correct form of \(x_p\) for various manifestations of \(f\) are given in the table below. The capital letters are considered unknown constants that have to be determined by plugging \(x_p\) into the ODE. This is what gives the method its name, the method of undetermined coefficients.
\(f(t)\) |
\(x_p(t)\) |
---|---|
\(b_n t^n + \cdots b_0\) |
\(B_n t^n + \cdots + B_0\) |
\(e^{rt}(b_n t^n + \cdots b_0)\) |
\(e^{rt}(B_n t^n + \cdots B_0)\) |
\(\cos(\omega t)\) |
\(A \cos(\omega t) + B \sin(\omega t)\) |
\(\sin(\omega t)\) |
\(A \cos(\omega t) + B \sin(\omega t)\) |
Example
Find the general solution of \(x'-4x=8t\).
Solution
The homogeneous solution of \(x'-4x=0\) is \(x_h=c_1 e^{4t}\). The MUC table suggests that we choose \(x_p=B_1t + B_0\). Plugging this into the ODE yields
This must be an identity for all \(t\). Equating coefficients of like powers of \(t\) on the two sides leads to the system
whose solution is \(B_1=-2\), \(B_0=-1/2\). Hence the general solution is
This is the third time we have derived this solution!
Warning
As seen in the preceding example, the forcing function \(f(t)=8t\) caused us to introduce \(x_p(t) = B_1t + B_0\). We cannot assume that the constant term in \(x_p\) is absent like it is in \(f\), and indeed it is not in the final result.
Note
Although the results for \(B_1\) and \(B_0\) in the example are unique, there are different ways to derive them. For example, we could apply the identity \(B_1 - 4(B_1t + B_0) = 8t\) at \(t=0\) and \(t=1\) to conclude that \(B_1-4B_0=0\) and \(-3B_1-4B_0 =8\), which lead to the same result.
Example
Solve the IVP
Solution
We quickly see that the general solution of \(x'-x=0\) is \(x_h(t)=c_1e^t\). For the particular solution, MUC table suggests
Substitution into the ODE leads to
We could equate the coefficients of cos and sin to get a linear system. Or we can exploit the fact that this identity must be true at \(t=0\) and \(t=\pi/2\). The latter course gives us
This implies \(A=B=3\), and therefore
Finally, the initial condition yields
hence
The benefit of the MUC over our previous methods is avoiding a second integral that often requires integration by parts when \(f\) is a polynomial or trig function.
9.1. Additive forcing terms¶
If the forcing function includes multiple different types of functions added together, then you can find particular solutions for the different terms separately and add them together to get the overall particular solution.
Example
Find a particular solution of \(x'+3x=6t-4e^{-t}\).
Solution
We can separately find particular solutions for the cases \(x'+3x=6t\) and \(x'+3x=-4e^{-t}\).
In the first case we use \(x_p(t) = B_1t + B_0\), and it works out that \(B_1=2\), \(B_0=-2/3\). For the second case we choose \(x_p=A e^{-t}\) and plug in:
which tells us that \(A=-2\). Finally, a particular solution of the original equation is
9.2. Breakdown¶
The suggestions in the MUC table can fail if the forcing function includes the homogeneous solution \(e^{at}\).
Example
Consider \(x'-ax=e^{at}\). We get \(x_h=c_1e^{at}\), and the table suggests
Hence If we substitute it into the ODE, we get
or \(0=e^{at}\) for all \(t\), which is impossible. The failure stems from the fact that \(x_p\) is actually a solution of the homogeneous problem.
The example above is a failure of the method, not a statement about the existence of the solution. There are advanced rules for fixing the method of undetermined coefficients in this circumstance, but it’s simpler to fall back to variation of parameters than to muck around with them.