User:Egm6321.f09.Team1.andy/HW4

= Problem 5: Non-Homogeneous L2-ODE-VC =

Given
Two non-homogeneous L2-ODE-VC are given by
 * {| style="width:100%" border="0" align="left"

a)\ (x-1)y - xy' + y = x $$ $$ b)\ xy + 2y' + xy = x $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 1)
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 2)


 * }

Find
Find the full solution for Equations (1) and (2) using,

1. Variation of parameters after knowing $$\displaystyle u_1(x) $$ and $$\displaystyle u_2(x) $$ 2. Alternative Method explained in P.21-2, P.21-3.

Solution
'''1 (a). Variation of parameters'''

The given non-homogeneous L2-ODE-VC is,


 * {| style="width:100%" border="0" align="left"

(x-1)y'' - xy' + y = x $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

The value of $$\displaystyle u_1(x) $$ for a homogeneous version of Equation (1) is given by A.C.King ,


 * {| style="width:100%" border="0" align="left"

u_1(x) = e^{x} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 3)


 * }
 * }

Using reduction of order method (2) [as per 17-2, 17-3, 17-4], another homogeneous solution $$\displaystyle u_2(x) $$ is given by,


 * {| style="width:100%" border="0" align="left"

u_2(x) = u_1(x) \int_{}^{x} \frac{1}{u_1^2(t)} e^{-\bar a_1(t)}dt $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 4)
 * }
 * }

where,


 * {| style="width:100%" border="0" align="left"

\bar a_1(t) = \int_{}^{t} a_1(s)ds $$ \ \forall \ L2-ODE-VC \rightarrow \ y''+a_1(x)y'+a_0(x)y = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 5)
 * }
 * }

For Equation (1) $$\displaystyle a_1(s) $$ is given by,


 * {| style="width:100%" border="0" align="left"

\Rightarrow a_1(s) = \frac{-s}{s-1} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\Rightarrow \bar a_1(t) = \int_{}^{t} \frac{-s}{s-1}ds $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\Rightarrow \bar a_1(t) = -\int_{}^{t} \left(\frac{s-1}{s-1} + \frac{1}{s-1} \right)ds $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\Rightarrow \bar a_1(t) = -[t+log(t-1)] $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 6)


 * }
 * }

Substituting Equations (3) & (6) into (4),


 * {| style="width:100%" border="0" align="left"

\Rightarrow u_2(x) = e^x \int_{}^{x} \frac{1}{e^{2t}} e^{[t+log(t-1)]}dt $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\Rightarrow u_2(x) = e^x \int_{}^{x} \frac{(t-1)}{e^{t}}dt $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 7)
 * }
 * }

Integrating by parts, let


 * {| style="width:100%" border="0" align="left"

dv = e^{-t} dt ; \ u = t-1; $$ \Rightarrow v = -e^{-t}; \ du = dt $$ \Rightarrow \int_{}^{x} udv = [uv]^x - \int_{}^{x} vdu $$ \Rightarrow \int_{}^{x} \frac{(t-1)}{e^{t}}dt = -(x-1)e^{-x} - \int_{}^{x} [-e^{-t}]dt $$ \Rightarrow \int_{}^{x} \frac{(t-1)}{e^{t}}dt = (1-x)e^{-x} - e^{-x} $$ \Rightarrow \int_{}^{x} \frac{(t-1)}{e^{t}}dt = (1-x-1)e^{-x} = -xe^{-x} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 8)


 * }

Substituting Equation (8) in (7),


 * {| style="width:100%" border="0" align="left"

\Rightarrow u_2(x) = -x $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 9)
 * }
 * }

Let the full solution for Equation (1) be,


 * {| style="width:100%" border="0" align="left"

y(x) = c_1(x)u_1(x) + c_2(x)u_2(x) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 10)
 * }
 * }

Then,


 * {| style="width:100%" border="0" align="left"

y' = c_1'u_1 + c_2'u_2 + c_1u_1' + c_2u_2' $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

Assume,


 * {| style="width:100%" border="0" align="left"

c_1'u_1 + c_2'u_2 = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 11)
 * }
 * }

and so,


 * {| style="width:100%" border="0" align="left"

y' = c_1u_1' + c_2u_2' $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 12)
 * }
 * }

and differentiating again,


 * {| style="width:100%" border="0" align="left"

y = c_1'u_1' + c_2'u_2' + c_1u_1 + c_2u_2'' $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 13)
 * }
 * }

Substituting Equations (10), (12) & (13) in a non-homogeneous L2-ODE-VC,


 * {| style="width:100%" border="0" align="left"

y''+a_1(x)y'+a_0(x)y = f(x) $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

We get,


 * {| style="width:100%" border="0" align="left"

\Rightarrow f(x) = c_1'u_1' + c_2'u_2' $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 14)
 * }
 * }

As per Equations (11) & (14),


 * {| style="width:100%" border="0" align="left"

\underbrace{\begin{bmatrix} u_1      & u_2 \\ u_1'      & u_2' \\ \end{bmatrix}}_{\mathbf{W}=Wronskian} \begin{bmatrix} c_1' \\ c_2' \\ \end{bmatrix} = \begin{bmatrix} 0 \\ f \\ \end{bmatrix} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

And the values of constants are given by,


 * {| style="width:100%" border="0" align="left"

c_1 = -\int_{}^{x} \frac{u_2(s)f(s)}{W}ds + A $$ $$ c_2 = \int_{}^{x} \frac{u_1(s)f(s)}{W}ds + B $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 15)
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 16)
 * }
 * }

