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

  1. The growth/decay rate coefficient \(a(t)\) is constant, and

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

Table 9.1 Particular solutions for 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\).

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

\[ x' = x - 6 \sin(t), \quad x(\pi) = 0. \]

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}\).

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

\[x_p = B_0 e^{at}.\]

Hence If we substitute it into the ODE, we get

\[ (aB_0 e^{at}) - a(B_0e^{at}) = e^{at}, \]

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.