Variation of parameters

Consider

$\displaystyle L(y) = y^{\prime\prime} + a_{1}y^{\prime} + a_{0}y = f(x) $

$y_{1}$ and $y_{2}$ be the fundamental solution of $L(y) = 0$. Let the particular solution be as follows

$\displaystyle y_{p} = u_{1}y_{1} + u_{2}y_{2} $

Here $u_{1}(x)$ and $u_{2}(x)$ are undeterminded functions. To find $u_{1}(x)$ and $u_{2}(x)$, we need two conditions. The first condition is that $y_{p} = u_{1}y_{1} + u_{2}y_{2}$ is a solution of $L(y) = f(x)$. The second condition is to make the calculation simple, that is,

$\displaystyle u_{1}^{\prime}y_{1} + u_{2}^{\prime}y_{2} = 0$

To satisfy the 1st condition, we find $y^{\prime},y^{\prime\prime}$ and substitute into $L(y) = f(x)$. Then

$\displaystyle y^{\prime} = u_{1}^{\prime}y_{1} + u_{1}y_{1}^{\prime} + u_{2}^{\prime}y_{2} + u_{2}y_{2}^{\prime} $

Now use the second condition $u_{1}^{\prime}y_{1} + u_{2}^{\prime}y_{2} = 0$,

$\displaystyle y^{\prime} = u_{1}y_{1}^{\prime} + u_{2}y_{2}^{\prime} $

Thus

$\displaystyle y^{\prime\prime} = u_{1}^{\prime}y_{1}^{\prime} + u_{1}y_{1}^{\prime\prime} + u_{2}^{\prime}y_{2}^{\prime} + u_{2}y_{2}^{\prime\prime} $

Substitute these into $L(y) = y^{\prime\prime} + a_{1}y^{\prime} + a_{0}y = f(x)$. Then

$\displaystyle (u_{1}^{\prime}y_{1}^{\prime} + u_{1}y_{1}^{\prime\prime} + u_{2}...
...y_{1}^{\prime} + u_{2}y_{2}^{\prime} ) + a_{0}(u_{1}y_{1} + u_{2}y_{2}) = f(x) $

Simplifying

$\displaystyle (u_{1}^{\prime}y_{1}^{\prime} + u_{2}^{\prime}y_{2}^{\prime}) + u...
..._{1}) + u_{2}(y_{2}^{\prime\prime} + a_{1}y_{2}^{\prime} + a_{0}y_{2}) = f(x). $

Now $y_{1}$ and $y_{2}$ are solutons of $L(y) = 0$. Thus the coefficients of $u_{1}$ and $u_{2}$ are 0. Therefore, $u_{1}^{\prime}$ and $u_{1}^{\prime}$ are solutions of the following system of equation.
$\displaystyle u_{1}^{\prime}y_{1} + u_{2}^{\prime}y_{2}$ $\displaystyle =$ 0  
$\displaystyle u_{1}^{\prime}y_{1}^{\prime} + u_{2}^{\prime}y_{2}^{\prime}$ $\displaystyle =$ $\displaystyle f(x)$  

From this, solve for $u_{1}'$ and $u_{2}'$ and then find $u_1$ and $u_2$.

To solve the above system, we use the Cramer's rule. Then

$\displaystyle u_{1}^{\prime} = \frac{-y_{2}f(x)}{\left\vert\begin{array}{rr}
y_...
...ray}{rr}
y_{1}& y_{2} \\
y_{1}^{\prime}&y_{2}^{\prime}
\end{array}\right\vert}$

Note that the denominator of the above system is Wronskian of $y_{1}$ and $y_{2}$. Since $y_{1}$ and $y_{2}$ are linearly independent. Thus by the theorem 2.5, the Wronskian is never 0. Thus we can find $u_{1}^{\prime}$ and $u_{2}^{\prime}$. By integrating with respect to $x$, we can find $u_{1}$ and $u_{2}$. Thus we can find $y_{p} = u_{1}y_{1} + u_{2}y_{2}$.

Example 2..16   Solve the differentiation equation $L(y) = y^{\prime\prime} + y = \sec{x}$.

SOLUTION The characteristic equation of $L(y) = 0$ is $m^{2} + 1 = 0$ and thus the roots are $m = \pm i$. Then the complementary solution is

$\displaystyle y_{c} = c_{1}\cos{x} + c_{2}\sin{x} $

Next we find the particular solution $y_{p}$. Since $f(x) = \sec{x}$ is not a solution of a homogeneous linear differential equation, we can not use the method of undetermined coefficients. So, we let

$\displaystyle y_{p} = u_{1}\cos{x} + u_{2}\sin{x} $

Then

