/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/ /* [ Created with wxMaxima version 11.08.0 ] */ /* [wxMaxima: title start ] Take It to the Limit [wxMaxima: title end ] */ /* [wxMaxima: comment start ] Chapter 2 Technology Application Project [wxMaxima: comment end ] */ /* [wxMaxima: comment start ] In executing this module, you can expect to see an error in the evaluation. This will happen whenever you try to divide by 0, as we do in certain evaluations. [wxMaxima: comment end ] */ /* [wxMaxima: section start ] Introduction [wxMaxima: section end ] */ /* [wxMaxima: comment start ] 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. [wxMaxima: comment end ] */ /* [wxMaxima: subsect start ] Technology Guidelines [wxMaxima: subsect end ] */ /* [wxMaxima: comment start ] NOTE: If you have just finished a document, restart Maxima before executing a new document. This can be done by choosing "Restart" from the Maxima menu. TO OPEN OR CLOSE CELLS Click on the arrow at the top of the cell bracket. TO STOP AN EXECUTION Click on STOP button from the toolbar. ORDER OF EXECUTION Execute commands in the order given. Do not skip any Maxima Input lines within a given document. Alternatively, you can execute the entire worksheet by selecting the "Evaluate All Cells" command from the "Cell" drop down menu or simply press Ctrl-r. SAVING WORKSHEETS You can save anytime to any directory you choose, and it is wise to save often. EXPERIENCING MAJOR PROBLEMS Save if appropriate, and then shut down Maxima and start it up again. [wxMaxima: comment end ] */ /* [wxMaxima: section start ] PART I: What is 0/0? [wxMaxima: section end ] */ /* [wxMaxima: comment start ] Section 2.3, Exercise 64 [wxMaxima: comment end ] */ /* [wxMaxima: subsect start ] Observing the Data [wxMaxima: subsect end ] */ /* [wxMaxima: comment start ] 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. [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ load(draw)$ numer:true$ ratprint:false$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ f (x) := x*(1-cos(x))/(x-sin(x)); wxdraw2d( nticks=200, color=red, explicit(f(x),x,-20,20), xlabel="x", ylabel="y"); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] 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 makelist 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 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. [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ count: 1$ for i: -1.0 thru 0 step 0.1 do block( mm[count]: [i,f(i),f(i)-3], count: count+1)$ matrix1: matrix(["x", "f(x)", "f(x)-3"])$ for j: 1 thru (count-1) step 1 do block( matrix1: addrow(matrix1,mm[j]))$ print(matrix1)$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ count: 1$ for i: 1.0 thru 0 step -0.1 do block( mm[count]: [i,f(i),f(i)-3], count: count+1)$ matrix2: matrix(["x", "f(x)", "f(x)-3"])$ for j: 1 thru (count-1) step 1 do block( matrix2: addrow(matrix2,mm[j]))$ print(matrix2)$ /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] Notice that a command terminates immediately upon reaching a divide by 0 error. Therefore, the matrix row for x=0 did not get added. So we modify our commands to handle the case when x=0. [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ count: 1$ for i: -1 thru 0 step 1/10 do block( if (abs(i)<0.001) then undefined: true else undefined: false, if (undefined) then block( mm[count]: [i,"undefined","undefined"]) else block( mm[count]: [i,f(i),f(i)-3]), count: count+1)$ matrix1: matrix(["x", "f(x)", "f(x)-3"])$ for j: 1 thru (count-1) step 1 do block( matrix1: addrow(matrix1,mm[j]))$ print(matrix1)$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ count: 1$ for i: 1 thru 0 step -1/10 do block( if (abs(i)<0.001) then undefined: true else undefined: false, if (undefined) then block( mm[count]: [i,"undefined","undefined"]) else block( mm[count]: [i,f(i),f(i)-3]), count: count+1)$ matrix2: matrix(["x", "f(x)", "f(x)-3"])$ for j: 1 thru (count-1) step 1 do block( matrix2: addrow(matrix2,mm[j]))$ print(matrix2)$ /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] How close to 0 must I hold x in order to guarantee that f(x) stays within 1/100th of 3? You will explore that in the You Try It subsection at the end of this section. [wxMaxima: comment end ] */ /* [wxMaxima: subsect start ] Continuity Issues [wxMaxima: subsect end ] */ /* [wxMaxima: comment start ] 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). [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ f(0); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] Is f(x) continuous at x=0? why? The graph of f(x) is deceiving. Mathematically, there is a gaping hole in the graph at the point (0,3) even though we can't see it on the Maxima 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)) if x is not equal to 0 and g(x) = 3 if x=0. What is g(0)? What is the limit as x approaches 0 of 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 is not equal to 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. [wxMaxima: comment end ] */ /* [wxMaxima: subsect start ] You Try It: PART I [wxMaxima: subsect end ] */ /* [wxMaxima: comment start ] 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 epsilon, and ask you try to determine a value for delta so that when -delta < x < delta with x not equal to 0, the values of f(x) will satisfy the inequality |f(x)-3| < epsilon. That is, the distance between the value of f(x) and 3 will be less than epsilon. For example, if epsilon = .1e-1, the table of values in the cell above shows that -.1 < f(x)-3 < .1 is not satisfied when delta=1. You need to find a smaller delta that will keep x closer to 0 so that you can beat our epsilon 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 delta you picked meets our epsilon challenge. In addition, we added to each ordered pair the result of a test to see if a is within a distance epsilon of 3. We start with epsilon = .1e-1 and a value for delta that is too big. You should try different values for delta, re-evaluating the commands in the cell each time, until you find a delta that works. After you find a delta that works for epsilon = .1e-1, try to find delta-values that work for epsilon = .1e-3, .1e-6, 10(-10), .... [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ delta: 0.0025$ epsilon: 0.01$ L: 3$ count: 1$ for i: -delta thru delta step delta/10 do block( if (is(equal(i,0))) then undefined: true else undefined: false, if (undefined) then block(result: false, mm[count]: [i,"undefined",result]) else block( if (abs(f(i)-L) 0(+) of x*log(x). [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ g (x) := x*log((x))$ g(0); wxdraw2d( nticks=200, color=red, explicit(g(x),x,-1,2)); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] 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? [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ limit(g(x),x,1,plus); /* [wxMaxima: input end ] */ /* [wxMaxima: section start ] PART IV: What a Difference a Power Makes! [wxMaxima: section end ] */ /* [wxMaxima: comment start ] In your coursework, you have undoubtedly studied the limit of the sin(x)/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 sin(x)/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. [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ kill(all)$ load(draw)$ ratprint:false$ numer:true$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ f1 (x) := sin(x)/x$ f2 (x) := sin(x)/(x^0.9)$ f3 (x) := sin(x)/(x^1.1)$ wxdraw2d( nticks=200, color=red, explicit(f1(x),x,0,5), color=green, explicit(f2(x),x,0,5), color=blue, explicit(f3(x),x,0,5)); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] Based on this graph, what would you guess are the limits of the three functions as x->0+? Now let's evaluate each of the functions at x = 10^(-100). [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ value: 10^-100; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ f1(value); f2(value); f3(value); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] Do these results confirm or contradict the conjectures you made for the values of the three limits? [wxMaxima: comment end ] */ /* [wxMaxima: subsect start ] You Try It: PART IV [wxMaxima: subsect end ] */ /* [wxMaxima: comment start ] 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 in black, x in red, x^0.9 in green and x^1.1 in blue. [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ num: sin(x)$ den1: x$ den2: x^0.9$ den3: x^1.1$ b: 10^(-5)$ wxdraw2d( nticks=200, color=black, line_width=3, explicit(num,x,0,b), color=red, line_width=1, explicit(den1,x,0,b), color=green, explicit(den2,x,0,b), color=blue, explicit(den3,x,0,b)); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] 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 denom 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, . . . What does this tell you about the ratio of num to denom 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 graph of num to denom will start to look like the correspondin 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. [wxMaxima: comment end ] */ /* Maxima can't load/batch files which end with a comment! */ "Created with wxMaxima"$