Keep in mind that there is a key pitfall to this method. Consider the differential equation
Based on the form of
we guess a particular solution of the form
But when we substitute this expression into the differential equation to find a value for
we run into a problem. We have
and
so we want
which is not possible.
Looking closely, we see that, in this case, the general solution to the complementary equation is
The exponential function in
is actually a solution to the complementary equation, so, as we just saw, all the terms on the left side of the equation cancel out. We can still use the method of undetermined coefficients in this case, but we have to alter our guess by multiplying it by
Using the new guess,
we have
and
Substitution gives
So,
and
This gives us the following general solution
Note that if
were also a solution to the complementary equation, we would have to multiply by
again, and we would try
Problem-solving strategy: method of undetermined coefficients
Solve the complementary equation and write down the general solution.
Based on the form of
make an initial guess for
Check whether any term in the guess for
is a solution to the complementary equation. If so, multiply the guess by
Repeat this step until there are no terms in
that solve the complementary equation.
Substitute
into the differential equation and equate like terms to find values for the unknown coefficients in
Add the general solution to the complementary equation and the particular solution you just found to obtain the general solution to the nonhomogeneous equation.
Solving nonhomogeneous equations
Find the general solutions to the following differential equations.
The complementary equation is
which has the general solution
(step 1). Based on the form of
our initial guess for the particular solution is
(step 2). None of the terms in
solve the complementary equation, so this is a valid guess (step 3).
Now we want to find values for
and
so substitute
into the differential equation. We have
so we want to find values of
and
such that
Therefore,
This gives
and
so
(step 4).
Putting everything together, we have the general solution
The complementary equation is
which has the general solution
(step 1). Based on the form
our initial guess for the particular solution is
(step 2). However, we see that this guess solves the complementary equation, so we must multiply by
which gives a new guess:
(step 3). Checking this new guess, we see that it, too, solves the complementary equation, so we must multiply by
t again, which gives
(step 3 again). Now, checking this guess, we see that
does not solve the complementary equation, so this is a valid guess (step 3 yet again).
We now want to find a value for
so we substitute
into the differential equation. We have
and
Substituting into the differential equation, we want to find a value of
so that
This gives
so
(step 4). Putting everything together, we have the general solution
The complementary equation is
which has the general solution
(step 1). Based on the form
our initial guess for the particular solution is
(step 2). None of the terms in
solve the complementary equation, so this is a valid guess (step 3). We now want to find values for
and
so we substitute
into the differential equation. We have
and
so we want to find values of
and
such that
Therefore,
This gives
and
so
(step 4). Putting everything together, we have the general solution
The complementary equation is
which has the general solution
(step 1). Based on the form
our initial guess for the particular solution is
(step 2). However, we see that the constant term in this guess solves the complementary equation, so we must multiply by
which gives a new guess:
(step 3). Checking this new guess, we see that none of the terms in
solve the complementary equation, so this is a valid guess (step 3 again). We now want to find values for
and
so we substitute
into the differential equation. We have
and
so we want to find values of
and
such that
Therefore,
This gives
and
so
(step 4). Putting everything together, we have the general solution