The Method of Undetermined Coefficients Examples 1

# The Method of Undetermined Coefficients Examples 1

Recall from The Method of Undetermined Coefficients page that if we have a second order linear nonhomogeneous differential equation with constant coefficients of the form $a \frac{d^2y}{dt^2} + b \frac{dy}{dt} + cy = g(t)$ where $a, b, c \in \mathbb{R}$, then if $g(t)$ is of a form containing polynomials, sines, cosines, or the exponential function $e^x$.

To solve these type of differential equations, we first need to solve the corresponding linear homogeneous differential equation $a \frac{d^2y}{dt^2} + b \frac{dy}{dt} + cy = 0$ for the homogeneous solution $y_h(t)$.. We then need to find a particular solution $Y(t)$ which will be of a particular form dependent on the combination of functions forming $g(t)$ (see the page linked above).

We can then solve for the coefficients and obtain a general solution $y = y_h(t) + Y(t)$.

We will now look at some examples of applying this method.

## Example 1

Solve the following second order linear nonhomogeneous differential equation $\frac{d^2y}{dt^2} + \frac{dy}{dt} - 6y = 12e^{3t} + 12e^{-2t}$ using the method of undetermined coefficients.

The corresponding second order homogeneous differential equation is $\frac{d^2y}{dt^2} + \frac{dy}{dt} - 6y = 0$ and the characteristic equation is $r^2 + r - 6 = (r + 3)(r - 2) = 0$. The roots to the characteristic equation are $r_1 = -3$ and $r_2 = 2$ and so the solution to the homogeneous second order differential equation is:

(1)
\begin{align} \quad y_h(t) = Ce^{-3t} + De^{2t} \end{align}

We now want to find a particular solution $Y(t)$. Assume that $Y(t) = Ae^{3t} + Be^{-2t}$. No part of the assumed form of $Y(t)$ is contained in the solution to the corresponding second order homogeneous differential equation from above, so we do not need to multiply by $t$. The first and second derivatives of $Y$ are given below.

(2)
\begin{align} \quad Y'(t) = 3Ae^{3t} - 2Be^{-2t} \end{align}
(3)
\begin{align} \quad Y''(t) = 9Ae^{3t} + 4Be^{-2t} \end{align}

Substituting the values of $Y(t)$, $Y'(t)$, and $Y''(t)$ into our differential equations gives us:

(4)
\begin{align} \quad \left [ 9Ae^{3t} + 4Be^{-2t} \right ] + \left [ 3Ae^{3t} - 2Be^{-2t} \right ] - 6 \left [ Ae^{3t} + Be^{-2t} \right ] = 12e^{3t} + 12e^{-2t} \\ \quad (9A + 3A - 6A)e^{3t} + (4B -2B -6B)e^{-2t} = 12e^{3t} + 12e^{-2t} \\ \quad 6Ae^{3t} - 4Be^{-2t} = 12e^{3t} + 12e^{-2t} \end{align}

The equation above implies that $A = 2$ and $B = -3$. Therefore a particular solution to the second order nonhomogeneous differential equation is $Y(t) = 2e^{3t} -3e^{-2t}$. Thus, the general solution is given by:

(5)
\begin{align} \quad y(t) + y_h(t) + Y(t) \\ \quad y(t) = Ce^{-3t} + De^{2t} + 2e^{3t} - 3e^{-2t} \end{align}

## Example 2

Solve the following second order linear nonhomogeneous differential equation $\frac{d^2y}{dt^2} + 9y = t^2 e^{3t} + 6$ using the method of undetermined coefficients.

The corresponding second order homogeneous differential equation is $\frac{d^2y}{dt^2} + 9y = 0$, and the corresponding characteristic equation is $r^2 + 9 = 0$. Therefore $r^2 = -9$ and $r = 0 \pm 3i$, so the roots of the characteristic equation are $r_1 = 3i$ and $r_2 = -3i$. The solution to the corresponding second order homogeneous differential equation is:

(6)
\begin{align} \quad y_h(t) = C \cos 3t + D \sin 3t \end{align}

We now need to find a particular solution for the second order nonhomogeneous differential equation. Assume the form $Y(t) = (P + Qt + Rt^2)e^{3t} + S$. The first and second derivatives of $Y$ are:

(7)
\begin{align} \quad Y'(t) = (Q + 2Rt)e^{3t} + 3(P + Qt + Rt^2)e^{3t} \end{align}
(8)
\begin{align} \quad Y''(t) = 2Re^{3t} + 3(Q + 2Rt)e^{3t} + 3(Q + 2Rt)e^{3t} + 9(P + Qt + Rt^2)e^{3t} \end{align}

Substituting the values of $Y(t)$, $Y'(t)$, and $Y''(t)$ into the second order nonhomogeneous differential equation and we have that:

(9)
\begin{align} \quad \left [ 2Re^{3t} + 3(Q + 2Rt)e^{3t} + 3(Q + 2Rt)e^{3t} + 9(P + Qt + Rt^2)e^{3t} \right ] + 9 \left [ (P + Qt + Rt^2)e^{3t} + S \right ] = t^2e^{3t} + 6 \\ \quad \left ( 2R + 3Q + 3Q + 9P + 9P \right ) e^{3t} + \left ( 6R + 6R + 9Q + 9Q \right ) te^{3t} + \left ( 9R + 9R\right ) t^2e^{3t} + 9S = t^2e^{3t} + 6 \end{align}

The equation above implies that:

(10)
\begin{align} \quad 2R + 6Q + 18P = 0 \\ \quad 12R + 18Q = 0 \\ \quad 18R = 1 \\ \quad 9S = 6 \end{align}

Therefore $S = \frac{2}{3}$, $R = \frac{1}{18}$, $Q = -\frac{1}{27}$ and $P = \frac{1}{162}$. Therefore, a particular solution to the second order nonhomogeneous differential equation is $Y(t) = \left ( \frac{1}{162} - \frac{1}{27} t + \frac{1}{18} t^2 \right ) e^{3t} + \frac{2}{3}$ and so the general solution to the second order nonhomogeneous differential equation given is:

(11)
\begin{align} \quad y(t) = y_h(t) + Y(t) \\ \quad y(t) = C \cos 3t + D \sin 3t + \left ( \frac{1}{162} - \frac{1}{27} t + \frac{1}{18} t^2 \right ) e^{3t} + \frac{2}{3} \end{align}