Take It to the Limit

In executing this module, you can expect to hear some beeps informing you of an error in the evaluation. This will happen whenever you try to divide by 0, as we do in certain evaluations.

Introduction

OBJECTIVE: To interpret the limit concept graphically and numerically.

In this module, you will explore some limits by graphing the functions involved and by creating tables of values for the functions. You will explore, in some detail, functions that have indeterminate forms at the limit point, and you will come to appreciate more fully the importance of formal proofs in mathematics.

Technology Guidelines

NOTE:  If you have just finished a module, restart Mathematica or Quit Kernel under the Evaluation pull-down menu before executing a new module.
TO OPEN CELLS, click on the arrow to the left of the cell or put your cursor on the right cell bracket and double click. To open all cells, highlight the bracket on the far right and select Grouping under the Cell pull-down menu and select Open All Subgroups.
TO STOP AN EXECUTION
Select the Evaluation pull-down menu and click on Abort Evaluation.
ORDER OF EXECUTION
Execute cells in the order given. Do not skip any Input cells within a given notebook.
SAVING NOTEBOOKS
You can save anytime to any directory you choose, and it is wise to save often. However, before you do your final save to reduce the size of your file, it is a good idea to delete all your output by selecting the Delete All Output selection under the Cell pull-down menu.
EXPERIENCING MAJOR PROBLEMS
Save if appropriate, then shut down Mathematica and start it up again.

Part I:  What is  (0/0) ?

When we try to evaluate a function like ((x (1-cos x))/(x-sin x)) at x=0, we get (0/0), but what does this mean? The answer to the question "What is (0/0)?" depends on whether the numerator or the denominator of the rational function we are trying to evaluate approaches 0 faster.
This function is not defined at x=0 because its denominator is 0 there; however, the numerator is also 0 at x=0.  To better understand the situation, let's investigate what happens to the values of ((x (1-cos x))/(x-sin x)) when x is very near 0. We begin by graphing the function.

Clear[x,f]
f[x_]:=((x (1-Cos[x]))/(x-Sin[x]))
Plot[f[x],{x,-20,20},AxesLabel->{x,y},AxesOrigin->{0,0}]

The graph seems to indicate that this function is approaching 3 as x approaches 0. To see that this is the case, let's compute some values of the function for x near 0. The Table[ ] command provides a way to do this, and we use it to create a list of entries, {x, f[x], f[x]-3}, for values of x ranging from -1 to 1 in increments of 0.1. Don't be surprised by the error messages that are produced when you execute the next command; they are to remind you that f(x) is not defined at x=0.

\[MathematicaIcon] About Mathematica

values=Table[{x,f[x],f[x]-3},{x,-1.,1.,.1}];TableForm[values,TableHeadings->{None,{"x","f[x]","f[x]-3"}}]

How close to 0 must I hold x in order to guarantee that f(x) stays within one (1/100)th  of 3? You will explore that in the You Try It: Part I section.

Continuity Issues

You might notice from the graph of f(x) that it appears to be continuous. For a function to be continuous, the limit as x approaches 0 must exist and this condition seems to be met. However, continuity requires that the function be defined when x is 0, and here we have a problem. If we evaluate f(0), the result is an indeterminate form (((0 )/0) is such a form).

f[0]

Is f(x) continuous at x = 0? Why? 

The graph of f(x) is deceiving. Mathematically, there is a hole in the graph at the point (0,3) even though we can't see it on the Mathematica graph of f(x). As a result, we might be falsely led to believe that f(x)  is continuous at x=0. 

