Variation of Parameters

In the previous section, calculation of particular integrals/solutions for some special cases have been studied. Recall that the homogeneous part of the equation had constant coefficients. In this section, we deal with a useful technique of finding a particular solution when the coefficients of the homogeneous part are continuous functions and the forcing function $ f(x)$ (or the non-homogeneous term) is piecewise continuous. Suppose $ y_1$ and $ y_2$ are two linearly independent solutions of

$\displaystyle y^{\prime\prime} + q(x) y^\prime + r(x) y = 0$ (8.5.1)

on $ I,$ where $ q(x)$ and $ r(x)$ are arbitrary continuous functions defined on $ I.$ Then we know that

$\displaystyle y = c_1 y_1 + c_2 y_2$

is a solution of (8.5.1) for any constants $ c_1$ and $ c_2.$ We now ``vary" $ c_1$ and $ c_2$ to functions of $ x,$ so that

$\displaystyle y = u(x) y_1 + v(x) y_2, \;\; x \in I$ (8.5.2)

is a solution of the equation

$\displaystyle y^{\prime\prime} + q(x) y^\prime + r(x) y = f(x), \;\; {\mbox{ on }} \; I,$ (8.5.3)

where $ f$ is a piecewise continuous function defined on $ I.$ The details are given in the following theorem.

THEOREM 8.5.1 (Method of Variation of Parameters)   Let $ q(x)$ and $ r(x)$ be continuous functions defined on $ I$ and let $ f$ be a piecewise continuous function on $ I.$ Let $ y_1$ and $ y_2$ be two linearly independent solutions of (8.5.1) on $ I.$ Then a particular solution $ y_p$ of (8.5.3) is given by

$\displaystyle y_p = - y_1 \int \frac{y_2 f(x)}{W} dx + y_2 \int \frac{y_1 f(x)}{W} dx,$ (8.5.4)

where $ W = W(y_1, y_2)$ is the Wronskian of $ y_1$ and $ y_2.$ (Note that the integrals in (8.5.4) are the indefinite integrals of the respective arguments.)

Proof. Let $ u(x)$ and $ v(x)$ be continuously differentiable functions (to be determined) such that

$\displaystyle y_p = u y_1 + v y_2, \;\; x \in I$ (8.5.5)

is a particular solution of (8.5.3). Differentiation of (8.5.5) leads to

$\displaystyle y_p^\prime = u y_1^\prime + v y_2^\prime + u^\prime y_1 + v^\prime y_2.$ (8.5.6)

We choose $ u$ and $ v$ so that

$\displaystyle u^\prime y_1 + v^\prime y_2=0.$ (8.5.7)

Substituting (8.5.7) in (8.5.6), we have

$\displaystyle y_p^\prime = u y_1^\prime + v y_2^\prime, \; {\mbox{ and }} \; y...
...me\prime} + v y_2^{\prime\prime} + u^\prime y_1^\prime + v^\prime y_2^\prime.$ (8.5.8)

Since $ y_p$ is a particular solution of (8.5.3), substitution of (8.5.5) and (8.5.8) in (8.5.3), we get

$\displaystyle u \bigl( y_1^{\prime\prime} + q(x) y_1^\prime + r(x) y_1 \bigr)
...
...2^\prime + r(x) y_2 \bigr)
+ u^\prime y_1^\prime + v^\prime y_2^\prime = f(x).$

As $ y_1$ and $ y_2$ are solutions of the homogeneous equation (8.5.1), we obtain the condition

$\displaystyle u^\prime y_1^\prime + v^\prime y_2^\prime = f(x).$ (8.5.9)

We now determine $ u$ and $ v$ from (8.5.7) and (8.5.9). By using the Cramer's rule for a linear system of equations, we get

$\displaystyle u^\prime = - \frac{ y_2 f(x)}{W} \;\; {\mbox{ and }} \;\; v^\prime = \frac{ y_1 f(x)}{W}$ (8.5.10)

(note that $ y_1$ and $ y_2$ are linearly independent solutions of (8.5.1) and hence the Wronskian, $ W \neq 0$ for any $ x \in I$ ). Integration of (8.5.10) give us

$\displaystyle u = - \int \frac{ y_2 f(x)}{W} dx \;\; {\mbox{ and }} \;\; v = \int \frac{ y_1 f(x)}{W} dx$ (8.5.11)

( without loss of generality, we set the values of integration constants to zero). Equations (8.5.11) and (8.5.5) yield the desired results. Thus the proof is complete. height6pt width 6pt depth 0pt

Before, we move onto some examples, the following comments are useful.

Remark 8.5.2  
  1. The integrals in (8.5.11) exist, because $ y_2$ and $ W (\neq 0)$ are continuous functions and $ f$ is a piecewise continuous function. Sometimes, it is useful to write (8.5.11) in the form

    $\displaystyle u = - \int_{x_0}^x \frac{ y_2(s) f(s)}{W(s)} ds \;\; {\mbox{ and }} \;\;
