# Second Order Nonhomogenous Differential Equations

Thus far we have only really looked at methods to solving second order linear *homogenous*differential equations. We will now look at methods for solving second order linear *nonhomogenous* differential equations. Recall that for $g(t) \neq 0$, such a differential equation comes in the following form:

(1)

When solving a second order linear nonhomogenous differential equation, we will make use of the underlying second order homogenous differential equation which we define below.

Definition: If $\frac{d^2 y}{dt^2} + p(t) \frac{dy}{dt} + q(t) y = g(t)$ is a second order linear nonhomogenous differential equation then the Corresponding Homogenous Differential Equation is $\frac{d^2y}{dt^2} + p(t) \frac{dy}{dt} + q(t)y = 0$. |

*It should be noted that the general solution to the corresponding homogenous differential equation is sometimes called the Complementary Solution.*

For example, consider the following second order linear nonhomogenous differential equation:

(2)

Then the corresponding homogenous differential equation is:

(3)

Theorem 1: Let $\frac{d^2y}{dt^2} + p(t) \frac{dy}{dt} + q(t) y = g(t)$ be a second order linear nonhomogenous differential equation and suppose that $y = Y_1(t)$ and $y = Y_2(t)$ are solutions to this differential equation. Then the difference, $Y_1 – Y_2$ is a solution to the corresponding homogenous differential equation $\frac{d^2 y}{dt^2} + p(t) \frac{dy}{dt} + q(t) y = 0$. Furthermore, if $y = y_1(t)$ and $y = y_2(t)$ form a fundamental set of solutions for the corresponding homogenous differential equation, then for some constants $C$ and $D$ we have that $Y_1(t) – Y_2(t) = Cy_1(t) + Dy_2(t)$. |

**Proof:**Let $y = Y_1(t)$ and $y = Y_2(t)$ be solutions to the second order linear nonhomogenous differential equation $\frac{d^2y}{dt^2} + p(t) \frac{dy}{dt} + q(t) y = g(t)$. Then plugging in the difference $Y_1 – Y_2$ into our second order linear nonhomogenous differential equation and we have that:

(4)

- Subtracting the second equation from the first and we have that:

(5)

- Thus we see that $y = Y_1(t) – Y_2(t)$ is a solution to the corresponding second order linear homogenous differential equation.

- Now suppose that $y = y_1(t)$ and $y = y_2(t)$ form a fundamental set of solutions for the corresponding second order linear homogenous differential equation. Then all solutions of this differential equation can be expressed as a linear combination of $y_1$ and $y_2$. But $Y_1(t) – Y_2(t)$ is a solution, and so there exists constants $C$ and $D$ such that:

(6)

Theorem 2: If $\frac{d^2y}{dt^2} + p(t) \frac{dy}{dt} + q(t) y = g(t)$ is a second order linear nonhomogenous differential equation, then the general solution for this differential equation is $\phi(t) = Cy_1(t) + Dy_2(t) + Y(t)$ where $y_1$ and $y_2$ form a fundamental set of solutions for the corresponding second order linear homogenous differential equation $\frac{d^2y}{dt^2} + p(t) \frac{dy}{dt} + q(t) y = 0$ and where $Y$ is a specific solution to the second order linear nonhomogenous differential equation. |

**Proof:**Let $y_1$ and $y_2$ form a fundamental set of solutions for the corresponding second order linear homogenous differential equation $\frac{d^2y}{dt^2} + p(t) \frac{dy}{dt} + q(t) y = 0$. Consider an arbitrary solution $\phi$ and $Y$ is a specific solution to the second order linear nonhomogenous differential equation $\frac{d^2y}{dt^2} + p(t) \frac{dy}{dt} + q(t) y = g(t)$. Then from Theorem 1 above, their difference is a linear combination of $y_1$ and $y_2$ for some constants $C$ and $D$:

(7)

- Therefore an arbitrary solution $\phi$ can be obtained as $\phi(t) = Cy_1(t) + Dy_2(t) + Y(t)$. $\blacksquare$