%% Created by Maple V Release 4 (APPLE_PPC_MAC)
%% Source Worksheet: SeqConv.mws
%% Generated: Sat Nov  2 09:39:16 1996
%\documentclass{article}
%\usepackage{maple2e}
%\DefineParaStyle{Heading 1}
%\DefineParaStyle{Heading 2}
%\DefineParaStyle{Maple Output}
%\DefineParaStyle{Maple Plot}
%\DefineParaStyle{Title}
%\DefineCharStyle{2D Comment}
%\DefineCharStyle{2D Math}
%\DefineCharStyle{2D Output}
%\DefineCharStyle{Hyperlink}
%\begin{document}

\begin{maplegroup}
\begin{Title}
\QTR{Hyperlink}{Real Analysis with Maple}
\end{Title}

\end{maplegroup}

\setcounter{section}{2}
\section{Sequences and Convergence}

\subsection{Plotting Sequences}

We can often gain insight into a sequence�s behavior by graphing a
selection of terms. The first plot type is to graph 
\mapleinline{inert}{2d}{n}{%
$n$%
} v. 
\mapleinline{inert}{2d}{a[n]}{%
${a_{n}}$%
}.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{a := n -> 1+1/(1+a(n-1)); 
a(1) := 1;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
a := n\rightarrow 1 + {\displaystyle \frac {1}{1 + {\rm a}(n - 1)
}} 
\]
\end{maplelatex}

