\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\textwidth = 6.5 in
\textheight = 9 in
\oddsidemargin = 0.0 in
\evensidemargin = 0.0 in
\topmargin = 0.0 in
\headheight = 0.0 in
\headsep = 0.0 in
\parskip = 0.2in
\parindent = 0.0in

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}{Definition}


\begin{document}






\vspace{3mm}
  
\bf IV.To solve the non-homogeneous equation
\newline
$$(1) \ \ \ y^{(n)}+p_1(x)y^{(n-1)}+\dots+p_{n-1}(x)y'+p_{n}(x)=g(x)$$

\underline{We}

1.  find a fundamental system of solutions $y_{1},
y_{2}\dots,y_{n}$ of the homogeneous equation;

2.  find a particular solution $y_p$ (any solution at all) of the
non-homogeneous equation,

3.  write the general solution as
$$y(x)=c_{1}y_{1}(x)+c_{2}y_{2}(x)+\dots+c_{n}y_{n}(x)+y_{p}(x).$$
Every solution of (1) is obtained by a unique choice of the
numbers $c_{1}, c_{2},\dots,c_{n}$.


\bf \underline {Method of Variation of Parameters}

We describe this technique for the cases $n=1, n=2$

$\bf \underline{n=1}$  \ $y' + py = g.$

 Let $y_1$ satisfy the homogeneous equation $y_1' + py_1 = 0$

	Set \framebox{$y_p = u(x)y_{1}(x)$}, \ \    $y' = u'y_1 + uy_1'$	

Substitute in the given equation

$u'y_1 = uy_1' + puy_1 = g$

$u'y_1 + u(y_1' +py_1) = g$

or
$u'y_1 = g$ since $y_1' + py_1 \equiv 0$.

$u = \displaystyle\int \frac{g(x)}{y_1(x)}dx$ so $y=uy_1$ gives

$y_p(x) = y_1(x) \displaystyle\int \frac{g(x)}{y_1(x)}dx.$
\newline
ex. $y' - 2y = x$; \ \  $y_1 = e^{2x}$ 
 
$y_p = ue^{2x}$,

$y_p' = u'e^{2x}+2ue^{2x}$


Therefore, $u'e^{2x}+2ue^{2x}-2ue^{2x}=x$ or $u'e^{2x}=x$; \ and
$u'=xe^{-2x}$ 

Thus $u=\displaystyle\int xe^{-2x}dx$ so that (since $y_p = uy_1$)

$$y_p=e^{2x}\textstyle \int xe^{-2x}dx.$$

The general solution of the given equation is

$$y(x)=ce^{2x}+e^{2x}\int xe^{-2x}dx.$$

$\bf \underline {n=2}$  $$y''+ py' + qy = g(x)$$

Let $y_1$ and $y_2$ be a fundamental system of solutions of the homogeneous
equation so that the general solution of the homogeneous equation is
$$y_c = c_1y_1(x) + c_2y_2(x)$$.

Now set $y_p = u_1(x)y_1(x) + u_2(x)y_2(x)$ where $u_1$ and $u_2$ are
unknown functions:

(1)  Differentiating, we have
$$y_p'=u_1'y_1 + u_2'y_2 + u_1y_1' + u_2y_2'.$$

(2)Now we set \ \ \ \framebox{$u_1'y_1 + u_2'y_2 = 0$}

therefore, $y_p' = u_1y_1' + u_2y_2'.$

Differentiating again, we have

(3) $y_p'' = u_1'y_1'' + u_2y_2''u_1y_1'' +u_2y_2''$

(4) Substitute in the original differential equation
$$u_1'(y_1'') + u_2'(y_2'') + u_1(y_{1}'' +py_1' +qy_1) + u_2(y_2'' + py_2'
+ qy_2) \equiv g$$ 

Since $y_1$ and $y_2$ satisfy the homogeneous equation, we have

