\magnification 1200
\documentstyle{amsppt}      
\document

\centerline{\bf Mathematics 226}
\centerline{\bf Solutions to Test 2}
\bigskip
\bigskip
\noindent
{\bf1a)} We have: 
$$r^2+4r+29=0\Longrightarrow 
r=\frac{-4\pm\sqrt{16-116}}{2} \Longrightarrow r=-2\pm5i$$
Thus the general solution of the DE is:
$\boxed{y=e^{-2x}[{c_1}cos5x+{c_2}sin5x]}$ 
\bigskip
\noindent
{\bf1b)} We have:
$$r^2+12r+64=0\Longrightarrow(r+6)^2=0\Longrightarrow r=-6$$
Thus the general solution of the DE is: 
$\boxed{y=c_1e^{-6x}+c_2xe^{-6x}}$
\bigskip
\bigskip
\noindent
{\bf2a)} We have  $ r^2-9=0\Longrightarrow r=\pm3$.
  The solution to  $y''-9y=0$ is  $y_c=c_1e^{3x}+c_2e^{-3x}$.
\newline
A particular solution is of the form:  $y_p=Ax^2+Bx+C$.
If we substitute $y_p$ into the DE we obtain: $2A-9(Ax^2+Bx+C)=18x^2+5$
Therefore we have
$$ -9A=18,\  -9B=0\text{ and } 2A-9C=5$$
By solving these equations we obtain: $ A=-2,\  B=0$ and $C=-1$.
Thus the general solution is:  $\boxed{y=c_1e^{-3x}+c_2e^{-3x}-2x^2-1}$
\bigskip
\noindent
{\bf 2b)} We have:
$1=y(0)=c_1+c_2-1\Longrightarrow c_1+c_2=2$.  Since

 $y'(x)=3{c_1}e^{3x}-3{c_2}e^{-3x}-4x$ we have
$0=y'(0)=3c_1-3c_2\Longrightarrow c_1-c_2=0$.

Therefore $c_1=c_2=1$ and the solution is:
  $\boxed{y=e^{3x}+e^{-3x}-2x^2-1}$
\bigskip
\bigskip
\noindent
{\bf 3)}\ A particular solution is of the form
$$y_p=y_1u_1+y_2u_2,\ y_1=e^x,\ y_2=xe^x, \text{ where}$$

$\left\{
\aligned y_1{u'_1}+y_2{u'_2}&=0\\
y'_1{u'_1}+y'_2{u'_2}&=\frac{e^x}{x}\endaligned\right\}\ or
\left\{
\aligned {e^x}u'_1+{xe^x}u'_2&=0\\
{e^x}u'_1+(1+x){e^x}u'_2&=\frac{e^x}{x}\endaligned\right\}
\text{or}\left\{
\aligned u'_1+xu'_2&=0\\
u'_1+(1+x)u'_2&=\frac{1}{x}\endaligned\right\}$

Thus $u'_1=\frac{\vmatrix 0 & x\\ 
1/x & 1+x\endvmatrix}
{\vmatrix 1 & x\\
1 & 1+x\endvmatrix}=-1
\text{ and }u'_2=\vmatrix 1 & 0\\
1 & \frac{1}{x}\endvmatrix=\frac{1}{x}
\Longrightarrow\  u_1=-x\text{ and }u_2=lnx$.
 
Thus $y_p=-xe^x+xe^xlnx$ 
and the general solution is:
$\boxed{y=c_1e^x+{c_2}xe^x+{xe^x}lnx}$
\newpage

\noindent
{\bf 4)} We have $mu''+ku=0$. Therefore $u''+\frac{k}{m}u=0$.
 Since $k\Delta l=W$  we have  $u''+\frac{W}{m.\Delta l}u=0$.
Therefore $u''+\frac{g}{\Delta l}u=0$. since  $g=32$ and
$\Delta l=\frac{1}{2}$  we have  $u''+64u=0$.  Since $r^2+64=0$  implies
 $r=\pm i 8$ we have $u={c_1}cos8t+{c_2}sin8t$. Since
$0=u(0)=c_1$ we have $ u'=8{c_2}sin8t$. Thus $u'(0)=16=8c_2$ and
$c_2=2$. Therefore:  $\boxed{u(t)=2sin8t}$.  The period is
$T=\frac{2\pi}{8}=\frac{\pi}{4}$.   
Thus the time for 4 cycles is:  $\boxed{\pi\  \text{sec}}$

\bigskip
\bigskip
\noindent
{\bf 5a)}\ We have $y'=\sum_{n=1}^\infty {na_n}x^{n-1}$ and
$y''=\sum_{n=2}^\infty {n(n-1)a_n}x^{n-2}$.
 Thus we must have:
$$\sum_{n=2}^\infty {n(n-1)a_n}x^{n-2}+(x-1)\sum_{n=1}^\infty
{na_n}x^{n-1}+\sum_{n=0}^\infty {a_n}x^n=0$$
\noindent
or $$\sum_{n=0}^\infty (n+2)(n+1)a_{n+2}x^n+\sum_{n=0}^\infty
{na_n}x^n-\sum_{n=0}^\infty (n+1)a_{n+1}x^n+\sum_{n=0}^\infty
a_nx^n=0$$
\noindent
or $$\sum_{n=0}^\infty
[(n+2)(n+1)a_{n+2}+na_n-(n+1)a_{n+1}+a_n]x^n=0$$
\noindent
or $$(n+2)(n+1)a^{n+2}+na_n-(n+1)a_{n+1}+a_n]=0$$ 
\noindent
or
$$(n+2)(n+1)a_{n+2}-(n+1)a_{n+1}+(n+1)a_n=0$$
\noindent
or
$$\boxed{a_{n+2}=\frac{a_{n+1}-a_n}{n+2}}$$


\bigskip
\noindent
{\bf 5b)} We have $a_2=\frac{1}{2}(a_1-a_0)$ and 
$a_3=\frac{1}{3}(a_2-a_1)=\frac{1}{3}(\frac{1}{2}a_1-
\frac{1}{2}a_0-a_1)$
\noindent
or
$$\boxed{a_3=-\frac{1}{6}(a_0+a_1)}$$



\bye