%% Created by Maple V Release 4 (APPLE_PPC_MAC)
%% Source Worksheet: LimitsFcn.mws
%% Generated: Sat Nov  2 09:57:50 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}{3}
\section{Limits of Functions}

\subsection{Limit of a Function at a Point}

Find the limit 

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f := x -> 1/(sqrt(x^3+1));}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
f := x\rightarrow {\displaystyle \frac {1}{\sqrt{x^{3} + 1}}} 
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{a := 1:
L := value(subs(x=a, f(x))):
Limit(f(x), x=a) = L;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\displaystyle \lim _{x\rightarrow 1}} \,{\displaystyle \frac {1
}{\sqrt{x^{3} + 1}}} ={\displaystyle \frac {1}{2}} \,\sqrt{2}
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot(\{L,f(x)\}, x=0..2);}{%
}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{4_Limi01.eps}
\end{center}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{Digits := 4:
X1 := evalf([`x`,seq(a-(10-i)/100, i=1..9)]):
X2 := evalf([`x`,seq(a+(10-i)/100, i=1..9)]):
Y1 := map(f,X1):
Y2 := map(f,X2):
linalg[augment](X1,Y1,X2,Y2);
Digits := 10:}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
 \left[ 
{\begin{array}{cccc}
x & {\displaystyle \frac {1}{\sqrt{x^{3} + 1}}}  & x & 
{\displaystyle \frac {1}{\sqrt{x^{3} + 1}}}  \\ [2ex]
.9100 & .7553 & 1.090 & .6601 \\
.9200 & .7496 & 1.080 & .6653 \\
.9300 & .7446 & 1.070 & .6702 \\
.9400 & .7391 & 1.060 & .6757 \\
.9500 & .7337 & 1.050 & .6807 \\
.9600 & .7283 & 1.040 & .6859 \\
.9700 & .7231 & 1.030 & .6911 \\
.9800 & .7179 & 1.020 & .6964 \\
.9900 & .7123 & 1.010 & .7018
\end{array}}
 \right] 
\]
\end{maplelatex}

\end{maplegroup}
Algebraic, numeric, and graphic evidence suggests 
\mapleinline{inert}{2d}{Limit(f(x),x=1)=sqrt(2)/2}{%
$\lim _{x\rightarrow 1}\,{\rm f}(x)=\frac {\sqrt{2}}{2}$%
}.

\subsection{``\protect{$\varepsilon -\delta $}'' Proofs}
Let 
\mapleinline{inert}{2d}{epsilon}{%
$\varepsilon $%
} \TEXTsymbol{>} 0. Then we must show there is a 
\mapleinline{inert}{2d}{delta}{%
$\delta $%
} \TEXTsymbol{>} 0, such that, if 
\mapleinline{inert}{2d}{abs(x-a)}{%
$ \left|  \! \,x - a\, \!  \right| $%
} \TEXTsymbol{<} 
\mapleinline{inert}{2d}{delta}{%
$\delta $%
}, then 
\mapleinline{inert}{2d}{abs(f(x)-L)}{%
$ \left|  \! \,{\rm f}(x) - L\, \!  \right| $%
} \TEXTsymbol{<} 
\mapleinline{inert}{2d}{epsilon}{%
$\varepsilon $%
}. So consider

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f(x)-L;
expr_1 := normal(");}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\displaystyle \frac {1}{\sqrt{x^{3} + 1}}}  - {\displaystyle 
\frac {1}{2}} \,\sqrt{2}
\]
\end{maplelatex}

\begin{maplelatex}
\[
{\it expr\_1} :=  - {\displaystyle \frac {1}{2}} \,
{\displaystyle \frac { - 2 + \sqrt{2}\,\sqrt{x^{3} + 1}}{\sqrt{x
^{3} + 1}}} 
\]
\end{maplelatex}

\end{maplegroup}
``Rationalize the numerator.''

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{expr_2 := 
 -expand(numer(expr_1)*(2+sqrt(2)*sqrt(x^3+1)))/}{%
}
\mapleinline{active}{1d}{expand(denom(expr_1)*(2+sqrt(2)*sqrt(x^3+1))) ;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\it expr\_2} :=  - {\displaystyle \frac {2 - 2\,x^{3}}{4\,\sqrt{
x^{3} + 1} + 2\,\sqrt{2}\,x^{3} + 2\,\sqrt{2}}} 
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{expr_3 :=
factor(numer(expr_2))/denom(expr_2);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\it expr\_3} := {\displaystyle \frac {(x - 1)\,(x^{2} + x + 1)}{
2\,\sqrt{x^{3} + 1} + \sqrt{2}\,x^{3} + \sqrt{2}}} 
\]
\end{maplelatex}