Now consider the function, g(x)={({{((x (1-cos x))/(x-sin x))}, {3}})({{if x≠0}, {if x=0}}) .

What is g(0)? What is (Underscript[lim , x->0])g(x)? Is this function continuous at x=0?

The discontinuity in f(x) at x=0 is said to be "removable" since we can remove it by forming a new continuous function, g(x), that is identical to f(x) when x≠0 and is equal to 3 when x=0.

For further exploration of continuous and discontinuous functions, refer to "Continuous and Discontinuous Curves," a JAVA applet included in this supplement.

You Try It: Part I

Take The Epsilon Challenge

We have a challenge for you. Here it is.

Determine how close x must be to 0 so that the values of f(x) will be within a specified distance from 3. More specifically, we challenge you with a small positive number, let's call it ε, and ask you to try to determine a value for δ so that when -δ<x<δ with x≠0, the values of f(x) will satisfy the inequality,|f(x)-3|<ε, that is, the distance between the value of f(x) and 3 will be less than ε. For example, if ε=0.1, the table of values in the cell above shows that -0.1<f(x)-3<0.1 is not satisfied when δ=1. You need to find a smaller δ that will keep x closer to zero so that you can beat our ε challenge.

To help you with this, we include a command in the next cell that generates a list of ordered pairs (x, |f(x)-3|) so that you can look at the magnitude of the differences between the values of f(x) and 3 to see if the δ you picked meets our ε challenge. In addition, we added to each ordered pair the result of a test to see if f(x) is within a distance ε of 3. We start with ε=0.01, and a value for δ that is too big. You should try different values for δ, re-evaluating the commands in the cell each time, until you find a δ that works. After you find a δ that works for ε=0.01 try to find δ-values that work for ε=0.0001, 0.0000001, (10^(-10)), . . . .

f[x_]:=x(1-Cos[x])/(x-Sin[x])
δ=0.0025;
ε=0.01;
L=3;
valuestest=Table[{x,Abs[f[x]-L],Abs[f[x]-L]<ε},{x,-δ,δ,δ/10}];
TableForm[valuestest,TableHeadings->{None,{"x","|f(x)-L|","|f(x)-L|<ε"}}]

\[MathematicaIcon] About Mathematica

The formal definition of the limit says that if you are able meet our ε challenge, no matter how small we make our ε, and if you are able to prove that you can do it, then you can say unequivocally that (Underscript[lim , x->0])f(x)=3. We aren't going to ask you to prove this limit, but your instructor may ask you to prove some simpler ones. One thing you can do, however, is use Mathematica's Limit[ ] command to see if it verifies our conjecture that (Underscript[lim , x->0])f(x)=3.

Limit[f[x],x->0]

\[MathematicaIcon] About Mathematica

What's Up? (and Down?)

We can get more insight into what is happening to the function ((x (1-cos x))/(x-sin x)) as x gets close to 0 by looking at the numerator and denominator of the function. In the following cell, we plot the numerator and denominator as separate functions of x.

We set the viewing window with the PlotRange in the option for the Plot[ ] command so that the relation between the values of the numerator and denominator can be easily seen. You can zoom in closer by letting xb and yb (terms in red) get smaller and smaller. Your bounds for y will have to be much, much smaller than your bounds for x; otherwise you will not be able to see your graphs.

num=x (1-Cos[x]);
den=x-Sin[x];
xb=0.1;
yb=(1/(10^4));
Plot[{num,den},{x,-xb,xb},PlotRange->{{-xb,xb},{-yb,yb}},PlotStyle->{RGBColor[0,1,0],RGBColor[0,0,1]}]

\[MathematicaIcon] About Mathematica

Which curve do you think is the graph of the numerator function, and which is the denominator? Why? See if you can differentiate between the two curves as x gets closer and closer to 0.

Use the graphs above to find an approximate numeric relation between  the value of the numerator and the value of the denominator for x values that are close to 0, Based upon the relationship you find, explain why the value of the limit is not surprising.

Try using the Table[ ] and TableForm[ ] commands to generate a table with values of x, num, den, and (num/den) in each row, for values of x close to 0. Comment on what is happening to the values of num, den, and (num/den) as x gets closer to 0.

Try another (0/0) expression

Find the limit as x -> 1 of the function  ((Log[x] )/(1-(2^(x-1))))

\[MathematicaIcon] About Mathematica

Start by trying to evaluate the function at x = 1.

Clear[x,f]
f[x_]:=Log[x]/(1-(2^(x-1)))
f[1]

I guess we had better graph the function to see what is happening.

Plot[f[x],{x,0.5`,1.5`},AxesLabel->{"x","y"}]

How can you determine the precise limit? Try looking at some values of the function for x near 1.

Table[{x,f[x]},{x,.9,1.1,.01}]//TableForm

To investigate this limit, try some explorations like those in Part I or check out the Limit with Mathematica.

Limit[f[x],x->1]

Part II:  What is  (0^0) ?

How does a function such as (((|x|))^x) behave as x gets closer and closer to 0? The answer is not obvious, since numbers to the 0 power go to 1, but 0 to ant power is 0. We will start by trying out the Limit command.

Clear[x,g]
g[x_]:=((Abs[x])^x)
Limit[g[x],x->0]

Is this correct? We might look at the graph of the function. Note what happens when x is 0 on the graph.

Plot[g[x],{x,-2,2},AxesLabel->{x,g[x]}]

Continuity Issues

If we ask for g(0), the result indicates that it is an indeterminate form ((0^0) is such a form).

g[0]

The graph of g(x) appears to be continuous at x=0. Is it? Why?

Part III:  One-Sided Limits

Consider the function (((Sqrt[2x])(x-1))/(| x-1|)). This function appears to have problems at x = 1. Let's begin by looking at the graph.

Clear[x,y,h] 
h[x_]=(((Sqrt[2x])(x-1)   )/(Abs[x-1]));Plot[h[x],{x,0,3},AxesLabel->{x,y}]

The vertical line at x = 1 really shouldn't be there. The lower piece is not really connected to the upper piece. Mathematica graphs a function by plotting a series of points on the function and then connects them with straight lines, sometimes when they really shouldn't be connected.

What is happening at x = 1? Is h(x) defined at x = 1?

h[1]

Let's try the Limit[ ] command. Because of the jump at x=1, we will use one-sided limits. Direction->1 indicates that we are approaching the value specified from values that are smaller, whereas Direction-> -1 indicates that we are approaching the value specified from values that are larger.

\[MathematicaIcon] About Mathematica

Limit[(Sqrt[2x])(x-1)/(-(x-1)),x->1,Direction->1,Analytic->True]
Limit[(Sqrt[2x])(x-1)/(x-1),x->1,Direction->-1,Analytic->True]

This result verifies what is shown in the graph. That is, (Underscript[lim , x->(SuperMinus[1])])h(x)=-(Sqrt[2]) and (Underscript[lim , x->(SuperPlus[1])])h(x)=(Sqrt[2]). We can check this out by looking at some values of the function x=1 and comparing these values with (Sqrt[2]).

checkvalues=Table[{x,h[x]},{x,.999,1.001,.0001}];
TableForm[checkvalues,TableHeadings->{None,{"x","h[x]"}}]
Print["The value of (Sqrt[2]) is ", N[(Sqrt[2]),6]]

You Try It: Part III

Find the limit as x-> (SuperPlus[0]) of x Log[x].

Clear[x,g]
g[x_]:=x Log[Abs[x]]
g[0]
Plot[g[x],{x,-1,2}]

What do you think is happening around x = 0? How do we know for sure that there is not a jump discontinuity at x=0? Maybe, if we zoom in close enough to x=0, we will see a jump. How can we tell for sure whether there is or is not a jump at x=0?

Limit[x Log[x],x->1,Direction->-1,Analytic->True]

Part IV:  What a Difference a Power Makes!

In your coursework, you have undoubtedly studied the limit of the (sinx/x) as x  -> 0 and have found that its value is 1. What happens to the limit if we change the power of x in the denominator to values that are near but not equal to 1? We begin by graphing three of these functions and see what the graphs suggest. The function (sinx/x) will be graphed in red, ((sin x)/(x^0.9)) in green, and ((sin x)/(x^1.1)) in blue. Because the roots of negative numbers are not always real numbers, we use a right-hand limit, approaching 0 only from the right.

Clear[x]
f1[x_]:=((Sin[x])/x)
f2[x_]:=((Sin[x])/(x^(0.9`)))
f3[x_]:=((Sin[x])/(x^(1.1`)))
Plot[{f1[x],f2[x],f3[x]},{x,0,5},PlotStyle->{RGBColor[1,0,0],RGBColor[0,1,0],RGBColor[0,0,1]},AxesLabel->{"x","y"}]

Based on the graphs, what would you guess are the limits of the three functions? 

Now let's evaluate each of the functions at x=(10^(-100)).

f1[(10^(-100))]//N
f2[(10^(-100))]//N
f3[(10^(-100))]//N

Do these results confirm or contradict the conjectures you made for the values of the three limits?

You Try It: Part IV

Proofs are Important!

Closely examine the ((sin x)/(x^n)) problem.

The following commands will result in the sine function being plotted in the thicker form, x in red, (x^(.9 ))in green and (x^1.1) in blue.

num=Sin[x];
den1=x;
den2=(x^(0.9`));
den3=(x^(1.1`));
b=(1/(10^5));
Plot[{num,den1,den2,den3},{x,0,b},PlotRange->{{0,b},{0,b}},PlotStyle->{Thickness[0.01`],RGBColor[1,0,0],RGBColor[0,1,0],RGBColor[0,0,1]}]

What's going on here? Without being more careful, we might conclude from the graphs above that in all three cases the ratio of num to den is a constant and that each limit should be approaching some finite number. To see what is really happening, you need to look at several graphs of the numerator and denominator functions, each one zoomed by a factor of (1/100). Go back to the preceding cell and re-execute the commands with the exponent of b=-7,-9,-11, . . .  (term in red in the input cell).  What does this tell you about the ratio of num to den in each of the three limits as x approaches 0?

Wait a minute! How do we know for sure that the pattern illustrated in the graphs above will continue if we zoom in even closer. Maybe things will "settle down" and the ratios will, in fact, approach constant values. What about the function ((x (1-cos x))/(x-sin x)) from Part I? Maybe, if we zoom in close enough to 0, the graphs of num and den will start to look like the corresponding graphs for one of the three functions considered in this Part. How can we be sure of the situation? The answer is in the formal definition of the limit and proof. As mathematicians, we are not fully satisfied until we can prove our conjectures about the behavior of the functions as x approaches 0. Then, there is no doubt.

\[MathematicaIcon] About Mathematica

In Mathematica, the Table[expression, iterator] command provides a convenient way to generate a list. The first argument, expression, can be a single item or a list of items. The second argument, iterator, takes the usual iterator form, indicating the symbol name for the iterator, its beginning and ending values, and an optional increment size as it steps from start to finish. The default step-size is 1.
Go back.

In the Table[ ] command above, the third argument, |f(x)-L|<ε, is an example of a logical expression. If values have been assigned to the symbols in the expression, it evaluates them to be True or False. If values have not been assigned to the symbols, the expression is left unevaluated. Some logical operators are  == , ≠ ,  < ,  > ,  ≤ , ≥ , && (for "and"), | | (for "or"), and ! (for "not").
Go back.

In Mathematica, the Limit command does not always work, but you can always try it. 
Go back.

The RGBColor command has three entries. The first refers to the amount of red in the plot, the second the amount of green, and the third the amount of blue. 
Go back.

In Mathematica, the expression Log[x] refers to the natural log of x. If we want the log base ten, we would need to write Log[x, 10].
Go back.

Analytic->True sends a message to Mathematica to attempt to compute the limit using L'Hopital's rule, which is studied in Chapter 4 of the text. It is because of the use of this rule that we are now calling on h[x] as it would be, first when x < 1 and then when x > 1. 
Go back.