In this section we find solutions to inhomogeneous linear differential equations, such as the second order equation

where is thought of as a forcing term. To find all solutions to the inhomogeneous equation (??), we need to find just one solution to (??) and then add to that solution all solutions to the homogeneous equation — which we know how to solve. If the forcing term is sufficiently nice, then there is an elegant way to solve (??) called the method of undetermined coefficients.
An Illustrative Example

Consider the differential equation

To solve (??) we must find one solution to the inhomogeneous equation and add to that particular solution the general solution of the homogeneous equation.

The general solution to the homogeneous equation is easily found using the techniques of Section ??. That is, the characteristic polynomial of the homogeneous equation is So the roots of are and . It follows that the general solution to the homogeneous equation is:

Therefore, to solve (??) in general we must find just one solution to (??). Can we guess the answer? The answer is yes in this case. Since differentiation just lowers the degree of a polynomial, we can guess that there is a particular solution to (??) that is a polynomial of degree one, that is, has the form for constants and . If we substitute into the left hand side of (??), we obtain Since we want the result of this differentiation to be , we must choose and to solve the linear equations The solution to this linear system is and . Therefore, we get a particular solution to (??), namely, . It follows that the general solution to (??) is:

Why did the guess work?

What lies at the heart of undetermined coefficients is having a method for choosing a subspace of functions in which a particular solution resides. We call this subspace the trial space. In example (??) the trial space is the two dimensional subspace

The idea behind finding a trial subspace is the elimination of the inhomogeneity in (??) using the fact that is itself a solution to some homogeneous differential equation. In example (??), satisfies the differential equation It follows that any solution of (??) has to satisfy

The characteristic polynomial of the homogeneous equation (??) is: and its zeros are Hence, the general solution of (??) is

Since we want to find a particular solution of the inhomogeneous equation, we need not consider terms that are solutions of the homogeneous equation. That is, we can set and try to find a solution of the form which explains more precisely why our guess of a trial space worked.

The Method of Undetermined Coefficients

The method used in the previous example works for many differential equations. We use the notation for linear differential operators developed in Section ?? to discuss how the previous example generalizes to a large family of equations. In fact, we can find a particular solution of the order inhomogeneous differential equation

where is sufficiently differentiable and as follows. We divide the process into three steps.

Step 1. Find an annihilator of . Find a linear differential operator such that

This differential operator is called the annihilator of .

Remark: When is a linear combination of functions it is often simpler to solve a separate equation for each function in the linear combination, as discussed in Lemma ??.

It follows that if is a solution to the inhomogeneous equation (??), then is also a solution to the homogeneous equation

Note that the roots of the characteristic polynomial for (??) are just the union of the roots of and the roots of .

We could take the trial space to be the space of solutions to (??); but, in general, that space is too large, as it contains all solutions to the homogeneous equation .

Step 2: Find the trial space. Compute the general solution to (??) and set to zero coefficients of solutions of the original homogeneous equation , obtaining a subspace of trial functions Note that if and have no roots in common, then the trial space is precisely the general solution of equation (??). If and have common roots, then the situation is more complicated. See (??) for an example.

Step 3: Find the particular solution. Substitute the trial function into (??) and find constants so that is a particular solution to (??).

When Undetermined Coefficients Works

In fact, it is not always possible to satisfy Step 1. In Step 1 we may not be able to find a constant coefficient homogeneous linear differential equation that has as a solution. However, Theorem ?? shows that all functions that are linear combination of the functions for , are solutions to some homogeneous linear differential equation (perhaps of high order). So we can use undetermined coefficients to find particular solutions for a large class of possible forcing terms . And when this method can be used, it is relatively straightforward to implement.

A Second Example

Consider the differential equation

The characteristic polynomial of (??) is ; the associated eigenvalues are .

Step 1. The function is a solution to the differential equation

So the differential operator is an annihilator of .

Step 2. The roots of are and they are distinct from those of . Hence the general solution of (??),

is the trial space in which to look for a particular solution of (??).

Step 3. Substituting (??) into (??) yields

That is, Hence we have found a particular solution when the coefficients and satisfy
The solution of this system is Thus, is a particular solution of (??).
A Third Example Using Superposition

Find a particular solution of the differential equation

The characteristic polynomial of the homogeneous equation associated with (??) is and the roots are (approximately) . This (numerical) information is found using MATLAB by typing roots([1 0 -1 2]), obtaining
ans =
 
  -1.5214  
   0.7607 + 0.8579i  
   0.7607 - 0.8579i

Using Lemma ?? we can find a particular solution to (??) by adding together solutions to

The solution to (??) is found by inspection — the annihilator of is just , and the trial space consists of the constants. By inspection, the answer is

To solve (??) for we proceed with the three steps associated with undetermined coefficients.

Step 1. The right hand side of (??), , is a solution of the linear differential equation whose characteristic polynomial has roots . Thus, an annihilator for is:

To verify this point, observe that the characteristic polynomial of (??) is which has roots .

Step 2. Since the roots of and are disjoint sets, the trial space is the general solution of (??), namely, We look for a particular solution to (??) in this function subspace.

Step 3. We compute

Substituting into (??) leads to Hence , satisfy
The solution is and , and the particular solution to (??) is
An Example where and have Common Roots

Consider the first order differential equation

The characteristic polynomial of the homogeneous equation is whose root is . An annihilator of is . Hence also has the root . Thus to solve this differential equation by undetermined coefficients we apply to both sides of the equation, obtaining Since is a double root for the characteristic polynomial of this equation, the general solution is: Setting to zero the solution to the original homogeneous equation (that is, setting ), we find that the trial space for the inhomogeneous equation (??) is Substituting into (??) yields It follows that and that is a particular solution. The general solution to (??) is:

Exercises

In Exercises ?? – ?? find annihilators for each of the given functions.

.
.
.
.

In Exercises ?? – ?? use the method of undetermined coefficients to find particular solutions to the given differential equations.

.
.
.
.
.
.
.

In Exercises ?? – ?? solve the given initial value problems.

where .
where .
where .
where .