Section 13.2 The Method of Undetermined Coefficients
We return now to the problem of finding solutions to non-homogeneous second order linear DEs with constant coefficients, i.e. to DEs of the form
Since we don't have any alternative method (such as using an integrating factor) for finding a solution to this class of DE we are forced to use the method suggested by the previous section.
Definition 13.2.1.
The general solution to the non-homogeneous second order linear DE with constant coefficients
is
where \(y_c(x)\text{,}\) the complementary solution, is the general solution to the associated homogeneous DE
and \(y_p(x)\) is any particular solution to non-homogeneous DE.
It is easy to show that \(y(x)=y_c(x)+y_p(x)\) is a solution to the non-homogeneous DE but how do we know that we have found all such solutions, i.e. that we have found the general solution? (After all, \(y_p(x)\) is just one particular solution.) Let \(\phi(x)\) be any solution to the DE
Then the function \(g(x)=\phi(x)-y_p(x)\) is a solution to the homogeneous DE
since
Now since \(y_c(x)\) is the general solution to the homogeneous DE, \(g(x)\) must be one of the solutions in \(y_c(x)\text{.}\) Thus \(\phi(x)=g(x)+y_p(x)\) must be one of the solutions in \(y(x)=y_c(x)+y_p(x)\text{,}\) or to put it the other way, \(y(x)=y_c(x)+y_p(x)\) contains all solutions to the non-homogeneous DE.
Thus to solve a non-homogeneous second order DE with constant coefficients we have to first find the complementary solution, then find any particular solution and then add these solutions together. We already know how to find the complementary solution (see Chapter 12) so all that remains is to work out how to find a particular solution, \(y_p\text{.}\) The method of undetermined coefficients tries to find \(y_p\) by guessing that the form that \(y_p\) should take is a linear combination of the non-homogeneous term, \(f(x)\text{,}\) and its derivatives.
Example 13.2.2.
Find a particular solution to the DE
\(y_p(x)=-\dfrac{4}{3}x^2-\dfrac{16}{9}x-\dfrac{56}{27}\)
Here the non-homogeneous term is \(f(x)=4x^2\text{.}\) This is a 2nd degree polynomial. The first and second derivatives of this will be a linear polynomial and a constant respectively. Thus we guess that a particular solution can found of the form
where \(A\text{,}\) \(B\) and \(C\) are coefficients to be determined by substituting into the DE. Now, from (13.2.1)
Substituting into the DE gives
Thus for \(y_p\) to be a solution
Solving these equations gives
Thus a particular solution to the DE is
The method of undetermined coefficients is only useful for finding the particular solution when the non-homogeneous term is fairly simple. Table 13.2.3 gives a guide to the form of the particular solution, \(y_p\text{,}\) to try for various non-homogeneous terms \(f\text{.}\)
Non-Homogenous Term
Form of Particular Solution
\(f(x)=ae^{kx}\)
\(y_p(x)=Ce^{kx}\)
\(f(x)=a\sin(kx)\)
\(y_p(x)=C_1\sin(kx)+C_2\cos(kx)\)
\(f(x)=a\cos(kx)\)
\(y_p(x)=C_1\sin(kx)+C_2\cos(kx)\)
\(f(x)=\sum_{i=0}^{n} a_{n-i}x^{n-i}\)
\(y_p(x)=\sum_{i=0}^{n} C_{n-i}x^{n-i}\)
\(f(x)\)
\(y_p(x)\) is a linear combination of \(f(x)\) and its derivatives, i.e. \(y_p(x)=\sum_{k=0} C_kf^{(k)}(x)\)
Example 13.2.4.
Find the general solution to
\(x(t)=Ae^{-2t}+Be^{-4t}+\dfrac{1}{5}\sin(2t)-\dfrac{3}{5}\cos(2t)\)
The first step is to find the general solution to the homogeneous DE
The characteristic equation for this DE is
which has solutions
Thus the complementary solution is
The next step is to find a particular solution to the non-homogeneous DE. Using the method of undetermined coefficients we try a particular solution of the form
where \(C_1\) and \(C_2\) are the coefficients to be determined. Now
For \(x_p(t)\) to be a solution
and so, on substituting
which simplifies to
Equating coefficients on each side of the equation gives
Solving these equations gives
and so a particular solution is
Combining the particular solution with the complementary solution gives the general solution
Example 13.2.5.
Solve the initial-value problem
\(y(x)=e^{-3x}+\dfrac{1}{2}e^{2x}-\dfrac{1}{2}\)
To solve the initial-value problem we have to begin by finding the general solution to the DE. Since this DE is a non-homogeneous second order DE with constant coefficients we have to first find the general solution to the associated homogeneous DE
The characteristic equation for this DE is
which has solutions
Thus the complementary solution is
For the particular solution try a function of the form
Then
For this to be a solution
and so
On equating coefficients on both sides of this equation
Combining the complementary solution and this particular solution gives the general solution as
On using the initial condition \(y(0)=1\) we find
Since
on using the initial condition \(y'(0)=2\) we find
Thus \(A=-\frac{1}{2}, B=1\) and the solution to the initial-value problem is
If the non-homogeneous term \(f\) is itself a solution to the associated homogeneous DE then the form that we guess for the particular solution has to change. Guided by our experience from non-homogeneous first order constant coefficient DEs (see Example 13.1.3) what we try for the particular solution is to multiply the usual form by \(x\) (or \(x^2\text{,}\) \(x^3\) etc. if necessary) so that no term in the particular solution is itself a solution to the homogeneous DE.
Example 13.2.6.
Find the general solution to
\(u(t)=Ae^t+Be^{-2t}+\dfrac{1}{3}te^t\)
The general solution to the associated homogeneous DE, i.e.
is the complementary solution to the given DE. Thus
We can see here that the non-homogeneous term \(f(x)=e^x\) is a solution to the homogeneous DE (put \(A=1\) and \(B=0\) into \(u_c(t)\)). Obviously then, trying a particular solution of the form
will not work. Thus we try instead a solution of the form
For this function, using the product rule
and
Substituting into the DE gives
Notice that the \(te^t\) terms will cancel out and so on equating the coefficients of the \(e^t\) terms gives
Thus, a particular solution is
and hence the general solution is
Example 13.2.7.
Solve the initial-value problem
\(y(x)=3-2e^{-x}+\dfrac{1}{2}x^2-x\)
The associated homogeneous DE is
Thus the complementary solution is
Since the non-homogeneous term is \(f(x)=x\) the usual form that we would try for the particular solution would be
However this contains a constant term and we can see from the complementary solution (put \(A=0\)) that a constant will satisfy the homogeneous DE. Thus the constant term in the particular solution will not work and we must modify the particular solution. So instead try a particular solution of the form
Thus
Substituting into the DE gives
Equating coefficients yields
and hence
Thus, a particular solution is
and hence the general solution is
To solve the initial-value problem we need the derivative of \(y\) which is
Using \(y(0)=1\)
Using \(y'(0)=1\)
Thus
and the solution is
Exercises Example Tasks
1.
Find the general solution to the DE
2.
Find the general solution to the DE
3.
Solve the initial value problem
4.
Find the general solution to the DE