Calculus I
Lesson 1: Limits
We have seen that the limit gives the instantaneous rate of change of the function at . In computing this limit, the point is fixed, we think of the difference quotient as a function of , and we ask how it behaves when is close to 0. Of course, we cannot actually put , for then the quotient would be undefined. Taking the limit as is not the same as substituting . In this worksheet, we will explore the idea of limit in general; in later worksheets, we will come back to the special type of limit above. We say a function , defined in some interval around a point , but not necessarily at itself, has a limit as approaches , written
,
if we can make as close to as we like by taking sufficiently close to (but not equal to) . (This is a good enough definition to get started; we will see a more precise one later on.)
Lets look at limits from a geometric point of view. The concept of limits can seem difficult, but the idea is quite simple when you see what is happening geometrically. We will construct a diagram which shows a function and points approaching from the left and right.
> restart; with(plots):
Warning, the name changecoords has been redefined
> f := x -> 3 + (x-2)*cos((x-2)); a := 2: left := -1: right :=5:
> display( plot( f(x), x = left..right, color = green), plot( {[[a,0],[a,f(a)]],[[0,f(a)],[a,f(a)]] }, x = left..right, linestyle=3,color = gold, thickness = 2), plot([[ a - 1/n, f(a - 1/n)] $n=1..20], x = left..right, style=point, symbol=circle, color = red), plot( [[ a+1/n, f(a + 1/n)] $n=1..20], x = left..right, style=point, symbol=circle, color = blue));
The green curve is the function. The yellow lines indicate where (a,f(a)) is. The blue dots indicate points on f(x) as x approaches a from the right, and the green dots indicate points on f(x) where x is converging to a from the left side. By looking at this diagram, you can guess the right limit by looking at what y value the points seem to be converging to. In a similar way, you can guess the left limit by looking at what value the red dots seem to be converging to. If the red and blue dots appear to be converging to the same value, then the limit exists and equals the value they are converging to.
Here is another example where the function is left and right limits are not the same. After re-defining f(x), copy and paste the display command block above and re-execute.
> f := x -> Heaviside(x-1) - Heaviside(1-x); a := 1: left := -2: right :=4:
> display( plot( f(x), x = left..right, color = green, discont=true), plot( {[[a,0],[a,f(a)]],[[0,f(a)],[a,f(a)]] }, x = left..right, linestyle=3,color = gold, thickness = 2), plot([[ a - 1/n, f(a - 1/n)] $n=1..20], x = left..right, style=point, symbol=circle, color = red), plot( [[ a+1/n, f(a + 1/n)] $n=1..20], x = left..right, style=point, symbol=circle, color = blue));
In this case, the function is not continuous. It has a jump at x = 1. The red points coming from the left approach -1 while the blue points approaching from the right approach +1. In this case we say that the limit is undefined since there is not a single value for the limit.
Here are some more example functions. For each of them, do the following:
(1) guess whether or not the function has a limit at the indicated point and try evaluating f(a). ( In most cases, this will not work. )
(2) check (or formulate) your guess numerically by evaluating the function at several points close to ;
(3) graph the function and confirm that the graph has the expected behaviour near .
(4) use Maple to evaluate the limit of f(x) as x approaches a .
> f := x-> (x-1)/(x^2 - 1) ; a := 1;
> f(a);
Error, (in f) numeric exception: division by zero
> plot( f(x), x=a-1..a+1);
> limit(f(x), x=a);
> f := x-> sin(x)/x ; a := 0;
> plot( f(x), x=a-5..a+5);
> f := x-> (1 - cos(x))/x ; a := 0;
> f := x-> (1 - cos(x))/x^2 ; a := 0;
> f := x-> if (x<0) then 0 else 1 fi: a := 0;
> plot( f, -1..1);
> f := x-> piecewise(x<=2, x^2, 6-x); a := 2;
> plot( f, -3..7, discont=true);
> limit(f(x), x=2, right);
Error, (in limit) directional argument ('left', 'right', 'real' or 'complex') needs to be quoted
> f := x-> sin(Pi/x) ; a := 0;
> f := x-> abs(x+1)/(x+1) ; a := -1;
> plot( f(x), x=a-5..a+5, discont=true);
> f := x-> abs(x+1)^3/(x+1) ; a := -1;
> f := x-> x*sin(1/x) ; a := 0;
>