$$\hspace*{-2in}{\bf (5)} \hspace{2in}\framebox{$u_{1}' y_1 + u_2' y_2
= g(x)$}$$

We rewrite the boxed in equations {\bf (2)} and {\bf (5)}

$$\hspace*{-2in}{\bf (6)} \hspace{2in}
(\ast)\left\{\begin{array}{l}
y_1,u_{1}' + y_2u_{2}' = 0\\
y_{1}'u_{1}' + y_{2}'u_{2}' = g
\end{array}
\right. \ $$

Since $y_1$ and $y_2$ (as well as g) are known, we have two equations for
$u_{1}'$ and $u_{2}'$.  These have a unique solution if and only if the
determinant of the coefficients is not zero, i.e.,

$$
\left|\begin{array}{cc}
y_1(x) & y_2(x)\\
y_{1}'(x) & y_{2}'(x)
\end{array}
\right|
\ne 0
$$

But since $y_1$ and $y_2$ form a fundamental system (and p, q, and g are
assumed continuous) this is the Wronskian determinant which dose not
vanish.  Therefore, equation {\bf(6)} can be solved for $u_{1}'$ and
$u_{2}'$ which in turn can be integrated and used to yield $y_p = u_1y_1 +
u_2y_2$.

If we denote the matrix
$$
\left( \begin{array}{cc}
y_1(x) & y_2(x)\\
y_{1}'(x) & y_{2}'(x)
\end{array}
\right)
\rm{ by\  } W
$$


and $\left(\begin{array}{c}u_{1}'\\ u_{2}'\end{array}\right)$ and
$\left(\begin{array} {c} 0\\ g\end{array}\right)$
by $U'$ and $G$ respectively,
we can rewrite $\bf (6)$ as

$$
\left(\begin{array} {cc} y_1 & y_2\\
y_{1}' & y_{2}'\end{array}\right) \left(\begin{array} {c}u_{1}'\\
u_{2}'\end{array}\right) = \left(\begin{array} {c} 0 \\
g\end{array}\right),$$
 
or as \hspace{1.5in} $\framebox{$WU' = G$}$

\noindent\underline{Ex}\ \  $y'' - y = x^2\ \ \ \ \ \ g(x)=x^2$
\newline
solve $y'' - y =0$ to obtain $y_1 = e^x, y_2 = e^{-x}$
\newline
Set $y_p = u_1 y_1 + u_2 y_2$
\newline
Then $u_1'$ and $u_2'$ satisfy

$$
\left(
\begin{array}{cc}
y_1 & y_2\\ y_{1}' & y_{2}' 
\end{array}
\right)
\left(
\begin{array} {c}
u_{1}'\\
u_{2}'
\end{array}
\right) 
= 
\left(
\begin{array} {c}
0 \\ g
\end{array}
\right)
$$
$$
i.e.\left(
\begin{array}{cc}
e^x & e^{-x}\\ e^x & -e^{-x} 
\end{array}
\right)
\left(
\begin{array} {c}
u_{1}'\\
u_{2}'
\end{array}
\right) 
= 
\left(
\begin{array} {c}
0 \\ x^2
\end{array}
\right).
$$

Thus,  \newline        
$e^x\ u_{1}' + e^{-x}m_{2}' = 0$ \newline
$e^x\ u_{1}' - e^{-x} u_{2}' = x^2$


adding, we find\ \ \ $2e^xu_{1}' = x^2$\ \ therefore \ \  
$m_{1}' = \frac 12 e^{-1}x^2$,\ \ $u_{1}' = \frac12 e^{-x}x^2$, \ \ and  
$u_1 = \frac 12 \displaystyle\int x^2 e^{-x} dx_1$


subtracting, we find $2e^{-x}u_{2}' = -x^2$ therefore $u_{2}' = -\frac 12
e^{x}x^2$ and $u_2 = -\frac 12 \displaystyle\int e^x x^2 dx$ 

Therefore, the general solution is
 $$y = c_1 e^x + c_2e^{-x} +
\frac{e^x}{2} \displaystyle\int x^2e^{-x}dx - \frac{1e^{-x}}{2}
\displaystyle\int x^2 e^x dx.$$ For $n \ge 3$ the same procedure will work.
\begin{itemize}
\begin{enumerate}
\item get a fundamental system $y_1, y_2, \ldots y_n$ for the homogeneous
equation.
\item Set $y_p = u_1 y_1 + u_2 y_2 + \ldots u_n g_n$.
\item $u_{1}', u_{2}' \ldots u_{n}'$ satisfy $WU' = G$
\end{enumerate}
\end{itemize}
$$
\left(
\begin{array}{cccc}
y_1 & y_2 & \ldots & y_n\\ 
y_{1}' & y_{2}' & \ldots & y_{n}'\\
\vdots & \vdots & \vdots & \vdots\\
y^{(n-1)}_{1} & y^{(n-1)}_{2} & \ldots & y^{(n-1)}_{n}  
\end{array}
\right)
\left(
\begin{array} {c}
u_{1}'\\
u_{2}'\\
\vdots\\
u_{n}'
\end{array}
\right) 
= 
\left(
\begin{array} {c}
0 \\0\\ \vdots\\g
\end{array}
\right)
$$
\underline{Ex}
$D^2(D-1)y = \sqrt x$
Solve $D^2(D-1)y=0$ to get $y_0 = c_1+c_2 x + c_3 e^x$
\newline
Set $y_p = u_1 + u_2 x + u_3 e^x$.
\newline
then
$$
W = \left(
\begin{array} {ccc}
1 & x & e^x\\
0 & 1 & e^x\\
0 & 0 & e^x
\end{array}
\right)
$$
and $u_{1}', u_{2}', u{3}'$ satisfy
$$
\left(
\begin{array}{ccc}
1 & x & e^x\\ 
0 & 1 & e^x\\
0 & 0 & e^x 
\end{array}
\right)
\left(
\begin{array} {c}
u_{1}'\\
u_{2}'\\
u_{3}'
\end{array}
\right) 
= 
\left(
\begin{array} {c}
0 \\ 
0 \\
\sqrt x
\end{array}
\right),
$$
$$u_{1}' + x u_{2}' + e^x u_{3}' = 0  \Rightarrow u_{1}' = -xu_{2}'
-e^x u_{3}' = x^{\frac 32} - \sqrt x$$
$$u_{2}' + e^x u_{3}' = 0 \Rightarrow u_{2}' = -e^x u_{3}' = -\sqrt x$$
$$e^x u_{3}' = \sqrt x \Rightarrow u_{3}' = e^{-x} \sqrt x$$
$$
\begin{array} {l} 
u_{3}' = e^{-x} \sqrt x \rm{\ \ \ therefore }\\
u_3 = \displaystyle\int \sqrt x e^{-x}
\end{array}
\left|\left|
\begin{array} {l} 
u_{2}' = - \sqrt x = -x^{\frac 12}\\
u_{2}= \frac{-2}{3} x^{\frac 32}
\end{array}
\right|\right|
\begin{array} {l} 
u_{1}' = x^{\frac 32} - x^{\frac 12}\\
u_1 = \frac 23 x^{\frac 32} - \frac 23 x^{\frac 32}
\end{array}
$$
therefore $y_p = \frac 25x^{\frac 52} - \frac 23x^{\frac 32} - \frac 23x^{\frac
32} + e^x \displaystyle\int \sqrt x e^{-x}dx$
\newline
$y_p = \frac 25x^{\frac 52} - \frac 43x^{\frac 32} + e^x \displaystyle\int \sqrt
x e^{-x}dx$
\newline
The general solution is
$$y = c_1+c_2x + c_3 e^x + \frac 25x^{\frac 52} - \frac 43x^{\frac 32} + e^x
\displaystyle\int \sqrt x e^{-x}dx$$




\end{document} 
