# The method of undetermined coefficients

This method is more limited in scope; it applies only to the special case of (2), where p(t) is a constant and g(t) has some special form. The advantage of the method is that it does not require any integrations and is therefore quick to use. The homogeneous equation

has the solution

To solve the inhomogeneous equation

it suffices to find one particular solution yp(t). If yp(t) is any particular solution, then the general solution is

The idea behind the method of undetermined coefficients is to look for yp(t) which is of a form like that of g(t). This is possible only for special functions g(t), but these special cases arise quite frequently in applications.

We look for y(t) in a similar form

So the differential equation becomes

We can solve this to find . This leads to the particular solution

and the general solution
 (3)

Example: Find the general solution of the equation

y'+2y=et.

The solution of the homogeneous equation is , and we look for a particular solution in the form yp=aet. Setting y=aet in the equation, we find

aet+2aet=et,

leading to a=1/3. The general solution is

Why did this work? The idea is simply that if y is an exponential, then so is y', and so if both y and g are exponentials, then all terms in the equation are exponentials and we can hope to obtain a solution by setting coefficients equal to each other.

There are some other classes of functions for which this works. For instance, if y is a polynomial of degree n, then y' is a polynomial of degree n-1. If g is a polynomial, we can therefore look for polynomial solutions. Consider

y'+2y=t2.

The right hand side is a polynomial of degree 2, so we look for a solution in the same form y=at2+bt+c. This leads to y'=2at+b, and

y'+2y=2at2+(2a+2b)t+b+2c=t2.

To satisfy this, we want to set

This leads to a=1/2, b=-1/2, c=1/4. So a particular solution is

The general solution is

We note that the solution (3) breaks down if , since it would involve a division by zero. More generally, if the equation reads

and , with Pn(t) an nth degree polynomial, then we can find a particular solution , where Qn(t) is some other nth degree polynomial as long as .In the two examples above, we had and , ,respectively, so . If, on the other hand, , we have to modify the procedure. The modification is simply to include an extra factor t in the solution. That is, instead of setting , you set .

Examples:

1.

y'+2y=te-2t.

Here and , so . The right hand side is a first degree polynomial times e-2t. So we look for a solution of the form

y=te-2t(at+b)=e-2t(at2+bt).

We find

y'=e-2t(-2at2+(2a-2b)t+b),

so that

y'+2y=e-2t(2at+b)=te-2t.

We compare coefficients to find a=1/2, b=0. The general solution of the equation is

2.

y'+2y=tet.

In this case and , so , and we do not need the extra factor t. So we look for a solution of the form

y=et(at+b).

y'+2y=et(3at+3b+a)=tet,

so we need

leading to a=1/3, b=-1/9. The general solution is

3.

y'=t.

In this case , and the right hand side is a first degree polynomial, so we look for a particular solution of the form y=t(at+b)=at2 +bt. We find

y'=2at+b=t,

leading to a=1/2, b=0. The general solution is