Paul's Online Notes
Paul's Online Notes
Home / Differential Equations / Second Order DE's / Nonhomogeneous Differential Equations
Show General Notice Show Mobile Notice Show All Notes Hide All Notes
General Notice

This is a little bit in advance, but I wanted to let everyone know that my servers will be undergoing some maintenance on May 17 and May 18 during 8:00 AM CST until 2:00 PM CST. Hopefully the only inconvenience will be the occasional “lost/broken” connection that should be fixed by simply reloading the page. Outside of that the maintenance should (fingers crossed) be pretty much “invisible” to everyone.

May 6, 2021

Mobile Notice
You appear to be on a device with a "narrow" screen width (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-8 : Nonhomogeneous Differential Equations

It’s now time to start thinking about how to solve nonhomogeneous differential equations. A second order, linear nonhomogeneous differential equation is

\[\begin{equation}y'' + p\left( t \right)y' + q\left( t \right)y = g\left( t \right)\label{eq:eq1}\end{equation}\]

where \(g(t)\) is a non-zero function. Note that we didn’t go with constant coefficients here because everything that we’re going to do in this section doesn’t require it. Also, we’re using a coefficient of 1 on the second derivative just to make some of the work a little easier to write down. It is not required to be a 1.

Before talking about how to solve one of these we need to get some basics out of the way, which is the point of this section.

First, we will call

\[\begin{equation}y'' + p\left( t \right)y' + q\left( t \right)y = 0\label{eq:eq2}\end{equation}\]

the associated homogeneous differential equation to \(\eqref{eq:eq1}\).

Now, let’s take a look at the following theorem.


Suppose that \(Y_{1}(t)\) and \(Y_{2}(t)\) are two solutions to \(\eqref{eq:eq1}\) and that \(y_{1}(t)\) and \(y_{2}(t)\) are a fundamental set of solutions to the associated homogeneous differential equation \(\eqref{eq:eq2}\) then,

\[{Y_1}\left( t \right) - {Y_2}\left( t \right)\]

is a solution to \(\eqref{eq:eq2}\) and it can be written as

\[{Y_1}\left( t \right) - {Y_2}\left( t \right) = {c_1}{y_1}\left( t \right) + {c_2}{y_2}\left( t \right)\]

Note the notation used here. Capital letters referred to solutions to \(\eqref{eq:eq1}\) while lower case letters referred to solutions to \(\eqref{eq:eq2}\). This is a fairly common convention when dealing with nonhomogeneous differential equations.

This theorem is easy enough to prove so let’s do that. To prove that \(Y_{1}(t) - Y_{2}(t)\) is a solution to \(\eqref{eq:eq2}\) all we need to do is plug this into the differential equation and check it.

\[\begin{align*}{\left( {{Y_1} - {Y_2}} \right)^{\prime \prime }} + p\left( t \right){\left( {{Y_1} - {Y_2}} \right)^\prime } + q\left( t \right)\left( {{Y_1} - {Y_2}} \right) & = 0\\ {Y_1}^{\prime \prime } + p\left( t \right){Y_1}^\prime + q\left( t \right){Y_1} - \left( {{Y_2}^{\prime \prime } + p\left( t \right){Y_2}^\prime + q\left( t \right){Y_2}} \right) & = 0\\ g\left( t \right) - g\left( t \right) & = 0\\ 0 & = 0\end{align*}\]

We used the fact that \(Y_{1}(t)\) and \(Y_{2}(t)\) are two solutions to \(\eqref{eq:eq1}\) in the third step. Because they are solutions to \(\eqref{eq:eq1}\) we know that

\[\begin{align*}{Y_1}^{\prime \prime } + p\left( t \right){Y_1}^\prime + q\left( t \right){Y_1} & = g\left( t \right)\\ {Y_2}^{\prime \prime } + p\left( t \right){Y_2}^\prime + q\left( t \right){Y_2} & = g\left( t \right)\end{align*}\]

So, we were able to prove that the difference of the two solutions is a solution to \(\eqref{eq:eq2}\).

Proving that

\[{Y_1}\left( t \right) - {Y_2}\left( t \right) = {c_1}{y_1}\left( t \right) + {c_2}{y_2}\left( t \right)\]

is even easier. Since \(y_{1}(t)\) and \(y_{2}(t)\) are a fundamental set of solutions to \(\eqref{eq:eq2}\) we know that they form a general solution and so any solution to \(\eqref{eq:eq2}\) can be written in the form

\[y\left( t \right) = {c_1}{y_1}\left( t \right) + {c_2}{y_2}\left( t \right)\]

Well, \(Y_{1}(t) - Y_{2}(t)\) is a solution to \(\eqref{eq:eq2}\), as we’ve shown above, therefore it can be written as

\[{Y_1}\left( t \right) - {Y_2}\left( t \right) = {c_1}{y_1}\left( t \right) + {c_2}{y_2}\left( t \right)\]

So, what does this theorem do for us? We can use this theorem to write down the form of the general solution to \(\eqref{eq:eq1}\). Let’s suppose that \(y(t)\) is the general solution to \(\eqref{eq:eq1}\) and that \(Y_{P}(t)\) is any solution to \(\eqref{eq:eq1}\) that we can get our hands on. Then using the second part of our theorem we know that

\[y\left( t \right) - {Y_P}\left( t \right) = {c_1}{y_1}\left( t \right) + {c_2}{y_2}\left( t \right)\]

where \(y_{1}(t)\) and \(y_{2}(t)\) are a fundamental set of solutions for \(\eqref{eq:eq2}\). Solving for \(y(t)\) gives,

\[y\left( t \right) = {c_1}{y_1}\left( t \right) + {c_2}{y_2}\left( t \right) + {Y_P}\left( t \right)\]

We will call

\[{y_c}\left( t \right) = {c_1}{y_1}\left( t \right) + {c_2}{y_2}\left( t \right)\]

the complementary solution and \(Y_{P}(t)\) a particular solution. The general solution to a differential equation can then be written as.

\[y\left( t \right) = {y_c}\left( t \right) + {Y_P}\left( t \right)\]

So, to solve a nonhomogeneous differential equation, we will need to solve the homogeneous differential equation, \(\eqref{eq:eq2}\), which for constant coefficient differential equations is pretty easy to do, and we’ll need a solution to \(\eqref{eq:eq1}\).

This seems to be a circular argument. In order to write down a solution to \(\eqref{eq:eq1}\) we need a solution. However, this isn’t the problem that it seems to be. There are ways to find a solution to \(\eqref{eq:eq1}\). They just won’t, in general, be the general solution. In fact, the next two sections are devoted to exactly that, finding a particular solution to a nonhomogeneous differential equation.

There are two common methods for finding particular solutions : Undetermined Coefficients and Variation of Parameters. Both have their advantages and disadvantages as you will see in the next couple of sections.