Laboratory 2 
Limits of Functions

Introduction

In this laboratory, we attempt to gain an intuitive feel for the idea of limit. In the next laboratory, we shall see how the existence of limits helps us to solve the problem of finding the slope of tangents to curves. Before proceeding with the lab, you should review the tutorials on user defined functions and on calculation of limits.

2.1  Limits and Continuity

Recall the ϵ,δ-definition of limit: If y=f(x) is a function defined on an open interval containing x=a (except possibly at a itself), then (lim_(x->a))f(x)=L means that for any given real number ϵ>0, there is a real number δ>0 such that |f(x)-L|<ϵ whenever 0<|x-a|<δ. In particular, when f(x) is also defined at x=a, we say that f(x) is continuous at x=a if (lim_(x->a)) f(x)=f(a). We can interpret these definitions in terms of the graph of f(x) in the following way: Roughly speaking, f(x) has limit L at x=a if no matter how small we make the height of a viewing window centered at the point (a,L) (we use ϵ to control this height), we can find a width δ  such that when we graph f(x) within this viewing window, all of the graph is visible. To help with visualization, we will use this module:

epsilonDelta[g_,a_,L_]:=Module[{x,f,x0,y0},f[x_]=g[x];x0=a;y0=L;
Manipulate[
GraphicsRow[
{Plot[f[x],{x,x0-delta,x0+delta},PlotRange->{y0-eps,y0+eps},ImagePadding->15,ImageSize->300],
Show[{Plot[f[x],{x,x0-0.6,x0+0.6},PlotRange->{y0-0.6,y0+0.6},ImageSize->300],
Graphics[{{Red,Line[{{x0-0.65,y0-eps},{x0+0.65,y0-eps}, {x0+0.65,y0+eps},{x0-0.65,y0+eps}}]},
{Red,Line[{{x0-delta,y0-0.65},{x0-delta,y0+0.65},{x0+delta,y0+0.65},{x0+delta,y0-0.65}}]}}]}]}],
{{eps,0.5,"ϵ"},0.5,10^(-7)},{{delta,0.5,"δ"},0.5,10^(-7)},LabelStyle->Medium]
]

The parameters are: the function to be tested, the point a, and a possible limit value L. The module returns two dynamic plots of the graph: to the left, we see a plot of the graph within the viewing window defined by the inequalities a-δ≤x≤a+δ and L-ϵ≤y≤L+ϵ; to the right, we see a plot of the graph within the viewing window  a-0.65≤x≤a+0.65 and L-0.65≤y≤L+0.65 and the vertical and horizontal lines that carve out the smaller viewing window displayed to the left. Thus, in effect, the plot on the left is a blown-up version of the part of the plot on the right bounded by the four red lines. Let us test this with the function f(x)=(x^(3 ))-2x, the point x=0, and the limit value L=0.

Clear[f]
f[x_]:=x^3-2x
epsilonDelta[f,0,0]

Notice that the graph of  (x^3)-2x initially exits through the top and bottom of the viewing window, but we can make δ small enough to make sure that the portion of the graph between the vertical lines lies entirely between the horizontal lines. This is possible no matter how small we make the vertical viewing window. Playing around with the sliders, we see that δ has to be slightly smaller than ϵ/2 (for any value of ϵ) for the graph to be within the horizontal lines. So for any ϵ>0 we are able to find δ>0 such that |f(x)-0|< ϵ whenever |x-0|<δ, so the limit of f(x) as x->0 is 0.

Now let us consider the function g(x)=sin(1/x) near x=0. We first test L=0.

Clear[f]
f[x_]:=Sin[1/x]
epsilonDelta[f,0,0]

We see that even for the relatively large value ϵ=0.5, no matter how small we make the horizontal viewing window, it will not be possible to view all of the graph (i.e., part of the graph will be cut off). We conclude that (Underscript[lim , x->0])sin(1/x) is not 0. Moreover, by looking at the plots, we realize than no value of L in the range -0.5<L<0.5 can be the limit of g(x) as x->0. Similarly, it can be shown that no value of L in the ranges -1≤L≤-0.5 and 0.5≤L≤1 can be the limit of g(x) as x->0. Thus, we conclude that the function sin(1/x) has no limit at x=0. It is probably worth remarking at this stage that although Mathematica gave us a graph, it is not an accurate representation of sin(1/x) near x=0. This is because Mathematica graphs functions by plotting a finite number of points. This can never give an accurate representation of a function like sin(1/x), which has infinitely many zeroes in any interval containing the origin.

Experiment 2.1

Use the above ideas to determine whether or not the following functions are continuous at x=a. 
(a) f(x)=((|x-2|)/(x-2)), a=2,  if  f(2)=0.
(b) g(x)=x sin(1/x), a=0,  if  g(0)=0.
(c) h(x) =((sin x)/x), a=0, if  h(0) = 1.

2.2 Computing Limits Using Mathematica

Computing limits directly with Mathematica is easy. For example, to find (lim_(x -> 0)) (((e^x)-1-x-(x^2)/2)/(x^3)), we just use the command:

Limit[(E^x-1-x-x^2/2)/x^3, x->0]

(Recall that Mathematica uses E for e=2.71828…). Let us check this answer by plotting the graph.

Plot[(E^x-1-x-x^2/2)/x^3, {x, -1,1}]

Experiment 2.2

Use the above command to find the following limits.  Check to see what is happening by graphing the functions at the point in question:

1.   (lim_(x->0))((sin(x))/x)		2.  (lim_(x->0))((sin(x)-x)/(x^3))

Credits

This lab is based on the laboratories created by Raouf Boules, Geoffrey Goodson, Ohoe Kim, and Michael O'Leary for use in the Calculus courses of Towson University. Commercial use is prohibited without permission of those authors. Non-commercial use is permitted, provided this credit section is retained.