\documentclass{amsart}

\begin{document}
\begin{center}
{\bf LAB 5:  Power Series Solutions to ODEs}
\end{center}
{\small
\section{Introduction}

A great technique in solving differential 
equations is to change the differential equation into
one (or many) {\it algebraic} equation(s), so that
the solution to the algebraic equation will give the
solution to the differential equation.

Our ansatz is that $y$ is an analytic function (representable as a 
power series).  The expansion of $y$ about an initial time, $t=a$
can be written as:
$$
y(t)=\sum_{n=0}^{\infty} c_n(t-a)^n=c_0+c_1(t-a)+c_2(t-a)^2+\ldots
$$
(Note that $y(a)=c_0$) and
$$
y'(t)=\sum_{n=1}^{\infty}nc_n(t-a)^{n-1}=c_1+2c_2(t-a)+3c_3(t-a)^2+\ldots
$$
(Note that $y'(a)=c_1$) and
$$
y''(t)=\sum_{n=2}^{\infty}n(n-1)c_n(t-a)^{n-2}=2c_2+3\cdot 2\cdot
c_3(t-a)+\ldots
$$
Note that in general, we can define all the coefficients in
terms of the initial conditions $c_0=y(a)$ and $c_1=y'(a)$-
these will be the two unknowns (until we insert a set of initial
conditions).


Now, if we have some differential equation like:
$$
y''=y
$$
then
$$
\sum_{n=2}^{\infty}n(n-1)c_{n-2}(t-a)^{n-2}=\sum_{n=0}^{\infty}c_n(t-a)^n
\Rightarrow \sum_{n=2}^{\infty}n(n-1)c_{n-2}(t-a)^{n-2}-\sum_{n=0}^{\infty}c_n(t-a)^n=0
$$
We'd like to write this as a single sum.  Let's write out the
first few terms of the resulting polynomial to see if we can find
the pattern:
$$
(2c_2-c_0)+(3\cdot 2\cdot c_3 - c_1)(t-a)+(4\cdot 3 \cdot
c_4-c_2)(t-a)^2+\ldots
$$
From this, we see that the general term (with $n$ starting at 0)
would be:
$$
\left((n+2)(n+1)c_{n+2}-c_n\right)(t-a)^n
$$
so overall, we get:
$$
\sum_{n=0}^{\infty}\left((n+2)(n+1)c_{n+2}-c_n\right)(t-a)^n=0
$$
This means that:
$$
(n+2)(n+1)c_{n+2}=c_n
$$
Writing out the first few terms:
$$
\begin{array}{l}
c_2=\frac{1}{2}c_0\\
c_3=\frac{1}{3\cdot 2}c_1\\
c_4=\frac{1}{4\cdot 3}c_2=\frac{1}{4\cdot 3\cdot 2}c_0\\
c_5=\frac{1}{5\cdot 4}c_3=\frac{1}{5\cdot 5\cdot 4\cdot 3\cdot 2}c_1
\end{array}
$$
Thus we see that the power series is generating the exponential function,
which is what we expected.  In general, it is not possible to always
get a ``closed form'' of the solution.  
}
\newpage

\section{The Lab}

We will read over the Maple commands and examples from the website
to see how to get and analyze power series solutions to ODEs.  Once
you've done that, write up the solutions to the following problems,
including any relevant graphs.  You'll also turn in a printout
of the Maple worksheet(s) (I don't need to see the Maple output,
just your commands).
\begin{enumerate}
\item Let
$$
\frac{dy}{dt}-2y=\sin(y), \quad y(0)=1
$$
\begin{enumerate}
\item Notice that this is an autonomous first order equation.
Give the phase plot- if there are equilibria, find them.
\item Try to get an exact solution- Can Maple find one?
\item Have Maple give a series solution of order 12 (the 
polynomial part will have degree 11).  Plot the series solution
and the direction field.  Comment on the accuracy of the solution.
\end{enumerate}
\item Let
$$
(2+x^2)y''-xy'+4y=0, \quad y(0)=-1, y'(0)=3
$$
\begin{enumerate}
\item Have Maple give a series solution of order 12.  Convert
this into a polynomial, and try inserting it into the differential
equation.  What is the result?  Explain.
\item Determine the recurrence relation for the coefficients.
\item Plot several partial sums of the series solution together
on the same graph.  Estimate the interval on which your best
solution is reasonably accurate.
\end{enumerate}
\item  Consider the differential equation in the previous problem.
Maple's \verb+powseries+ commands don't allow us to use any other
initial time but $x_{\rm init}=0$.  How would I convert the
following IVP so that I can use the \verb+powseries+ commands?
$$
(2+x^2)y''-xy'+4y=0, \quad y(2)=-1, y'(2)=1
$$
Do it, and verify your solution by also using \verb+dsolve+ and compare
the series.
\item Let
$$
\cos(x)y''+xy'-2y=0
$$
\begin{enumerate}
\item Can Maple determine an exact solution?
\item  If $y(0)=0$ and $y'(0)=1$, find a series solution of order
12 and plot it in an interval about the origin.
\item  In the general case (no initial conditions), find the
first four nonzero terms in each of two linearly independent power
series solutions about the origin.
\end{enumerate}
\end{enumerate}

\end{document}