\end{maplegroup}
Substitute 
\mapleinline{inert}{2d}{delta}{%
$\delta $%
} for 
\mapleinline{inert}{2d}{x-1}{%
$x - 1$%
}.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{expr_4 := subs(x-1=delta, expr_3);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\it expr\_4} := {\displaystyle \frac {\delta \,(x^{2} + x + 1)}{
2\,\sqrt{x^{3} + 1} + \sqrt{2}\,x^{3} + \sqrt{2}}} 
\]
\end{maplelatex}

\end{maplegroup}
Assume that 
\mapleinline{inert}{2d}{delta}{%
$\delta $%
} \TEXTsymbol{<} 1. Then, for  
\mapleinline{inert}{2d}{abs(x-1)}{%
$ \left|  \! \,x - 1\, \!  \right| $%
} \TEXTsymbol{<} 
\mapleinline{inert}{2d}{delta}{%
$\delta $%
}, it follows that 
\mapleinline{inert}{2d}{0<x}{%
$0 < x$%
} and 
\mapleinline{inert}{2d}{x}{%
$x$%
} \TEXTsymbol{<} 2. Thence,

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{expr_4 <
subs(x=2,numer(expr_4))/subs(x=0,denom(expr_4));}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\displaystyle \frac {\delta \,(x^{2} + x + 1)}{2\,\sqrt{x^{3} + 
1} + \sqrt{2}\,x^{3} + \sqrt{2}}}  < 7\,{\displaystyle \frac {
\delta }{2 + \sqrt{2}}} 
\]
\end{maplelatex}

\end{maplegroup}
So that

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{ineq_1 := abs(f(x)-L) <
7*delta/(2+2^(1/2));}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\it ineq\_1} :=  \left|  \! \,{\displaystyle \frac {1}{\sqrt{x^{
3} + 1}}}  - {\displaystyle \frac {1}{2}} \,\sqrt{2}\, \! 
 \right|  < 7\,{\displaystyle \frac {\delta }{2 + \sqrt{2}}} 
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{ineq_2 := rhs(ineq_1) < epsilon;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\it ineq\_2} := 7\,{\displaystyle \frac {\delta }{2 + \sqrt{2}}
}  < \varepsilon 
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{delta < rhs(ineq_2)*(2+sqrt(2))/7;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
\delta  < {\displaystyle \frac {1}{7}} \,\varepsilon \,(2 + 
\sqrt{2})
\]
\end{maplelatex}

\end{maplegroup}
Choosing

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{delta < min(rhs("),1);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
\delta  < {\rm min}(1, \,{\displaystyle \frac {1}{7}} \,
\varepsilon \,(2 + \sqrt{2}))
\]
\end{maplelatex}

\end{maplegroup}
and 
\mapleinline{inert}{2d}{abs(x-1)}{%
$ \left|  \! \,x - 1\, \!  \right| $%
} \TEXTsymbol{<} 
\mapleinline{inert}{2d}{delta}{%
$\delta $%
} guarantees that 
\mapleinline{inert}{2d}{abs(f(x)-L)<epsilon}{%
$ \left|  \! \,{\rm f}(x) - L\, \!  \right|  < \varepsilon $%
} establishing

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{Limit(f(x),x=a) = L;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
{\displaystyle \lim _{x\rightarrow 1}} \,{\displaystyle \frac {1
}{\sqrt{x^{3} + 1}}} ={\displaystyle \frac {1}{2}} \,\sqrt{2}
\]
\end{maplelatex}

\end{maplegroup}

\subsection{Additional Activities}

Limits of piecewise defined functions can be interesting.

\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f := x -> piecewise(x<1,a*x^2,3-x^3);
'f(x)' = f(x);}{%
}
\end{mapleinput}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f := x -> piecewise(x<1,x+2,x<2,2-x,1-x^2);}{%
}
\mapleinline{active}{1d}{'f(x)' = f(x);}{%
}
\mapleinline{active}{1d}{plot(f(x),x=0..5, discont=true);}{%
}
\end{mapleinput}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f := x -> piecewise(x<>0, sin(x)/x,1):
'f(x)' = f(x);}{%
}
\end{mapleinput}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f := x -> piecewise(x<>0, cos(x)/x,a):
'f(x)' = f(x);}{%
}
\end{mapleinput}

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