$\displaystyle u_{1}^{\prime} = \frac{-\sin{x}\sec{x}}{\left\vert\begin{array}{r...
...begin{array}{rr}
\cos{x}&\sin{x} \\
-\sin{x}&\cos{x}
\end{array}\right\vert}. $

Thus,

$\displaystyle u_{1}^{\prime} = -\sin{x}\frac{1}{\cos{x}} = -\tan{x},\ u_{2}^{\prime} = \cos{x}\frac{1}{\cos{x}} = 1$

Integrate with respect to $x$, we have

$\displaystyle u_{1} = \log{\vert\cos{x}\vert} , \ u_{2} = x $

Thus the general solution is

$\displaystyle y = y_{c} + y_{p} = c_{1}\cos{x} + c_{2}\sin{x} + (\log{\vert\cos{x}\vert})\cos{x} + x\sin{x}\ensuremath{\ \blacksquare}$

Suppose that

$\displaystyle L(y) = y^{(n)} + a_{n-1}(x)y^{(n-1)} + \cdots + a_{1}(x)y^{\prime} + a_{0}(x)y = f(x) $

Let $y_{c} = c_{1}y_{1} + c_{2}y_{2} + \cdots + c_{n}y_{n}$ be the solution of $L(y) = 0$. Now replace the constants $c_{1},c_{2},\ldots,c_{n}$ by the variables $u_{1},u_{2},\ldots,u_{n}$. Then

$\displaystyle y_{p} = u_{1}y_{1} + u_{2}y_{2} + \cdots + u_{n}y_{n}$

Now $u_{1}^{\prime},u_{2}^{\prime},\ldots,u_{n}^{\prime}$ satisfy the following system.

$\displaystyle \left\{\begin{array}{ll}
u_{1}^{\prime}y_{1} + \cdots + u_{n}^{\p...
..._{1}^{(n-1)} + \cdots + u_{n}^{\prime}y_{n}^{(n-1)} &= f(x)
\end{array}\right. $

Example 2..17   Solve the following differential equation

$\displaystyle y^{\prime\prime\prime} - y^{\prime} = \frac{1}{1 + e^{x}}$

SOLUTION The characteristic equation of $y^{\prime\prime\prime} - y^{\prime} = 0$ is $m^{3} - m = 0$. Then roots are $m = 0, \pm 1$. Thus the complementary solution is

$\displaystyle y_{c} = c_{1} + c_{2}e^{x} + c_{3}e^{-x} $

Since $f(x) = 1/(1+e^{x})$, we use the variation of parameter to find the particular solution. Let

$\displaystyle y_{p} = u_{1} + u_{2}e^{x} + u_{3}e^{-x} $

Then

$\displaystyle \left\{\begin{array}{rl}
u_{1}^{\prime} + u_{2}^{\prime}e^{x} + u...
...{\prime}e^{x} + u_{3}^{\prime}e^{-x} &= \frac{1}{1 + e^{x}}
\end{array}\right. $

By the Cramer's rule, we have
$\displaystyle u_{1}^{\prime}$ $\displaystyle =$ $\displaystyle \frac{\left\vert\begin{array}{ccc}
0&e^{x}&e^{-x}\\
0&e^{x}&-e^{...
...}
\end{array}\right\vert} = \frac{1}{2}\frac{-2}{1+e^{x}} = \frac{-1}{1+e^{x}},$  
$\displaystyle u_{2}^{\prime}$ $\displaystyle =$ $\displaystyle \frac{\left\vert\begin{array}{ccc}
1&0&e^{-x}\\
0&0&-e^{-x}\\
0...
...1+e^{x}}&e^{-x}
\end{array}\right\vert}{2} = \frac{\frac{1}{2}e^{-x}}{1+e^{x}},$  
$\displaystyle u_{3}^{\prime}$ $\displaystyle =$ $\displaystyle \frac{\left\vert\begin{array}{ccc}
1&e^{x}&0\\
0&e^{x}&0\\
0&e^...
...frac{1}{1+e^{x}}
\end{array}\right\vert}{2} = \frac{\frac{1}{2}e^{x}}{1+e^{x}}.$  

Thus
$\displaystyle u_{1}$ $\displaystyle =$ $\displaystyle \int\frac{-dx}{1+e^{x}} = -\int\frac{e^{-x}dx}{e^{-x}+1} = \log{(e^{-x}+1)},$  
$\displaystyle u_{2}$ $\displaystyle =$ $\displaystyle \int\frac{\frac{1}{2}e^{-x}}{1+e^{x}}dx = \frac{1}{2}\int(e^{-x} - \frac{1}{1+e^{x}})dx = -\frac{1}{2}e^{-x} + \frac{1}{2}\log{(e^{-x}+1)},$  
$\displaystyle u_{3}$ $\displaystyle =$ $\displaystyle \frac{1}{2}\int\frac{e^{x}}{1+e^{x}} = \frac{1}{2}\log{(1+e^{x})}$  

Put these back to $y_{p}$ and we have the general solution

$\displaystyle y = y_{c} + y_{p} = c_{1} + c_{2}e^{x} + c_{3}e^{-x} -\frac{1}{2}...
...)\log{(e^{-x}+1)} + \frac{1}{2}e^{-x}\log{(1+e^{x})}\ensuremath{\ \blacksquare}$



Subsections