All published worksheets from http://sagenb.org
Image: ubuntu2004
Limits and Continuity
This worksheet will help you use Sage to understand the contents of the Limits and Continuity unit. In particular, you can use this sheet to help you understand
- The squeeze (sandwich) theorem
- Definitions of limits
- Continuity
- The derivative at a point.
As you read each section, find problems in the book which you can try the code on. I will point you to some of these problems by writing Try:
Squeeze Theorem (Sandwich Theorem)
You can use the following code to help you visualize the squeeze theorem. Just change the bottom, middle, and top functions, and then a graph of all three functions will be created.
Try: 2.2:49-52
Definitions of Limits
A Finite Limit at x = c:
If you would like to find a delta given an epsilon, the code below will help. In the example below, we are trying to show the limit as x approaches c of f(x) is L, or .
Try: 2.3: 7-26, 31-36
An Infinite limit as you approach c from one side:
Now let's explore an infinite limit. First, let's look at one sided infinite limits. In the code below, you can select the value where you want to find the infinite limit, the direction (from above or below the value) and the value of M (a large positive number if you want to show the limit is infinity, or a large negative number if you want to show the limit is negative infinity). The code will then help you find delta by finding where the graph intersects the line y=M, and then computing delta.
Try: In trying to show , if , find the a corresponding .
A Finite limit as you approach plus or minus infinity:
Now let's look at a limit as approaches infinity or negative infinity. Here you must give the limit and an epsilon, and then find a value of B (large positive if you want to approach , or negative if you want to approach .
Try: In trying to show , if , find the a corresponding .
Continuity
Remember that we say a function is continuous at an interior point c if the limit as x approaches c exists and equals the function's value at c. In other words, functions are continuous at a point when you can evaluate the limit by plugging in a point. Most of the functions you are familiar with are continuous.
If the function is continuous at a point then the following code should show that it is. If it is discontinuous, then you will likely encouter errors. I provide a graph of the function at x = c at the end of the code so you can see what is happening.
Try: 2.6: 13-38
If you want to study continuity at an endpoint of a function, then you have to look at one sided limits instead. The function has no limit at , but it does have a limit from the right at . We say is continuous at 0 because 0 is the left enpoint of the domain and its limit from the right matches the value of the function at 0.
Here are some examples of functions which are not continuous at a point.
This function has an infinite discontinuity at 0.
This function has an jump discontinuity at 0.
This function has an oscillating discontinuity at 0.
This function has an removable discontinuity at 0. You can redefine the function to be its limit at 0, and then the function would be continuous. When a discontinuity is removable, the graph on a computer may appear to be continuous.
The Derivative at a Point
Recall that the derivative at a point is the slope of a tangent line at that point. The slope of the tangent line is found by considering the slope of secant lines which pass through the point of interest, and another point close by. If we want to find the derivative at the point c, then we want to find the slope of the line that passes through (c, f(c)) and (c+h, f(c+h)). The code below illustrates this step by step. This code is very similar to the average velocity section from the previous unit (because it is the same idea). Try changing the values of h so that they get closer to zero, and then you can watch how the secant line becomes the tangent line.
Try: 2.7: 5-22, 27-30, 31-32, 45-48
The code below graphs many secant lines simultaneously, together with the tangent line.