v = \int_{x_0}^x \frac{ y_1(s) f(s)}{W(s)} ds $

    where $ x \in I$ and $ x_0$ is a fixed point in $ I.$ In such a case, the particular solution $ y_p$ as given by (8.5.4) assumes the form

    $\displaystyle y_p = - y_1 \int_{x_0}^x \frac{y_2(s) f(s)}{W(s)} ds + y_2 \int)_{x_0}^x \frac{y_1(s) f(s)}{W(s)} ds$ (8.5.12)

    for a fixed point $ x_0 \in I$ and for any $ x \in I.$
  2. Again, we stress here that, $ q$ and $ r$ are assumed to be continuous. They need not be constants. Also, $ f$ is a piecewise continuous function on $ I.$
  3. A word of caution. While using (8.5.4), one has to keep in mind that the coefficient of $ y^{\prime\prime}$ in (8.5.3) is $ 1.$

EXAMPLE 8.5.3  
  1. Find the general solution of

    $\displaystyle y^{\prime\prime} + y = \frac{1}{2 + \sin x}, \;\; x \geq 0.$


    Solution: The general solution of the corresponding homogeneous equation $ y^{\prime\prime} + y = 0$ is given by

    $\displaystyle y_h = c_1 \cos x + c_2 \sin x.$

    Here, the solutions $ y_1 = \sin x$ and $ y_2 = \cos x$ are linearly independent over $ I = [0, \infty)$ and $ W = W(\sin x, \cos x) = 1.$ Therefore, a particular solution, $ y_h,$ by Theorem 8.5.1, is
    $\displaystyle y_p$ $\displaystyle =$ $\displaystyle - y_1 \int \frac{y_2}{2 + \sin x} dx + y_2 \int
\frac{y_1}{2 + \sin x} dx$  
      $\displaystyle =$ $\displaystyle \sin x \int \frac{\cos x}{2 + \sin x} dx + \cos x \int
\frac{\sin x}{2 + \sin x} dx$  
      $\displaystyle =$ $\displaystyle -sin x \; {\mbox{ln}}(2 + \sin x) + \cos x \; ( x - 2
\int \frac{1}{2 + \sin x} dx ).$ (8.5.13)

    So, the required general solution is

    $\displaystyle y = c_1 \cos x + c_2 \sin x + y_p$

    where $ y_p$ is given by (8.5.13).

  2. Find a particular solution of

    $\displaystyle x^2 y^{\prime\prime} - 2 x y^\prime + 2 y = x^3, \; x > 0.$


    Solution: Verify that the given equation is

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

    and two linearly independent solutions of the corresponding homogeneous part are $ y_1 = x$ and $ y_2 = x^2.$ Here

    $\displaystyle W = W(x, x^2) = \begin{vmatrix}x & x^2 \\ 1 & 2 x \end{vmatrix} = x^2,
\;\; x > 0.$

    By Theorem 8.5.1, a particular solution $ y_p$ is given by
    $\displaystyle y_p$ $\displaystyle =$ $\displaystyle - x \int \frac{x^2 \cdot x}{x^2} dx + x^2 \int
\frac{x \cdot x}{x^2} dx$  
      $\displaystyle =$ $\displaystyle - \frac{x^3}{2} + x^3 = \frac{x^3}{2}.$  

    The readers should note that the methods of Section 8.7 are not applicable as the given equation is not an equation with constant coefficients.

EXERCISE 8.5.4  
  1. Find a particular solution for the following problems:
    1. $ y^{\prime\prime} + y = f(x), \;\; 0 \leq x \leq 1$ where $ f(x) = \left\{ \begin{array}{ll} 0 & \;\; {\mbox{ if }}
\;\; 0 \leq x < \frac...
... \\ 1 & \;\; {\mbox{ if }} \;\;
\frac{1}{2} \leq x \leq 1. \end{array} \right.$
    2. $ y^{\prime\prime} + y = 2 \sec x$ for all $ x \in (0,
\frac{\pi}{2}).$
    3. $ y^{\prime\prime} - 3 y^\prime +
2y = - 2 \cos (e^{-x}), \;\; x > 0.$
    4. $ x^2
y^{\prime\prime} + x y^\prime - y = 2 x, \;\; x> 0.$
  2. Use the method of variation of parameters to find the general solution of
    1. $ y^{\prime\prime} - y = - e^x $ for all $ x \in {\mathbb{R}}.$
    2. $ y^{\prime\prime} + y = \sin x$ for all $ x \in {\mathbb{R}}.$
  3. Solve the following IVPs:
    1. $ y^{\prime\prime} + y = f(x), \;\; x \geq 0$ where $ f(x) = \left\{ \begin{array}{ll} 0 & \;\; {\mbox{ if }} \;\; 0
\leq x < 1 \\ 1 & \;\; {\mbox{ if }} \;\; x \geq 1.
\end{array} \right.$ with $ y(0) = 0= y^\prime(0).$
    2. $ y^{\prime\prime} - y = \vert x\vert $ for all $ x \in [-1,
\infty)$ with $ y(-1) = 0$ and $ y^\prime(-1) = 1.$

A K Lal 2007-09-12