** Next:** About this document ...
**Up:** Labs and Projects for
** Previous:** Labs and Projects for

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

> 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

`undefined`

or sometimes `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

> f(x);

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

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

The formal definition for a limit is given below.

**Definition **

We say that the number *L* is the *limit* of
*f*(*x*) as *x* approaches *a* provided that, given any number
, there exists a number such that

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
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 *f*(*x*)=*x ^{2}*,

> f := x -> x^2;

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

> L := 4; epsilon := 0.2; delta := 0.1;

> plot({-epsilon, epsilon, f(x) - L},x=2-delta..2+delta);

> delta := 0.048;

> plot({-epsilon, epsilon, f(x) - L},x=2-delta..2+delta);In the first of the two

> plot(floor(x),x=0..4);

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

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

The

> g := x -> piecewise(x < 0, -x, x^2+1);

The way the

The `limit` command works fine for functions that are defined
via the `piecewise` command, as shown in the example below.

> limit(g(x), x=0);

> limit(g(x),x=0, left);

> limit(g(x),x=0, right);

> plot(g(x), x=-0.1..0.1);

- 1.
- For the functions and values of
*a*given below, go through the following steps.

- i.
- Find whether the exists or not. If it does, determine the limit.
- ii.
- For the limits that exist, find a value of that works for .

- (a)
- .
- (b)
- (c)

- 2.
- Find the right- and left-hand limits of the following function at
*x*=0. Also, plot the function and relate your limits to the graph. Does exist? Explain your reasoning. - 3.
- Suppose that the function
*g*(*x*) is defined by where*a*and*b*are parameters. Can you find values for*a*and*b*that will make*g*(*x*) continuous at*x*=-1? Justify your answer.

1/18/2000