The Method of Variation of Parameters Examples 1

# The Method of Variation of Parameters Examples 1

Recall from The Method of Variation of Parameters page that if we want to solve a second order nonhomogenous differential equation that is not suitable for the method of undetermined coefficients, then we can apply the method of variation of parameters often times.

We first solve the corresponding second order homogeneous differential equation to get the solution $y_h(t) + Cy_1(t) + Dy_2(t)$ where $y_1(t)$ and $y_2(t)$ form a fundamental set of solutions. We then replaced the constants $C$ and $D$ with functions $u_1(t)$ and $u_2(t)$ and assumed the form of a particular solution $Y(t)$ to be:

(1)
\begin{align} \quad Y(t) = u_1(t) y_1(t) + u_2(t) y_2(t) \end{align}

When we differentiated $Y(t)$ we obtained:

(2)
\begin{align} \quad Y'(t) =u_1'(t) y_1(t) + u_1(t) y_1'(t) + u_2'(t) y_2(t) + u_2(t) y_2'(t) \end{align}

We set $u_1'(t) y_1(t) + u_2'(t) y_2(t) = 0$ to get that:

(3)
\begin{align} \quad Y'(t) = u_1(t) y_1'(t) + u_2(t) y_2'(t) \end{align}

When we differentiate again we get that:

(4)
\begin{align} \quad Y''(t) = u_1'(t)y_1'(t) + u_1(t)y_1''(t) + u_2'(t)y_2'(t) + u_2(t)y_2''(t) \end{align}

When we plugged the values of $Y(t)$, $Y'(t)$, and $Y''(t)$ into our differential equation, we say that $u_1'(t)y_1'(t) + u_2'(t)y_2'(t) = g(t)$.

Therefore, we could then solve for $u_1'(t)$ and $u_2'(t)$ by solving the following system of equations:

(5)
\begin{align} \left\{\begin{matrix} u_1'(t) y_1(t) + u_2'(t) y_2(t) = 0 \\ u_1'(t)y_1'(t) + u_2'(t)y_2'(t) = g(t) \end{matrix}\right. \end{align}

A unique solution exists provided that the Wronskian $W(y_1, y_2) \neq 0$ which is assured provided that $y_1(t)$ and $y_2(t)$ form a fundamental set of solutions. Cramer's rule can be used to find the solution to the system.

We can then integrate $u_1'(t)$ and $u_2'(t)$ to obtain $u_1(t)$ and $u_2(t)$ for our particular solution.

We will now look at some examples of applying the method of variation of parameters.

## Example 1

Use the method of variation of parameters to solve the differential equation $\frac{d^2y}{dt^2} + 9y = 9 \sec^2 3t$ for $0 < t < \frac{\pi}{6}$.

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

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

Note that $y_1(t) = \cos 3t$ and $y_2(t) = \sin 3t$. Now let $Y(t) = u_1(t)y_1(t) + u_2(t)y_2(t)$. We want to solve the following system of equations:

(7)
\begin{align} \left\{\begin{matrix} u_1'(t) \cos 3t + u_2'(t) \sin 3t = 0 \\ u_1'(t)(-3 \sin 3t) + u_2'(t)(3 \cos 3t)= 9 \sec^2 3t \end{matrix}\right. \end{align}

Using Cramer's rule, we have that:

(8)
\begin{align} \quad u_1'(t) = \frac{\begin{vmatrix} 0 & \sin 3t\\ 9 \sec^2 3t & 3 \cos 3t \end{vmatrix}}{\begin{vmatrix}\cos 3t & \sin 3t\\ -3 \sin 3t & 3 \cos 3t \end{vmatrix}} = \frac{- 9\sin 3t \sec^2 3t }{3 \cos^2 3t+ 3 \sin^2 3t} = - 3\sin 3t \sec^2 3t = -3 \tan 3t \sec 3t \end{align}
(9)
\begin{align} \quad u_2'(t) = \frac{\begin{vmatrix} \cos 3t & 0\\ -2 \sin 3t & 9 \sec^2 3t \end{vmatrix}}{\begin{vmatrix}\cos 3t & \sin 3t\\ -3 \sin 3t & 3 \cos 3t \end{vmatrix}} = \frac{9\cos 3t \sec^2 3t}{3 \cos^2 3t + 3 \sin^2 3t} = 3 \cos 3t \sec^2 3t = 3 \sec 3t \end{align}

We have that $u_1'(t) = -3 \tan 3t \sec 3t$ so $u_1(t) = \sec 3t$.

Furthermore, $u_2'(t) = 3 sec 3t$, so $u_2(t) = \ln (\tan 3t + \sec 3t)$.

Therefore we have that:

(10)
\begin{align} \quad Y(t) = u_1(t)y_1(t) + u_2(t)y_2(t) \\ \quad Y(t) = -\sec 3t \cos 3t + \ln (\tan 3t + \sec 3t) \sin 3t \end{align}

The general solution to this differential equation is therefore:

(11)
\begin{align} \quad y(t) = y_h(t) + Y(t) \\ \quad y(t) = C \cos 3t + D \sin 3t -\sec 3t \cos 3t + \ln (\tan 3t + \sec 3t) \sin 3t \\ \quad y(t) = C \cos 3t + D \sin 3t + \ln (\tan 3t + \sec 3t ) - 1 \end{align}