\begin{maplelatex}
\[
{\rm a}(1) := 1
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{pts := [seq([k,evalf(a(k))],k=1..100)]:
plot(pts, style=point, symbol=POINT);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{3_SeqC01.eps}
\end{center}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{pts := [seq([k,evalf(a(k))], k=20..120)]:
plot(pts, style=point, symbol=POINT);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{3_SeqC02.eps}
\end{center}

\end{maplegroup}
The sequence appears to converge rapidly.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{b := n -> sin(n*Pi/2+n)*n/2;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
b := n\rightarrow {\displaystyle \frac {1}{2}} \,{\rm sin}(
{\displaystyle \frac {1}{2}} \,n\,\pi  + n)\,n
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{pts := [seq([k,evalf(b(k))], k=1..100)]:
plot(pts, style=point);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{3_SeqC03.eps}
\end{center}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot(pts);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{3_SeqC04.eps}
\end{center}

\end{maplegroup}
The second plot type examines apparent accumulation points of a
sequence.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{pts := [seq([evalf(a(k)),0],k=1..100)]:
plot(pts, 1.41..1.42, style=point, symbol=circle, axes=frame);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{3_SeqC05.eps}
\end{center}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{pts := [seq([evalf(b(k)),0],k=1..100)]:
plot(pts, style=point, symbol=circle, axes=frame);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{3_SeqC06.eps}
\end{center}

\end{maplegroup}
The third approach is to graph the \textit{phase-plane} of the
sequence, 
\mapleinline{inert}{2d}{a[n]}{%
${a_{n}}$%
} v. 
\mapleinline{inert}{2d}{a[n+1]}{%
${a_{n + 1}}$%
}.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{pts := [seq(evalf([a(k),a(k+1)]),k=1..100)]:
plot(pts, axes=frame);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{3_SeqC07.eps}
\end{center}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{pts := [seq(evalf([b(k),b(k+1)]),k=1..100)]:
plot(pts, axes=frame);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{3_SeqC08.eps}
\end{center}

\end{maplegroup}

\subsection{Limits of Sequences and Proofs}

What is the limit of 
\mapleinline{inert}{2d}{a[n]}{%
${a_{n}}$%
} where

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{a := n ->
(2*n^2+5/16*n+1/n)/(n^2-17/5*n+1-1/n);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
a := n\rightarrow {\displaystyle \frac {2\,n^{2} + 
{\displaystyle \frac {5}{16}} \,n + {\displaystyle \frac {1}{n}} 
}{n^{2} - {\displaystyle \frac {17}{5}} \,n + 1 - {\displaystyle 
\frac {1}{n}} }} 
\]
\end{maplelatex}

\end{maplegroup}
By inspection, we believe

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{Limit(a(n), n=infinity) = 2;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\displaystyle \lim _{n\rightarrow \infty }} \,{\displaystyle 
\frac {2\,n^{2} + {\displaystyle \frac {5}{16}} \,n + 
{\displaystyle \frac {1}{n}} }{n^{2} - {\displaystyle \frac {17}{
5}} \,n + 1 - {\displaystyle \frac {1}{n}} }} =2
\]
\end{maplelatex}

\end{maplegroup}
Proof. Let 
\mapleinline{inert}{2d}{epsilon>0}{%
$0 < \varepsilon $%
}. Then consider

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{abs(a(n)-2) < epsilon;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
 \left|  \! \,{\displaystyle \frac {2\,n^{2} + {\displaystyle 
\frac {5}{16}} \,n + {\displaystyle \frac {1}{n}} }{n^{2} - 
{\displaystyle \frac {17}{5}} \,n + 1 - {\displaystyle \frac {1}{
n}} }}  - 2\, \!  \right|  < \varepsilon 
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{ineq_1 := factor(");}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\it ineq\_1} := {\displaystyle \frac {1}{16}} \, \left|  \! \,
{\displaystyle \frac {569\,n^{2} + 240 - 160\,n}{5\,n^{3} - 17\,n
^{2} + 5\,n - 5}} \, \!  \right|  < \varepsilon 
\]
\end{maplelatex}

\end{maplegroup}
To increase a fraction, increase the numerator.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{y1n := 569*n^2+240-160*n;
y2n := 570*n^2;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\it y1n} := 569\,n^{2} + 240 - 160\,n
\]
\end{maplelatex}

\begin{maplelatex}
\[
{\it y2n} := 570\,n^{2}
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve(evalf(y1n<y2n),n);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\rm RealRange}( - \infty , \,{\rm Open}(-161.4861951)), \,{\rm 
RealRange}({\rm Open}(1.486195150), \,\infty )
\]
\end{maplelatex}

\end{maplegroup}
So choose

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{n1 := 2:}{%
}
\end{mapleinput}

\end{maplegroup}
To increase a fraction, decrease the denominator.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{y1d := 5*n^3-17*n^2+5*n-5;
y2d := 5/2*n^3;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\it y1d} := 5\,n^{3} - 17\,n^{2} + 5\,n - 5
\]
\end{maplelatex}

\begin{maplelatex}
\[
{\it y2d} := {\displaystyle \frac {5}{2}} \,n^{3}
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve(evalf(y1d>y2d));}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\rm RealRange}({\rm Open}(6.540981457), \,\infty )
\]
\end{maplelatex}

\end{maplegroup}
So choose

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{n2 := 7:}{%
}
\end{mapleinput}

\end{maplegroup}
Thus, for 
\mapleinline{inert}{2d}{n>max(n1,n2)}{%
${\rm max}({\it n1}, \,{\it n2}) < n$%
}, 

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{1/16*y1n/y1d < 1/16*y2n/y2d;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\displaystyle \frac {1}{16}} \,{\displaystyle \frac {569\,n^{2}
 + 240 - 160\,n}{5\,n^{3} - 17\,n^{2} + 5\,n - 5}}  < 
{\displaystyle \frac {57}{4}} \,{\displaystyle \frac {1}{n}} 
\]
\end{maplelatex}

\end{maplegroup}
We arrive at

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{ineq_2 := 1/16*y2n/y2d < epsilon;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\it ineq\_2} := {\displaystyle \frac {57}{4}} \,{\displaystyle 
\frac {1}{n}}  < \varepsilon 
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{ineq_2*n/epsilon;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\displaystyle \frac {57}{4}} \,{\displaystyle \frac {1}{
\varepsilon }}  < n
\]
\end{maplelatex}

\end{maplegroup}
Whence, we choose 
\mapleinline{inert}{2d}{N}{%
$N$%
} to be

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{N := max(57/4/epsilon, n1, n2);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
N := {\rm max}(7, \,{\displaystyle \frac {57}{4}} \,
{\displaystyle \frac {1}{\varepsilon }} )
\]
\end{maplelatex}

\end{maplegroup}
The limit is established.

\subsection{Additional Activities}

Students can be asked to investigate:

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{_seed := 123456789: }{%
}{\small student's social security number
\mapleinline{active}{1d}{
params := expons=rand(-3..3),
          coeffs=rand(-9..9):
randpoly(n, params):
num := sort("):
randpoly(n, params):
den := sort("):
a := unapply(num/den, n);}{%
}}
\end{mapleinput}

\end{maplegroup}
Exercises like these give a �sense of ownership� to students.

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