The purpose of this lab is to use Maple to become more familiar with limits of functions, including one-sided limits.
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);

> limit(sin(x)/x,x=0);

> f := x -> (x+3)/(x^2+7*x+12) ;

> limit(f(x),x=-3);

> limit(f(x),x=-4);

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);

> limit(sin(1/x),x=0);

You can also use Maple to compute limits as x goes to
as shown below.
> f(x);

> limit(f(x),x=infinity);

> limit(f(x),x= -infinity);

The formal definition for a limit is given below.

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

> limit(f(x),x=2);

> 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
is
. This is too large, since the graph intersects the lines
and
. The value of
for
in the second
plot command, however, is small enough, since the graph of
goes off the sides of the plot. Make sure that you understand
this example. If you don't understand, ask for help.
It should be no secret by now that for most
functions
defined by a single formula,
when
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
at a is L if
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);

> limit(floor(x),x=1,left);

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, things don't go so smoothly. See the example below.
> f := x -> if x < 0 then -x else x^2+1 fi ;
f := proc(x) options operator,arrow; if x < 0 then -x else x^2+1 fi end
> limit(f(x),x=0);
Error, (in f) cannot evaluate boolean
> limit(f(x),x=0,left);
Error, (in f) cannot evaluate boolean
> limit(f(x),x=1);
Error, (in f) cannot evaluate boolean
The problem is that Maple can't evaluate the if statement in the
definition of
unless x has a numerical value. The solution in
a case like this is to plot the graph of the function or compute
values of the function near a, as shown in the following
examples. The quotes in the plot command in the example tell
Maple to wait until it has a numerical value for x before it tries
to evaluate
.
> plot('f(x)',x=-0.1..0.1);
> evalf(f(-0.01));

> evalf(f(-0.0001));

Using these commands as examples, you should be able to figure out
that
and that
.
exists or
not. If it does, determine the limit.
that
works for
.
.


Does
exist? Explain your reasoning.
is defined by

where a and b are parameters. Can you find values for a and b
that will make
continuous at x=0? Justify your answer.