next up previous
Next: About this document ... Up: Labs and Projects for Previous: Labs and Projects for

Subsections


Limits of functions.

Purpose

The purpose of this lab is to use Maple to become more familiar with limits of functions, including one-sided limits.

Background

Simple limits and Maple

Limits of many functions and expressions can be computed in Maple with the limit command. Some examples are given below.
  > limit(x^2+2*x,x=2);

\begin{maplelatex}
\begin{displaymath}
8\end{displaymath}\end{maplelatex}
  > limit(sin(x)/x,x=0);

\begin{maplelatex}
\begin{displaymath}
1\end{displaymath}\end{maplelatex}
  > f := x -> (x+3)/(x^2+7*x+12) ;

\begin{maplelatex}
\begin{displaymath}
{f} := {x} \rightarrow {\displaystyle \frac {{x} + 3}{{x}^{2} + 7
\,{x} + 12}}\end{displaymath}\end{maplelatex}
  > limit(f(x),x=-3);

\begin{maplelatex}
\begin{displaymath}
1\end{displaymath}\end{maplelatex}
  > limit(f(x),x=-4);

\begin{maplelatex}
% latex2html id marker 86
\begin{displaymath}
{\it undefined}\end{displaymath}\end{maplelatex}
If the limit exists, Maple can usually find it. In cases where the limit doesn't exist, Maple gives the answer infinity for an unbounded limit or gives a range like -1..1 if the limit doesn't exist, but the expression or function is bounded. See the examples below.
  > limit(1/x,x=0);

\begin{maplelatex}
% latex2html id marker 91
\begin{displaymath}
{\it undefined}\end{displaymath}\end{maplelatex}
  > limit(sin(1/x),x=0);

\begin{maplelatex}
\begin{displaymath}
-1 .. 1\end{displaymath}\end{maplelatex}
You can also use Maple to compute limits as x goes to $\pm \infty$as shown below.
  > f(x);

\begin{maplelatex}
\begin{displaymath}
{\displaystyle \frac {{x} + 3}{{x}^{2} + 7\,{x} + 12}}\end{displaymath}\end{maplelatex}
  > limit(f(x),x=infinity);

\begin{maplelatex}
\begin{displaymath}
0\end{displaymath}\end{maplelatex}
  > limit(f(x),x= -infinity);

\begin{maplelatex}
\begin{displaymath}
0\end{displaymath}\end{maplelatex}
The formal definition for a limit is given below.

Definition 342

We say that the number L is the limit of f(x) as x approaches a provided that, given any number $\varepsilon \gt 0$, there exists a number $\delta \gt 0$ such that

\begin{displaymath}
\mid f(x) - L \mid < \varepsilon \end{displaymath}

for all x such that

\begin{displaymath}
0 < \mid x - a \mid < \delta .\end{displaymath}

This definition may seem complicated, but its graphical interpretation is not so bad. It says that if you plot f(x) - L with the y range set to $(-\varepsilon,\varepsilon)$ you can always choose a value of $\delta$small enough so that when you shrink the x plot range to $(a-\delta,a+\delta)$ and plot the function, its graph will not intersect the top or the bottom edges of your plot. For example, suppose f(x)=x2, a=2 and $\varepsilon = 0.2$. Then any value of $\delta$ smaller than about 0.049 will work. To see what is going on, look at the plots generated by the following commands.

  > f := x -> x^2;

\begin{maplelatex}
\begin{displaymath}
{f} := {x} \rightarrow {x}^{2}\end{displaymath}\end{maplelatex}
  > limit(f(x),x=2);

\begin{maplelatex}
\begin{displaymath}
4\end{displaymath}\end{maplelatex}
  > plot({-0.2,0.2,f(x)-4},x=2-0.1..2+0.1,y=-0.2..0.2);
  > plot({-0.2,0.2,f(x)-4},x=2-0.048..2+0.048,y=-0.2..0.2);
In the first of the two plot commands, the value of $\delta$ is 0.1. This is too large, since the graph intersects the lines y=-0.2 and y=0.2. The value of 0.048 for $\delta$ in the second plot command, however, is small enough, since the graph of f(x) goes off the sides of the plot. Make sure that you understand this example. If you don't understand, ask for help.

Limits of more complicated functions

It should be no secret by now that for most functions f(x) defined by a single formula, $\lim_{x \rightarrow a}
f(x) = f(a)$ when f(a) exists. For more complicated functions, this may not be true. For dealing with some of these exceptional cases, we need to define right-hand and left-hand limits. Loosely speaking, the right-hand limit of f(x) at a is L if f(x) approaches L as x approaches a from the right. That is, the values of x satisfy x > a. The left-hand limit is defined in an analogous manner, with the values of x approaching a from the left. Maple can compute these special limits with commands like those shown below. The Maple floor function is actually the greatest integer function.
  > plot(floor(x),x=0..4);
  > limit(floor(x),x=1,right);

\begin{maplelatex}
\begin{displaymath}
1\end{displaymath}\end{maplelatex}
  > limit(floor(x),x=1,left);

\begin{maplelatex}
\begin{displaymath}
0\end{displaymath}\end{maplelatex}
The floor function is one of Maple's defined functions, so you might expect things to work properly. If you define your own function in a piecewise fashion, however, a different approach is needed. For example, suppose you wanted to find the limit as x approaches 2 for the following function:

\begin{displaymath}
f(x)=\left\{ \begin{array}
{ll}
 \sqrt{2-x} & \mbox{if $x < 2$} \\  x & \mbox{if $x \geq 2$}
 \end{array} 
 \right. \end{displaymath}

You would need to execute the following commands:
  > f1 := x -> sqrt(2-x);

\begin{maplelatex}
\begin{displaymath}
{\it f1} := {x} \rightarrow {\rm sqrt}(\,2 - {x}\,)\end{displaymath}\end{maplelatex}
  > limit(f1(x),x=2,left);

\begin{maplelatex}
\begin{displaymath}
0\end{displaymath}\end{maplelatex}
  > f2 := x -> x;

\begin{maplelatex}
\begin{displaymath}
{f2} := {x} \rightarrow {x}\end{displaymath}\end{maplelatex}
  > limit(f2(x),x=2,right);

\begin{maplelatex}
\begin{displaymath}
2\end{displaymath}\end{maplelatex}
From this, we see that the limit of f as x approaches 2 does not exist since the limit from the left does not equal the limit from the right.


next up previous
Next: About this document ... Up: Labs and Projects for Previous: Labs and Projects for

Christine Marie Bonini
1/27/1999