*i.e.*you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.

### Section 3-9 : Undetermined Coefficients

In this section we will take a look at the first method that can be used to find a particular solution to a nonhomogeneous differential equation.

\[y'' + p\left( t \right)y' + q\left( t \right)y = g\left( t \right)\]One of the main advantages of this method is that it reduces the problem down to an algebra problem. The algebra can get messy on occasion, but for most of the problems it will not be terribly difficult. Another nice thing about this method is that the complementary solution will not be explicitly required, although as we will see knowledge of the complementary solution will be needed in some cases and so we’ll generally find that as well.

There are two disadvantages to this method. First, it will only work for a fairly small class of \(g(t)\)’s. The class of \(g(t)\)’s for which the method works, does include some of the more common functions, however, there are many functions out there for which undetermined coefficients simply won’t work. Second, it is generally only useful for constant coefficient differential equations.

The method is quite simple. All that we need to do is look at \(g(t)\) and make a guess as to the form of \(Y_{P}(t)\) leaving the coefficient(s) undetermined (and hence the name of the method). Plug the guess into the differential equation and see if we can determine values of the coefficients. If we can determine values for the coefficients then we guessed correctly, if we can’t find values for the coefficients then we guessed incorrectly.

It’s usually easier to see this method in action rather than to try and describe it, so let’s jump into some examples.

The point here is to find a particular solution, however the first thing that we’re going to do is find the complementary solution to this differential equation. Recall that the complementary solution comes from solving,

\[y'' - 4y' - 12y = 0\]The characteristic equation for this differential equation and its roots are.

\[{r^2} - 4r - 12 = \left( {r - 6} \right)\left( {r + 2} \right) = 0\hspace{0.25in} \Rightarrow \hspace{0.25in}\,\,{r_1} = - 2,\,\,\,\,{r_2} = 6\]The complementary solution is then,

\[{y_c}\left( t \right) = {c_1}{{\bf{e}}^{ - 2t}} + {c_2}{{\bf{e}}^{6t}}\]At this point the reason for doing this first will not be apparent, however we want you in the habit of finding it before we start the work to find a particular solution. Eventually, as we’ll see, having the complementary solution in hand will be helpful and so it’s best to be in the habit of finding it first prior to doing the work for undetermined coefficients.

Now, let’s proceed with finding a particular solution. As mentioned prior to the start of this example we need to make a guess as to the form of a particular solution to this differential equation. Since \(g(t)\) is an exponential and we know that exponentials never just appear or disappear in the differentiation process it seems that a likely form of the particular solution would be

\[{Y_P}\left( t \right) = A{{\bf{e}}^{5t}}\]Now, all that we need to do is do a couple of derivatives, plug this into the differential equation and see if we can determine what \(A\) needs to be.

Plugging into the differential equation gives

\[\begin{align*}25A{{\bf{e}}^{5t}} - 4\left( {5A{{\bf{e}}^{5t}}} \right) - 12\left( {A{{\bf{e}}^{5t}}} \right) & = 3{{\bf{e}}^{5t}}\\ - 7A{{\bf{e}}^{5t}} & = 3{{\bf{e}}^{5t}}\end{align*}\]So, in order for our guess to be a solution we will need to choose \(A\) so that the coefficients of the exponentials on either side of the equal sign are the same. In other words we need to choose \(A\) so that,

\[ - 7A = 3\hspace{0.25in} \Rightarrow \hspace{0.25in}A = - \frac{3}{7}\]Okay, we found a value for the coefficient. This means that we guessed correctly. A particular solution to the differential equation is then,

\[{Y_P}\left( t \right) = - \frac{3}{7}{{\bf{e}}^{5t}}\]Before proceeding any further let’s again note that we started off the solution above by finding the complementary solution. This is not technically part the method of Undetermined Coefficients however, as we’ll eventually see, having this in hand before we make our guess for the particular solution can save us a lot of work and/or headache. Finding the complementary solution first is simply a good habit to have so we’ll try to get you in the habit over the course of the next few examples. At this point do not worry about why it is a good habit. We’ll eventually see why it is a good habit.

Now, back to the work at hand. Notice in the last example that we kept saying “a” particular solution, not “the” particular solution. This is because there are other possibilities out there for the particular solution we’ve just managed to find one of them. Any of them will work when it comes to writing down the general solution to the differential equation.

Speaking of which… This section is devoted to finding particular solutions and most of the examples will be finding only the particular solution. However, we should do at least one full blown IVP to make sure that we can say that we’ve done one.

We know that the general solution will be of the form,

\[y\left( t \right) = {y_c}\left( t \right) + {Y_P}\left( t \right)\]and we already have both the complementary and particular solution from the first example so we don’t really need to do any extra work for this problem.

One of the more common mistakes in these problems is to find the complementary solution and then, because we’re probably in the habit of doing it, apply the initial conditions to the complementary solution to find the constants. This however, is incorrect. The complementary solution is only the solution to the homogeneous differential equation and we are after a solution to the nonhomogeneous differential equation and the initial conditions must satisfy that solution instead of the complementary solution.

So, we need the general solution to the nonhomogeneous differential equation. Taking the complementary solution and the particular solution that we found in the previous example we get the following for a general solution and its derivative.

\[\begin{align*}y\left( t \right) & = {c_1}{{\bf{e}}^{ - 2t}} + {c_2}{{\bf{e}}^{6t}} - \frac{3}{7}{{\bf{e}}^{5t}}\\ y'\left( t \right) & = - 2{c_1}{{\bf{e}}^{ - 2t}} + 6{c_2}{{\bf{e}}^{6t}} - \frac{{15}}{7}{{\bf{e}}^{5t}}\end{align*}\]Now, apply the initial conditions to these.

\[\begin{align*}\frac{{18}}{7} = y\left( 0 \right) & = {c_1} + {c_2} - \frac{3}{7}\\ - \frac{1}{7} = y'\left( 0 \right) & = - 2{c_1} + 6{c_2} - \frac{{15}}{7}\end{align*}\]Solving this system gives \(c_{1} = 2\) and \(c_{2} = 1\). The actual solution is then.

\[y\left( t \right) = 2{{\bf{e}}^{ - 2t}} + {{\bf{e}}^{6t}} - \frac{3}{7}{{\bf{e}}^{5t}}\]This will be the only IVP in this section so don’t forget how these are done for nonhomogeneous differential equations!

Let’s take a look at another example that will give the second type of \(g(t)\) for which undetermined coefficients will work.

Again, let’s note that we should probably find the complementary solution before we proceed onto the guess for a particular solution. However, because the homogeneous differential equation for this example is the same as that for the first example we won’t bother with that here.

Now, let’s take our experience from the first example and apply that here. The first example had an exponential function in the \(g(t)\) and our guess was an exponential. This differential equation has a sine so let’s try the following guess for the particular solution.

\[{Y_P}\left( t \right) = A\sin \left( {2t} \right)\]Differentiating and plugging into the differential equation gives,

\[ - 4A\sin \left( {2t} \right) - 4\left( {2A\cos \left( {2t} \right)} \right) - 12\left( {A\sin \left( {2t} \right)} \right) = \sin \left( {2t} \right)\]Collecting like terms yields

\[ - 16A\sin \left( {2t} \right) - 8A\cos \left( {2t} \right) = \sin \left( {2t} \right)\]We need to pick \(A\) so that we get the same function on both sides of the equal sign. This means that the coefficients of the sines and cosines must be equal. Or,

\[\begin{align*}& \cos \left( {2t} \right)\,: & - 8A & = 0\hspace{0.25in} \Rightarrow \hspace{0.25in}A = 0\\ & \sin \left( {2t} \right)\,:& - 16A & = 1\hspace{0.25in} \Rightarrow \hspace{0.25in}A = - \frac{1}{{16}}\end{align*}\]Notice two things. First, since there is no cosine on the right hand side this means that the coefficient must be zero on that side. More importantly we have a serious problem here. In order for the cosine to drop out, as it must in order for the guess to satisfy the differential equation, we need to set \(A = 0\), but if \(A = 0\), the sine will also drop out and that can’t happen. Likewise, choosing \(A\) to keep the sine around will also keep the cosine around.

What this means is that our initial guess was wrong. If we get multiple values of the same constant or are unable to find the value of a constant then we have guessed wrong.

One of the nicer aspects of this method is that when we guess wrong our work will often suggest a fix. In this case the problem was the cosine that cropped up. So, to counter this let’s add a cosine to our guess. Our new guess is

\[{Y_P}\left( t \right) = A\cos \left( {2t} \right) + B\sin \left( {2t} \right)\]Plugging this into the differential equation and collecting like terms gives,

\[\begin{align*} - 4A\cos \left( {2t} \right) - 4B\sin \left( {2t} \right) - 4\left( { - 2A\sin \left( {2t} \right) + 2B\cos \left( {2t} \right)} \right) - \\ 12\left( {A\cos \left( {2t} \right) + B\sin \left( {2t} \right)} \right) & = \sin \left( {2t} \right)\\ \left( { - 4A - 8B - 12A} \right)\cos \left( {2t} \right) + \left( { - 4B + 8A - 12B} \right)\sin \left( {2t} \right) & = \sin \left( {2t} \right)\\ \left( { - 16A - 8B} \right)\cos \left( {2t} \right) + \left( {8A - 16B} \right)\sin \left( {2t} \right) & = \sin \left( {2t} \right)\end{align*}\]Now, set the coefficients equal

\[\begin{align*} & \cos \left( {2t} \right)\,: &- 16A - 8B & = 0\\ & \sin \left( {2t} \right)\,: & 8A - 16B & = 1\end{align*}\]Solving this system gives us

\[A = \frac{1}{{40}}\hspace{0.25in}\hspace{0.25in}B = - \frac{1}{{20}}\]We found constants and this time we guessed correctly. A particular solution to the differential equation is then,

\[{Y_P}\left( t \right) = \frac{1}{{40}}\cos \left( {2t} \right) - \frac{1}{{20}}\sin \left( {2t} \right)\]Notice that if we had had a cosine instead of a sine in the last example then our guess would have been the same. In fact, if both a sine and a cosine had shown up we will see that the same guess will also work.

Let’s take a look at the third and final type of basic \(g(t)\) that we can have. There are other types of \(g(t)\) that we can have, but as we will see they will all come back to two types that we’ve already done as well as the next one.

Once, again we will generally want the complementary solution in hand first, but again we’re working with the same homogeneous differential equation (you’ll eventually see why we keep working with the same homogeneous problem) so we’ll again just refer to the first example.

For this example, \(g(t)\) is a cubic polynomial. For this we will need the following guess for the particular solution.

\[{Y_P}\left( t \right) = A{t^3} + B{t^2} + Ct + D\]Notice that even though \(g(t)\) doesn’t have a \({t^2}\) in it our guess will still need one! So, differentiate and plug into the differential equation.

\[\begin{align*}6At + 2B - 4\left( {3A{t^2} + 2Bt + C} \right) - 12\left( {A{t^3} + B{t^2} + Ct + D} \right) & = 2{t^3} - t + 3\\ - 12A{t^3} + \left( { - 12A - 12B} \right){t^2} + \left( {6A - 8B - 12C} \right)t + 2B - 4C - 12D & = 2{t^3} - t + 3\end{align*}\]Now, as we’ve done in the previous examples we will need the coefficients of the terms on both sides of the equal sign to be the same so set coefficients equal and solve.

\[\begin{align*} & {t^3}\,: & - 12A & = 2 & \Rightarrow \hspace{0.25in}A & = - \frac{1}{6}\\ & {t^2}\,: & - 12A - 12B & = 0 & \Rightarrow \hspace{0.25in}B & = \frac{1}{6}\\ & {t^1}\,: & 6A - 8B - 12C & = - 1 & \Rightarrow \hspace{0.25in}C & = - \frac{1}{9}\\ & {t^0}\,: & 2B - 4C - 12D & = 3 & \Rightarrow \hspace{0.25in}D & = - \frac{5}{{27}}\end{align*}\]Notice that in this case it was very easy to solve for the constants. The first equation gave \(A\). Then once we knew \(A\) the second equation gave \(B\), *etc*. A particular solution for this differential equation is then

Now that we’ve gone over the three basic kinds of functions that we can use undetermined coefficients on let’s summarize.

\(g(t)\) | \(Y_{P}(t)\) guess |
---|---|

\(a{{\bf{e}}^{\beta t}}\) | \(A{{\bf{e}}^{\beta t}}\) |

\(a\cos \left( {\beta t} \right)\) | \(A\cos \left( {\beta t} \right) + B\sin \left( {\beta t} \right)\) |

\(b\sin \left( {\beta t} \right)\) | \(A\cos \left( {\beta t} \right) + B\sin \left( {\beta t} \right)\) |

\(a\cos \left( {\beta t} \right) + b\sin \left( {\beta t} \right)\) | \(A\cos \left( {\beta t} \right) + B\sin \left( {\beta t} \right)\) |

\(n^{\mbox{th}}\) degree polynomial | \({A_n}{t^n} + {A_{n - 1}}{t^{n - 1}} + \cdots {A_1}t + {A_0}\) |

Notice that there are really only three kinds of functions given above. If you think about it the single cosine and single sine functions are really special cases of the case where both the sine and cosine are present. Also, we have not yet justified the guess for the case where both a sine and a cosine show up. We will justify this later.

We now need move on to some more complicated functions. The more complicated functions arise by taking products and sums of the basic kinds of functions. Let’s first look at products.

You’re probably getting tired of the opening comment, but again finding the complementary solution first really a good idea but again we’ve already done the work in the first example so we won’t do it again here. We promise that eventually you’ll see why we keep using the same homogeneous problem and why we say it’s a good idea to have the complementary solution in hand first. At this point all we’re trying to do is reinforce the habit of finding the complementary solution first.

Okay, let’s start off by writing down the guesses for the individual pieces of the function. The guess for the \(t\) would be

\[At + B\]while the guess for the exponential would be

\[C{{\bf{e}}^{4t}}\]Now, since we’ve got a product of two functions it seems like taking a product of the guesses for the individual pieces might work. Doing this would give

\[C{{\bf{e}}^{4t}}\left( {At + B} \right)\]However, we will have problems with this. As we will see, when we plug our guess into the differential equation we will only get two equations out of this. The problem is that with this guess we’ve got three unknown constants. With only two equations we won’t be able to solve for all the constants.

This is easy to fix however. Let’s notice that we could do the following

\[C{{\bf{e}}^{4t}}\left( {At + B} \right) = {{\bf{e}}^{4t}}\left( {ACt + BC} \right)\]If we multiply the \(C\) through, we can see that the guess can be written in such a way that there are really only two constants. So, we will use the following for our guess.

\[{Y_P}\left( t \right) = {{\bf{e}}^{4t}}\left( {At + B} \right)\]Notice that this is nothing more than the guess for the \(t\) with an exponential tacked on for good measure.

Now that we’ve got our guess, let’s differentiate, plug into the differential equation and collect like terms.

\[\begin{align*}{{\bf{e}}^{4t}}\left( {16At + 16B + 8A} \right) - 4\left( {{{\bf{e}}^{4t}}\left( {4At + 4B + A} \right)} \right) - 12\left( {{{\bf{e}}^{4t}}\left( {At + B} \right)} \right) & = t{{\bf{e}}^{4t}}\\ \left( {16A - 16A - 12A} \right)t{{\bf{e}}^{4t}} + \left( {16B + 8A - 16B - 4A - 12B} \right){{\bf{e}}^{4t}} & = t{{\bf{e}}^{4t}}\\ - 12At{{\bf{e}}^{4t}} + \left( {4A - 12B} \right){{\bf{e}}^{4t}} & = t{{\bf{e}}^{4t}}\end{align*}\]Note that when we’re collecting like terms we want the coefficient of each term to have only constants in it. Following this rule we will get two terms when we collect like terms. Now, set coefficients equal.

\[\begin{align*} & t{{\bf{e}}^{4t}}\,: & - 12A & = 1 & \Rightarrow \hspace{0.25in}A & = - \frac{1}{{12}}\\ & {{\bf{e}}^{4t}}\,: & 4A - 12B & = 0 & \Rightarrow \hspace{0.25in}B & = - \frac{1}{{36}}\end{align*}\]A particular solution for this differential equation is then

\[{Y_P}\left( t \right) = {{\bf{e}}^{4t}}\left( { - \frac{t}{{12}} - \frac{1}{{36}}} \right) = - \frac{1}{{36}}\left( {3t + 1} \right){{\bf{e}}^{4t}}\]This last example illustrated the general rule that we will follow when products involve an exponential. When a product involves an exponential we will first strip out the exponential and write down the guess for the portion of the function without the exponential, then we will go back and tack on the exponential without any leading coefficient.

Let’s take a look at some more products. In the interest of brevity we will just write down the guess for a particular solution and not go through all the details of finding the constants. Also, because we aren’t going to give an actual differential equation we can’t deal with finding the complementary solution first.

- \(g\left( t \right) = 16{{\bf{e}}^{7t}}\sin \left( {10t} \right)\)
- \(g\left( t \right) = \left( {9{t^2} - 103t} \right)\cos t\)
- \(g\left( t \right) = - {{\bf{e}}^{ - 2t}}\left( {3 - 5t} \right)\cos \left( {9t} \right)\)

So, we have an exponential in the function. Remember the rule. We will ignore the exponential and write down a guess for \(16\sin \left( {10t} \right)\) then put the exponential back in.

The guess for the sine is

\[A\cos \left( {10t} \right) + B\sin \left( {10t} \right)\]Now, for the actual guess for the particular solution we’ll take the above guess and tack an exponential onto it. This gives,

\[{Y_P}\left( t \right) = {{\bf{e}}^{7t}}\left( {A\cos \left( {10t} \right) + B\sin \left( {10t} \right)} \right)\]One final note before we move onto the next part. The 16 in front of the function has absolutely no bearing on our guess. Any constants multiplying the whole function are ignored.

b \(g\left( t \right) = \left( {9{t^2} - 103t} \right)\cos t\) Show Solution

We will start this one the same way that we initially started the previous example. The guess for the polynomial is

\[A{t^2} + Bt + C\]and the guess for the cosine is

\[D\cos t + E\sin t\]If we multiply the two guesses we get.

\[\left( {A{t^2} + Bt + C} \right)\left( {D\cos t + E\sin t} \right)\]Let’s simplify things up a little. First multiply the polynomial through as follows.

\[\begin{array}{c}\left( {A{t^2} + Bt + C} \right)\left( {D\cos t} \right) + \left( {A{t^2} + Bt + C} \right)\left( {E\sin t} \right)\\ \left( {AD{t^2} + BDt + CD} \right)\cos t + \left( {AE{t^2} + BEt + CE} \right)\sin t\end{array}\]Notice that everywhere one of the unknown constants occurs it is in a product of unknown constants. This means that if we went through and used this as our guess the system of equations that we would need to solve for the unknown constants would have products of the unknowns in them. These types of systems are generally very difficult to solve.

So, to avoid this we will do the same thing that we did in the previous example. Everywhere we see a product of constants we will rename it and call it a single constant. The guess that we’ll use for this function will be.

\[{Y_P}\left( t \right) = \left( {A{t^2} + Bt + C} \right)\cos t + \left( {D{t^2} + Et + F} \right)\sin t\]This is a general rule that we will use when faced with a product of a polynomial and a trig function. We write down the guess for the polynomial and then multiply that by a cosine. We then write down the guess for the polynomial again, using different coefficients, and multiply this by a sine.

c \(g\left( t \right) = - {{\bf{e}}^{ - 2t}}\left( {3 - 5t} \right)\cos \left( {9t} \right)\) Show Solution

This final part has all three parts to it. First, we will ignore the exponential and write down a guess for.

\[ - \left( {3 - 5t} \right)\cos \left( {9t} \right)\]The minus sign can also be ignored. The guess for this is

\[\left( {At + B} \right)\cos \left( {9t} \right) + \left( {Ct + D} \right)\sin \left( {9t} \right)\]Now, tack an exponential back on and we’re done.

\[{Y_P}\left( t \right) = {{\bf{e}}^{ - 2t}}\left( {At + B} \right)\cos \left( {9t} \right) + {{\bf{e}}^{ - 2t}}\left( {Ct + D} \right)\sin \left( {9t} \right)\]Notice that we put the exponential on both terms.

There a couple of general rules that you need to remember for products.

- If \(g(t)\) contains an exponential, ignore it and write down the guess for the remainder. Then tack the exponential back on without any leading coefficient.
- For products of polynomials and trig functions you first write down the guess for just the polynomial and multiply that by the appropriate cosine. Then add on a new guess for the polynomial with different coefficients and multiply that by the appropriate sine.

If you can remember these two rules you can’t go wrong with products. Writing down the guesses for products is usually not that difficult. The difficulty arises when you need to actually find the constants.

Now, let’s take a look at sums of the basic components and/or products of the basic components. To do this we’ll need the following fact.

#### Fact

If \(Y_{P1}(t)\) is a particular solution for

\[y'' + p\left( t \right)y' + q\left( t \right)y = {g_1}\left( t \right)\]and if \(Y_{P2}(t)\) is a particular solution for

\[y'' + p\left( t \right)y' + q\left( t \right)y = {g_2}\left( t \right)\]then \(Y_{P1}(t)\) + \(Y_{P2}(t)\) is a particular solution for

\[y'' + p\left( t \right)y' + q\left( t \right)y = {g_1}\left( t \right) + {g_2}\left( t \right)\]This fact can be used to both find particular solutions to differential equations that have sums in them and to write down guess for functions that have sums in them.

This example is the reason that we’ve been using the same homogeneous differential equation for all the previous examples. There is nothing to do with this problem. All that we need to do it go back to the appropriate examples above and get the particular solution from that example and add them all together.

Doing this gives

\[{Y_P}\left( t \right) = - \frac{3}{7}{{\bf{e}}^{5t}} + \frac{1}{{40}}\cos \left( {2t} \right) - \frac{1}{{20}}\sin \left( {2t} \right) - \frac{1}{{36}}\left( {3t + 1} \right){{\bf{e}}^{4t}}\]Let’s take a look at a couple of other examples. As with the products we’ll just get guesses here and not worry about actually finding the coefficients.

for the following \(g(t)\)’s.

- \(g\left( t \right) = 4\cos \left( {6t} \right) - 9\sin \left( {6t} \right)\)
- \(g\left( t \right) = - 2\sin t + \sin \left( {14t} \right) - 5\cos \left( {14t} \right)\)
- \(g\left( t \right) = {{\bf{e}}^{7t}} + 6\)
- \(g\left( t \right) = 6{t^2} - 7\sin \left( {3t} \right) + 9\)
- \(g\left( t \right) = 10{{\bf{e}}^t} - 5t{{\bf{e}}^{ - 8t}} + 2{{\bf{e}}^{ - 8t}}\)
- \(g\left( t \right) = {t^2}\cos t - 5t\sin t\)
- \(g\left( t \right) = 5{{\bf{e}}^{ - 3t}} + {{\bf{e}}^{ - 3t}}\cos \left( {6t} \right) - \sin \left( {6t} \right)\)

This first one we’ve actually already told you how to do. This is in the table of the basic functions. However, we wanted to justify the guess that we put down there. Using the fact on sums of function we would be tempted to write down a guess for the cosine and a guess for the sine. This would give.

\[\underbrace {A\cos \left( {6t} \right) + B\sin \left( {6t} \right)}_{{\mbox{guess for the cosine}}} + \underbrace {C\cos \left( {6t} \right) + D\sin \left( {6t} \right)}_{{\mbox{guess for the sine}}}\]So, we would get a cosine from each guess and a sine from each guess. The problem with this as a guess is that we are only going to get two equations to solve after plugging into the differential equation and yet we have 4 unknowns. We will never be able to solve for each of the constants.

To fix this notice that we can combine some terms as follows.

\[\left( {A + C} \right)\cos \left( {6t} \right) + \left( {B + D} \right)\sin \left( {6t} \right)\]Upon doing this we can see that we’ve really got a single cosine with a coefficient and a single sine with a coefficient and so we may as well just use

\[{Y_P}\left( t \right) = A\cos \left( {6t} \right) + B\sin \left( {6t} \right)\]The general rule of thumb for writing down guesses for functions that involve sums is to always combine like terms into single terms with single coefficients. This will greatly simplify the work required to find the coefficients.

b \(g\left( t \right) = - 2\sin t + \sin \left( {14t} \right) - 5\cos \left( {14t} \right)\) Show Solution

For this one we will get two sets of sines and cosines. This will arise because we have two different arguments in them. We will get one set for the sine with just a \(t\) as its argument and we’ll get another set for the sine and cosine with the 14\(t\) as their arguments.

The guess for this function is

\[{Y_P}\left( t \right) = A\cos t + B\sin t + C\cos \left( {14t} \right) + D\sin \left( {14t} \right)\]c \(g\left( t \right) = {{\bf{e}}^{7t}} + 6\) Show Solution

The main point of this problem is dealing with the constant. But that isn’t too bad. We just wanted to make sure that an example of that is somewhere in the notes. If you recall that a constant is nothing more than a zeroth degree polynomial the guess becomes clear.

The guess for this function is

\[{Y_p}\left( t \right) = A{{\bf{e}}^{7t}} + B\]d \(g\left( t \right) = 6{t^2} - 7\sin \left( {3t} \right) + 9\) Show Solution

This one can be a little tricky if you aren’t paying attention. Let’s first rewrite the function

\[\begin{align*}g\left( t \right) & = 6{t^2} - 7\sin \left( {3t} \right) + 9\hspace{0.25in}{\mbox{as}}\\ g\left( t \right) & = 6{t^2} + 9 - 7\sin \left( {3t} \right)\end{align*}\]All we did was move the 9. However, upon doing that we see that the function is really a sum of a quadratic polynomial and a sine. The guess for this is then

\[{Y_P}\left( t \right) = A{t^2} + Bt + C + D\cos \left( {3t} \right) + E\sin \left( {3t} \right)\]If we don’t do this and treat the function as the sum of three terms we would get

\[A{t^2} + Bt + C + D\cos \left( {3t} \right) + E\sin \left( {3t} \right) + G\]and as with the first part in this example we would end up with two terms that are essentially the same (the \(C\) and the \(G\)) and so would need to be combined. An added step that isn’t really necessary if we first rewrite the function.

Look for problems where rearranging the function can simplify the initial guess.

e \(g\left( t \right) = 10{{\bf{e}}^t} - 5t{{\bf{e}}^{ - 8t}} + 2{{\bf{e}}^{ - 8t}}\) Show Solution

So, this look like we’ve got a sum of three terms here. Let’s write down a guess for that.

\[A{{\bf{e}}^t} + \left( {Bt + C} \right){{\bf{e}}^{ - 8t}} + D{{\bf{e}}^{ - 8t}}\]Notice however that if we were to multiply the exponential in the second term through we would end up with two terms that are essentially the same and would need to be combined. This is a case where the guess for one term is completely contained in the guess for a different term. When this happens we just drop the guess that’s already included in the other term.

So, the guess here is actually.

\[{Y_P}\left( t \right) = A{{\bf{e}}^t} + \left( {Bt + C} \right){{\bf{e}}^{ - 8t}}\]Notice that this arose because we had two terms in our \(g(t)\) whose only difference was the polynomial that sat in front of them. When this happens we look at the term that contains the largest degree polynomial, write down the guess for that and don’t bother writing down the guess for the other term as that guess will be completely contained in the first guess.

f \(g\left( t \right) = {t^2}\cos t - 5t\sin t\) Show Solution

In this case we’ve got two terms whose guess without the polynomials in front of them would be the same. Therefore, we will take the one with the largest degree polynomial in front of it and write down the guess for that one and ignore the other term. So, the guess for the function is

\[{Y_P}\left( t \right) = \left( {A{t^2} + Bt + C} \right)\cos t + \left( {D{t^2} + Et + F} \right)\sin t\]g \(g\left( t \right) = 5{{\bf{e}}^{ - 3t}} + {{\bf{e}}^{ - 3t}}\cos \left( {6t} \right) - \sin \left( {6t} \right)\) Show Solution

This last part is designed to make sure you understand the general rule that we used in the last two parts. This time there really are three terms and we will need a guess for each term. The guess here is

\[{Y_P}\left( t \right) = A{{\bf{e}}^{ - 3t}} + {{\bf{e}}^{ - 3t}}\left( {B\cos \left( {6t} \right) + C\sin \left( {6t} \right)} \right) + D\cos \left( {6t} \right) + E\sin \left( {6t} \right)\]We can only combine guesses if they are identical up to the constant. So, we can’t combine the first exponential with the second because the second is really multiplied by a cosine and a sine and so the two exponentials are in fact different functions. Likewise, the last sine and cosine can’t be combined with those in the middle term because the sine and cosine in the middle term are in fact multiplied by an exponential and so are different.

So, when dealing with sums of functions make sure that you look for identical guesses that may or may not be contained in other guesses and combine them. This will simplify your work later on.

We have one last topic in this section that needs to be dealt with. In the first few examples we were constantly harping on the usefulness of having the complementary solution in hand before making the guess for a particular solution. We never gave any reason for this other that “trust us”. It is now time to see why having the complementary solution in hand first is useful. This is best shown with an example so let’s jump into one.

This problem seems almost too simple to be given this late in the section. This is especially true given the ease of finding a particular solution for \(g\)(\(t\))’s that are just exponential functions. Also, because the point of this example is to illustrate why it is generally a good idea to have the complementary solution in hand first we’ll let’s go ahead and recall the complementary solution first. Here it is,

\[{y_c}\left( t \right) = {c_1}{{\bf{e}}^{ - 2t}} + {c_2}{{\bf{e}}^{6t}}\]

Now, without worrying about the complementary solution for a couple more seconds let’s go ahead and get to work on the particular solution. There is not much to the guess here. From our previous work we know that the guess for the particular solution should be,

\[{Y_P}\left( t \right) = A{{\bf{e}}^{6t}}\]Plugging this into the differential equation gives,

\[\begin{align*}36A{{\bf{e}}^{6t}} - 24A{{\bf{e}}^{6t}} - 12A{{\bf{e}}^{6t}} & = {{\bf{e}}^{6t}}\\ 0 & = {{\bf{e}}^{6t}}\end{align*}\]Hmmmm…. Something seems wrong here. Clearly an exponential can’t be zero. So, what went wrong? We finally need the complementary solution. Notice that the second term in the complementary solution (listed above) is exactly our guess for the form of the particular solution and now recall that both portions of the complementary solution are solutions to the homogeneous differential equation,

\[y'' - 4y' - 12y = 0\]In other words, we had better have gotten zero by plugging our guess into the differential equation, it is a solution to the homogeneous differential equation!

So, how do we fix this? The way that we fix this is to add a \(t\) to our guess as follows.

\[{Y_P}\left( t \right) = At{{\bf{e}}^{6t}}\]Plugging this into our differential equation gives,

\[\begin{align*}\left( {12A{{\bf{e}}^{6t}} + 36At{{\bf{e}}^{6t}}} \right) - 4\left( {A{{\bf{e}}^{6t}} + 6At{{\bf{e}}^{6t}}} \right) - 12At{{\bf{e}}^{6t}} & = {{\bf{e}}^{6t}}\\ \left( {36A - 24A - 12A} \right)t{{\bf{e}}^{6t}} + \left( {12A - 4A} \right){{\bf{e}}^{6t}} & = {{\bf{e}}^{6t}}\\ 8A{{\bf{e}}^{6t}} & = {{\bf{e}}^{6t}}\end{align*}\]Now, we can set coefficients equal.

\[8A = 1\hspace{0.25in}\hspace{0.25in} \Rightarrow \hspace{0.25in}\,\,\,\,\,A = \frac{1}{8}\]So, the particular solution in this case is,

\[{Y_P}\left( t \right) = \frac{t}{8}{{\bf{e}}^{6t}}\]So, what did we learn from this last example. While technically we don’t need the complementary solution to do undetermined coefficients, you can go through a lot of work only to figure out at the end that you needed to add in a \(t\) to the guess because it appeared in the complementary solution. This work is avoidable if we first find the complementary solution and comparing our guess to the complementary solution and seeing if any portion of your guess shows up in the complementary solution.

If a portion of your guess does show up in the complementary solution then we’ll need to modify that portion of the guess by adding in a \(t\) to the portion of the guess that is causing the problems. We do need to be a little careful and make sure that we add the \(t\) in the correct place however. The following set of examples will show you how to do this.

- \(y'' + 3y' - 28y = 7t + {{\bf{e}}^{ - 7t}} - 1\)
- \(y'' - 100y = 9{t^2}{{\bf{e}}^{10t}} + \cos t - t\sin t\)
- \(4y'' + y = {{\bf{e}}^{ - 2t}}\sin \left( {\frac{t}{2}} \right) + 6t\cos \left( {\frac{t}{2}} \right)\)
- \(4y'' + 16y' + 17y = {{\bf{e}}^{ - 2t}}\sin \left( {\frac{t}{2}} \right) + 6t\cos \left( {\frac{t}{2}} \right)\)
- \(y'' + 8y' + 16y = {{\bf{e}}^{ - 4t}} + \left( {{t^2} + 5} \right){{\bf{e}}^{ - 4t}}\)

In these solutions we’ll leave the details of checking the complementary solution to you.

a \(y'' + 3y' - 28y = 7t + {{\bf{e}}^{ - 7t}} - 1\) Show Solution

The complementary solution is

\[{y_c}\left( t \right) = {c_1}{{\bf{e}}^{4t}} + {c_2}{{\bf{e}}^{ - 7t}}\]Remembering to put the “-1” with the 7\(t\) gives a first guess for the particular solution.

\[{Y_P}\left( t \right) = At + B + C{{\bf{e}}^{ - 7t}}\]Notice that the last term in the guess is the last term in the complementary solution. The first two terms however aren’t a problem and don’t appear in the complementary solution. Therefore, we will only add a \(t\) onto the last term.

The correct guess for the form of the particular solution is.

\[{Y_P}\left( t \right) = At + B + Ct{{\bf{e}}^{ - 7t}}\]b \(y'' - 100y = 9{t^2}{{\bf{e}}^{10t}} + \cos t - t\sin t\) Show Solution

The complementary solution is

\[{y_c}\left( t \right) = {c_1}{{\bf{e}}^{10t}} + {c_2}{{\bf{e}}^{ - 10t}}\]A first guess for the particular solution is

\[{Y_P}\left( t \right) = \left( {A{t^2} + Bt + C} \right){{\bf{e}}^{10t}} + \left( {Et + F} \right)\cos t + \left( {Gt + H} \right)\sin t\]Notice that if we multiplied the exponential term through the parenthesis that we would end up getting part of the complementary solution showing up. Since the problem part arises from the first term the *whole* first term will get multiplied by \(t\). The second and third terms are okay as they are.

The correct guess for the form of the particular solution in this case is.

\[{Y_P}\left( t \right) = t\left( {A{t^2} + Bt + C} \right){{\bf{e}}^{10t}} + \left( {Et + F} \right)\cos t + \left( {Gt + H} \right)\sin t\]So, in general, if you were to multiply out a guess and if any term in the result shows up in the complementary solution, then the whole term will get a \(t\) not just the problem portion of the term.

c \(4y'' + y = {{\bf{e}}^{ - 2t}}\sin \left( {\frac{t}{2}} \right) + 6t\cos \left( {\frac{t}{2}} \right)\) Show Solution

The complementary solution is

\[{y_c}\left( t \right) = {c_1}\cos \left( {\frac{t}{2}} \right) + {c_2}\sin \left( {\frac{t}{2}} \right)\]A first guess for the particular solution is

\[{Y_P}\left( t \right) = {{\bf{e}}^{ - 2t}}\left( {A\cos \left( {\frac{t}{2}} \right) + B\sin \left( {\frac{t}{2}} \right)} \right) + \left( {Ct + D} \right)\cos \left( {\frac{t}{2}} \right) + \left( {Et + F} \right)\sin \left( {\frac{t}{2}} \right)\]In this case both the second and third terms contain portions of the complementary solution. The first term doesn’t however, since upon multiplying out, both the sine and the cosine would have an exponential with them and that isn’t part of the complementary solution. We only need to worry about terms showing up in the complementary solution if the only difference between the complementary solution term and the particular guess term is the constant in front of them.

So, in this case the second and third terms will get a \(t\) while the first won’t

The correct guess for the form of the particular solution is.

\[{Y_P}\left( t \right) = {{\bf{e}}^{ - 2t}}\left( {A\cos \left( {\frac{t}{2}} \right) + B\sin \left( {\frac{t}{2}} \right)} \right) + t\left( {Ct + D} \right)\cos \left( {\frac{t}{2}} \right) + t\left( {Et + F} \right)\sin \left( {\frac{t}{2}} \right)\]d \(4y'' + 16y' + 17y = {{\bf{e}}^{ - 2t}}\sin \left( {\frac{t}{2}} \right) + 6t\cos \left( {\frac{t}{2}} \right)\) Show Solution

To get this problem we changed the differential equation from the last example and left the \(g(t)\) alone. The complementary solution this time is

\[{y_c}\left( t \right) = {c_1}{{\bf{e}}^{ - 2t}}\cos \left( {\frac{t}{2}} \right) + {c_2}{{\bf{e}}^{ - 2t}}\sin \left( {\frac{t}{2}} \right)\]As with the last part, a first guess for the particular solution is

\[{Y_P}\left( t \right) = {{\bf{e}}^{ - 2t}}\left( {A\cos \left( {\frac{t}{2}} \right) + B\sin \left( {\frac{t}{2}} \right)} \right) + \left( {Ct + D} \right)\cos \left( {\frac{t}{2}} \right) + \left( {Et + F} \right)\sin \left( {\frac{t}{2}} \right)\]This time however it is the first term that causes problems and not the second or third. In fact, the first term is exactly the complementary solution and so it will need a \(t\). Recall that we will only have a problem with a term in our guess if it only differs from the complementary solution by a constant. The second and third terms in our guess don’t have the exponential in them and so they don’t differ from the complementary solution by only a constant.

The correct guess for the form of the particular solution is.

\[{Y_P}\left( t \right) = t{{\bf{e}}^{ - 2t}}\left( {A\cos \left( {\frac{t}{2}} \right) + B\sin \left( {\frac{t}{2}} \right)} \right) + \left( {Ct + D} \right)\cos \left( {\frac{t}{2}} \right) + \left( {Et + F} \right)\sin \left( {\frac{t}{2}} \right)\]e \(y'' + 8y' + 16y = {{\bf{e}}^{ - 4t}} + \left( {{t^2} + 5} \right){{\bf{e}}^{ - 4t}}\) Show Solution

The complementary solution is

\[{y_c}\left( t \right) = {c_1}{{\bf{e}}^{ - 4t}} + {c_2}t{{\bf{e}}^{ - 4t}}\]The two terms in \(g(t)\) are identical with the exception of a polynomial in front of them. So this means that we only need to look at the term with the highest degree polynomial in front of it. A first guess for the particular solution is

\[{Y_P}\left( t \right) = \left( {A{t^2} + Bt + C} \right){{\bf{e}}^{ - 4t}}\]Notice that if we multiplied the exponential term through the parenthesis the last two terms would be the complementary solution. Therefore, we will need to multiply this whole thing by a \(t\).

The next guess for the particular solution is then.

\[{Y_P}\left( t \right) = t\left( {A{t^2} + Bt + C} \right){{\bf{e}}^{ - 4t}}\]This still causes problems however. If we multiplied the \(t\) and the exponential through, the last term will still be in the complementary solution. In this case, unlike the previous ones, a \(t\) wasn’t sufficient to fix the problem. So, we will add in another \(t\) to our guess.

The correct guess for the form of the particular solution is.

\[{Y_P}\left( t \right) = {t^2}\left( {A{t^2} + Bt + C} \right){{\bf{e}}^{ - 4t}}\]Upon multiplying this out none of the terms are in the complementary solution and so it will be okay.

As this last set of examples has shown, we really should have the complementary solution in hand before even writing down the first guess for the particular solution. By doing this we can compare our guess to the complementary solution and if any of the terms from your particular solution show up we will know that we’ll have problems. Once the problem is identified we can add a \(t\) to the problem term(s) and compare our new guess to the complementary solution. If there are no problems we can proceed with the problem, if there are problems add in another \(t\) and compare again.

Can you see a general rule as to when a \(t\) will be needed and when a *t ^{2}* will be needed for second order differential equations?