%% Created by Maple V Release 4 (LINUX INTEL UNIX)
%% Source Worksheet: series_ex.mws
%% Generated: Sun Apr 11 03:15:36 1999
\documentclass{article}
\usepackage{maple2e}
\DefineParaStyle{Maple Output}
\DefineParaStyle{Maple Plot}
\DefineCharStyle{2D Math}
\DefineCharStyle{2D Output}
\begin{document}
\begin{maplegroup}
\begin{center}
\textbf{{\large Series solutions with Maple}}
\end{center}

\begin{mapleinput}
\mapleinline{active}{1d}{with(DEtools):}{%
}
\end{mapleinput}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{Order:=10:}{%
}
\end{mapleinput}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{dsolve(\{diff(y(x),x$2)+x*diff(y(x),x)+y(x)=0
,y(2)=3,D(y)(2)=1\},y(x),series);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\begin{eqnarray*}
\lefteqn{{\rm y}(x)=3 + x - 2 - {\displaystyle \frac {5}{2}} \,(x
 - 2)^{2} + {\displaystyle \frac {4}{3}} \,(x - 2)^{3} - 
{\displaystyle \frac {1}{24}} \,(x - 2)^{4} - {\displaystyle 
\frac {1}{4}} \,(x - 2)^{5} + {\displaystyle \frac {13}{144}} \,(
x - 2)^{6} + {\displaystyle \frac {5}{504}} } \\
 & & (x - 2)^{7} - {\displaystyle \frac {37}{2688}} \,(x - 2)^{8}
 + {\displaystyle \frac {71}{36288}} \,(x - 2)^{9} + {\rm O}((x
 - 2)^{10})\mbox{\hspace{148pt}}
\end{eqnarray*}
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot(3+x-2-5/2*(x-2)^2+4/3*(x-2)^3-1/24*(x-2)
^4-1/4*(x-2)^5+13/144*(x-2)^6+5/504*(x-2)^7-37/2688*(x-2)^8+71/36288*(
x-2)^9,x=0..4,color=black,thickness=3);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{series01.eps}
\end{center}

\end{maplegroup}
\begin{maplegroup}
We can compare this with a plot of the numerical solution. What
happens if x=0..6 instead?

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{DEplot(\{diff(y(x),x$2)+x*diff(y(x),x)+y(x)=0
\},\{y(x)\},x=0..4,[[y(2)=3,D(y)(2)=1]],linecolor=black);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{series02.eps}
\end{center}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\end{mapleinput}

\end{maplegroup}
\end{document}
%% End of Maple V Output