where $$\displaystyle W $$ is the determinant of the Wronskian matrix $$\displaystyle \mathbf{W} $$.


 * {| style="width:100%" border="0" align="left"

W = \begin{vmatrix} u_1 & u_2 \\ u_1' & u_2' \end{vmatrix} = \begin{vmatrix} e^x & -x \\ e^x & -1 \end{vmatrix} \Rightarrow W = e^x(x-1) $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

Then,
 * {| style="width:100%" border="0" align="left"

\Rightarrow \int_{}^{x} \frac{u_2(s)f(s)}{W}ds = -\int_{}^{x} \frac{s^2}{e^{s}(s-1)^2}ds $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 17)
 * }
 * }

and,
 * {| style="width:100%" border="0" align="left"

\begin{align} \Rightarrow \int_{}^{x} \frac{u_1(s)f(s)}{W}ds & = \int_{}^{x} \frac{se^s}{e^{s}(s-1)^2}ds = \int_{}^{x} \left[\frac{s}{(s-1)^2}\right]ds \\ & = \int_{}^{x} \left[\frac{1}{(s-1)} + \frac{1}{(s-1)^2}\right]ds\\ & = log(x-1) - \frac{1}{(x-1)} \end{align} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 18)
 * }
 * }

Using Equations (17) & (18) in (15) & (16) and then substituting in (10), we get


 * {| style="width:100%" border="0" align="left"

\Rightarrow y(x) = e^x \left[\int_{}^{x} \frac{s^2}{e^s(s-1)^2}ds \right] + \frac{x}{x-1} - xlog(x-1) + Ae^x - Bx $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 19)
 * }
 * }

'''1 (b). Variation of parameters'''

The given non-homogeneous L2-ODE-VC is,


 * {| style="width:100%" border="0" align="left"

xy'' + 2y' + xy = x $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

The value of $$\displaystyle u_1(x) $$ for a homogeneous version of Equation (2) is given by A.C.King ,


 * {| style="width:100%" border="0" align="left"

u_1(x) = \frac{sinx}{x} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 20)


 * }
 * }

For Equation (2) $$\displaystyle a_1(s) $$ is given by,


 * {| style="width:100%" border="0" align="left"

\Rightarrow a_1(s) = \frac{2}{s} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\Rightarrow \bar a_1(t) = \int_{}^{t} \frac{2}{s}ds $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\Rightarrow \bar a_1(t) = 2log(t) $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\Rightarrow \bar a_1(t) = log(t^2) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 21)


 * }
 * }

Substituting Equations (20) & (21) into (4),


 * {| style="width:100%" border="0" align="left"

\Rightarrow u_2(x) = \frac{sinx}{x} \int_{}^{x} \frac{t^2}{sin^2t} e^{-log(t^2)}dt $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\Rightarrow u_2(x) = \frac{sinx}{x} \int_{}^{x} \frac{dt}{sin^2t} $$ \Rightarrow u_2(x) = \frac{sinx}{x} \int_{}^{x} cosec^2tdt $$ \Rightarrow u_2(x) = \frac{sinx}{x} [-cotx] = -\frac{sinx}{x} \frac{cosx}{sinx} $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

And so,
 * {| style="width:100%" border="0" align="left"

\Rightarrow u_2(x) = -\frac{cosx}{x} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

Here,


 * {| style="width:100%" border="0" align="left"

u_1'(x) = \frac{cosx}{x} -\frac{sinx}{x^2} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

u_2'(x) = \frac{sinx}{x} +\frac{cosx}{x^2} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

and the determinant of Wronskian is given by,


 * {| style="width:100%" border="0" align="left"

W = \frac{sinx}{x} \left[\frac{sinx}{x} + \frac{cosx}{x^2} \right] + \frac{cosx}{x} \left[\frac{cosx}{x} - \frac{sinx}{x^2} \right] = \frac{1}{x^2} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

Then,
 * {| style="width:100%" border="0" align="left"

\begin{align} \Rightarrow \int_{}^{x} \frac{u_2(s)f(s)}{W}ds & = -\int_{}^{x} \frac{cos(s)}{s} \frac{1}{1/s^2}ds \\ & = -\int_{}^{x} scos(s)ds \\ & = -\left[xsinx-\int_{}^{x}sin(s)ds \right] \\ & = -\left[xsinx+cosx\right] \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

\Rightarrow \int_{}^{x} \frac{u_2(s)f(s)}{W}ds = -\left[xsinx+cosx\right] $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 22)
 * }
 * }

and,
 * {| style="width:100%" border="0" align="left"

\begin{align} \Rightarrow \int_{}^{x} \frac{u_1(s)f(s)}{W}ds & = \int_{}^{x} \frac{sin(s)}{s} \frac{1}{1/s^2}ds \\ & = \int_{}^{x} (s)sin(s)ds \\ & = \left[-xcosx+\int_{}^{x}cos(s)ds \right] \\ & = \left[-xcosx+sinx\right] \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

\Rightarrow \int_{}^{x} \frac{u_1(s)f(s)}{W}ds = \left[-xcosx+sinx\right] $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 23)
 * }
 * }

Using Equations (22) & (23) in (15) & (16) and then substituting in (10), we get


 * {| style="width:100%" border="0" align="left"

\Rightarrow y(x) = \frac{sinx}{x} \left[xsinx + cosx \right] - \frac{cosx}{x} \left[-xcosx + sinx \right] + A \frac{sinx}{x} - B \frac{cosx}{x} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

and we obtain the full solution as,


 * {| style="width:100%" border="0" align="left"

\Rightarrow y(x) = 1 + A \frac{sinx}{x} - B \frac{cosx}{x} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

=References=