Skip to main content

Section 13.1 Non-Homogeneous First Order Linear DEs

Non-homogeneous first order linear DEs with constant coefficients take the form

\begin{equation*} ay'+by=f(x) \end{equation*}

We know that we can solve these DEs via an integrating factor, (see section Chapter 11).

Find the general solution to the DE

\begin{equation*} y'-y=x \end{equation*}
Answer.

\(y(x)=Ae^x-x-1\)

Solution.

Multiplying both sides of this DE via the integrating factor \(I(x)=e^{\int -1\hspace{2mm}dx}=e^{-x}\) gives

\begin{equation*} \frac{d}{dx}(e^{-x}y)=xe^{-x} \end{equation*}

Using integration by parts gives the general solution as

\begin{equation*} y(x)=Ae^x-x-1 \end{equation*}

There are two interesting facts about this general solution. To discuss these facts write the solution as

\begin{equation*} y(x)=y_c(x)+y_p(x) \end{equation*}

where

\begin{equation*} y_c(x)=Ae^x \textrm{ and } y_p(x)=-x-1 \end{equation*}

The first fact to note is that \(y_c(x)\) is the general solution to the homogeneous equation

\begin{equation*} y'-y=0 \end{equation*}

and \(y_p(x)\) is one particular solution to the original non-homogeneous DE. The second fact to note is that the form of the particular solution \(y_p(x)=-x-1\) is the same as that of the non-homogeneous term \(f(x)=x\text{,}\) that is they are both polynomials of degree \(1\text{.}\)

Find the general solution to the DE

\begin{equation*} y'-y=\cos(x) \end{equation*}
Answer.

\(y(x)=Ae^x+\dfrac{1}{2}\sin(x)-\dfrac{1}{2}\cos(x)\)

Solution.

Solving via an integrating factor gives the general solution as

\begin{equation*} y(x)=Ae^x+\frac{1}{2}\sin(x)-\frac{1}{2}\cos(x) \end{equation*}

Once again writing this as

\begin{equation*} y(x)=y_c(x)+y_p(x) \end{equation*}

where

\begin{equation*} y_c(x)=Ae^x \textrm{ and } y_p(x)=\frac{1}{2}\sin(x)-\frac{1}{2}\cos(x) \end{equation*}

we see that \(y_c(x)\) is the general solution to the associated homogeneous DE and that \(y_p(x)\) and \(f(x)\) are both trigonometric functions. In this case it seems reasonable that \(y_c(x)\) contains both a \(\cos(x)\) term and a \(\sin(x)\) since to satisfy the DE we would expect the particular solution to contain terms like \(f(x)=\cos(x)\) and its derivative \(f'(x)=-\sin(x)\text{.}\)

Find the general solution to the DE

\begin{equation*} y'-y=e^x \end{equation*}
Answer.

\(y(x)=Ae^x+xe^x\)

Solution.

The general solution to this DE, found via an integrating factor, is

\begin{equation*} y(x)=Ae^x+xe^x \end{equation*}

Letting

\begin{equation*} y_c(x)=Ae^x \textrm{ and } y_p(x)=xe^x \end{equation*}

we see that, once again, \(y_c(x)\) is the general solution to the associated homogeneous DE but this time \(y_p(x)\) is not quite the same form as \(f(x)\text{.}\) The difference in this case from the previous two examples is that here \(f(x)\) is the same form as \(y_c(x)\text{,}\) the solution to the homogeneous DE and hence \(y_p(x)\) can’t also be of this form.

The above examples all illustrate the following more general result.

Definition 13.1.4.

The general solution to the non-homogeneous first order linear DE with constant coefficients

\begin{equation*} ay'+by=f(x) \end{equation*}

is

\begin{equation*} y(x)=y_c(x)+y_p(x) \end{equation*}

where \(y_c(x)\) is the general solution to the associated homogeneous DE

\begin{equation*} ay'+by=0 \end{equation*}

and \(y_p(x)\) is any particular solution to non-homogeneous DE.

Exercises Example Tasks

1.

If \(y_c(x)\) is the general solution to

\begin{equation*} ay'+by=0 \end{equation*}

and \(y_p(x)\) is any particular solution to

\begin{equation*} ay'+by=f(x) \end{equation*}

show that

\begin{equation*} y(x)=y_c(x)+y_p(x) \end{equation*}

is also a solution to

\begin{equation*} ay'+by=f(x) \end{equation*}