Application of Computer Algebra (ACA) 2007 Session: Computer Algebra in Education 19-22 July 2007, Rochester, Michigan, USA ( ) Using ln x as an Antiderivative for 1/ x is a Bad Choice! Michel Beaudin Service des enseignements généraux, École de technologie supérieure (ETS), 1100, Notre-Dame street west, Montréal, Québec, Canada, H3C 1K3 Email: [email protected] Abstract All major CAS are using ln(x) for their indefinite integral of 1 x . Some will say because these systems are “complex oriented”. The symbolic handheld calculator Voyage 200 (or TI-89 Titanium) from Texas Instruments gives the user the choice: when the exponential format is set to “rectangular”, you get ln(x) for the indefinite integral of 1 x . But, unfortunately, the ( ) exponential format defaults to “real” and we obtain ln x . In single variable calculus, we teach students that two antiderivatives of a given function over an interval differ by a constant. But calculus textbooks are still using the formula ∫ dx = ln ( x ) + C because they want to include x both cases: negative and positive x. There is no need for this: in the case of a definite integral, −2 say dx , we lose the chance of recalling that the function 1 x is an odd function … or we lose a x −3 ∫ chance to introduce students to complex numbers (using log of negative numbers). In their studies, (engineering) students will also follow a Differential Equations course. They will make use of a “dsolve” command. And sometimes, in this case, some internal complex values will be necessary in order to obtain the solution of a given DE. So, here again, choosing the “real branch” is a bad choice. Finally, as far as complex analysis is concerned, the antiderivative of 1 z is ln(z) and not ln ( z ) . Using technology becomes an opportunity to question textbooks: this will be the main goal of this talk. 1. Introduction Let us first make it clear: the Voyage 200 handheld calculator (and also the TI-89 Titanium and former TI-92) is a very impressive CAS calculator, very easy to use and powerful enough to teach mathematics at the undergraduate level to future engineers. That is what we have been doing for the past 8 years with enthusiasm: since September 1999, every student at Ecole de technologie supérieure (ETS) has to buy this calculator. Along with CAS like Maple and Derive and also the Matlab program, all available in the computer labs, learning and teaching mathematics at ETS is done in a “computer algebra environment”. With the Voyage 200 calculator (latest OS: 3.10), the “Complex Format” defaults to “real”: this is reasonable when we want “the” cubic root of −1 to be −1 (high school students would be confused if “the” cubic root of −1 is a complex number!). But this will also simplify the antiderivative of 1/x into ln(|x|). Take a look at figures 1a and 1b. Figure 1a Figure 1b Unfortunately, the status regarding the complex format appears nowhere on the screen (but this will change with TI new handheld “Nspire”). Changing the “Complex Format” to “rectangular”, we see that “the cubic root” of −1 simplifies into a complex number (because of the principal branch of the cubic root for a negative real number) and that the antiderivative of 1/x becomes ln(x): figure 2a and 2b show this. 2 Figure 2a Figure 2b With Derive, the “real branch” affects “the cubic root” but not the integral of 1/x: Figure 3 So, what is our point? Well, we think that if computer algebra systems are here to stay and if more and more teachers are going to incorporate it into their teaching, we just can’t avoid using complex numbers. The “complex format” should default to “rectangular” and not to “real” just like the default setting of the numeric ODE solver of the Voyage 200 defaults to “RK method” and not to “Euler’s method”. If, some 20 years ago, computer algebra systems were not written to meet the needs of beginning calculus students, there is still no contradiction by using a CAS 3 and teaching to such students: the teacher has to tell them what should be said: there is no need at all to write the following formula: ∫ Write down ∫ dx x dx x = ln ( x ) + C = ln x + C and recall that two antiderivatives of a continuous function over an interval differ by a constant. When a student will encounter logs of negative real numbers, he/she will learn something new, something that is well implemented into modern CAS, especially Voyage 200 calculators: avoiding it will eventually lead to more serious problems. Moreover, putting absolute values inside the logs also affects the shape of the answers in certain cases. Using logarithms properties valid for positive numbers, the device also collects the logs when a rational function is integrated. The “complex branch” has the advantage to show what partial fraction expansion was applied in order to perform the integration: see figure 4 where, between the two integrals, we have switched the “Complex Format” from “real” to “rectangular”. Figure 4 In the next section, we are going to show some consequences of using computer algebra in teaching mathematics: it becomes an opportunity to question textbooks! But the converse is also true: using technology is an opportunity to question choices made by developers or to ask them to incorporate new features in upcoming versions. 2. Examples When you are using computer algebra in your everyday teaching, you collect many funny examples of bugs and strange answers given by the system(s). In some cases, you can use it to remind the students to be aware of the answers on the screen. In other cases, you rapidly face the following: computer algebra systems and “classical” textbooks are not incompatible but one needs to adapt the questions from the textbooks to fit the use of a CAS. The following examples will try to demonstrate this. 4 Example 1: from a private talk with David Jeffrey, corner of St-Urbain and Duluth streets, Montreal, Canada, summer 2006. Solve ( x − 1 x + 1 = c, x ) where c is any real constant. Before taking a look at the answers given by Maple 9.5, Derive 6.10 and Voyage 200 OS 3.10, let us first ask the following question. What is the domain of the function on the LHS of this equation? We teach students that the domain of a real function f is those real numbers x such that f ( x) ∈ . In calculus, if you define f ( x) = x − 1 x + 1 , you probably don’t want to deal with square roots of negative numbers even if the (final) result is real! So, in calculus, the domain of f should be x ≥ 1 and the equation can only have one solution for every c ≥ 0 , namely c 2 + 1 . On the computer algebra ground, internal complex values are allowed, so c 2 + 1 will be the solution if c ≥ 0 and − c 2 + 1 if c ≤ 0 . Consequently, the exact answer to our equation should be (according to David Jeffrey): c 2 + 1sign(c) (if we set sign(0) to be ±1 , this covers all cases). But take a look at the following Maple session, Derive session and Voyage 200 session. > solve(sqrt(x-1)*sqrt(x+1)=c,x); 2 1+c , 2 2 1+c ,- 1+c ,- 1+c 2 Figure 5 So, all of 3 systems are wrong! Here again, the Voyage 200 shows many educational features when you define this function. The Complex Format shows different graphs, depending on the branch: 5 Figure 6a (“real branch”) Figure 6b (“complex branch”) This example shows that it is ridiculous to not incorporate complex numbers into a single variable calculus course. The amount of complex numbers knowledge is small and the benefit for the students using computer algebra systems is much bigger. Moreover, using the simple x1 3 function, students already remarked that no curve will be plot in the third quadrant if the “complex branch” is selected. So, calculus textbooks should include, in their treatment of real variable functions, examples of internal complex values and authors should talk about the difference between “real” and “complex” branches. Example 2: We wrote earlier that the main goal of our talk will be “the opportunity to question textbooks” while using technology. Here is a nice example of this. In Differential Equations courses, modern textbooks are very well illustrated if we compare to older books. Graphics of solutions are often showed and numerical methods are introduced at early stage. Moreover, many exercises are “projects” or “CAS problems”, so with the aid of technology, students have the opportunity to explore new avenues. Unfortunately, we don’t see many “pencil and paper problems” related with technology. This is strange and this is, according to us, one major reason why “computer algebra has not yet lived up to its promise in the field of mathematics education”. 6 Let us illustrate our point with the following ODE. When my students are asked to solve the IC problem dy dx = 4y 2 x −9 , y (0) = 5 , they are rapidly concerned (again!) with “complex format”: depending if “real” or “rectangular” is the chosen one, the get the following “answer” on their Voyage 200 screen: in figure 7a, the “real branch” was selected and in figure 7b, the “rectangular branch” was selected: Figure 7a Figure 7b Which ideas should textbooks suggest to the students? Well, before solving the ODE, we have to think about the existence of the solution. The function f ( x, y ) = 4y 2 x −9 and its partial derivative with respect to y are continuous over a certain rectangle containing the point (0, 5) as long as x belongs to the open interval ]−3, 3[ . The complex answer given by the TI in figure 7b (Maple and Derive give the same answer) will become “real” when the system is informed with the command that x belongs to the interval ]−3, 3[ : 7 Figure 8 This is a nice illustration that computer algebra has the power to reunify theory and practice in a much better way than many textbooks! Example 3: Curve of intersection of 2 surfaces. In many calculus textbooks, authors show nice computer graphics and give examples of finding parametric equation for the curve of intersection of two surfaces. Here is one example: the plane x + y + z = 3 intersects the paraboloid z = x 2 + y 2 (see figure 9 where the range is −5 < x, y < 5, −1 < z < 10): Figure 9 In order to find parametric equations for the curve of intersection, they simply equate both z values, complete the square and use the first trigonometric identity. This gives, using t as the parameter: 1 14 1 14 14 14 x=− + cos t , y = − + sin t , z = 4 − cos t − sin t , 2 2 2 2 2 2 0 ≤ t ≤ 2π . 8 When we plot this curve in the same window as before, we get: Figure 10 The critic we can address to textbooks is the following: when partial derivatives are presented to students, why not say a word on the following approach? If someone wants to find parametric equations for the curve of intersection of two surfaces defined by the equations f = 0 and g = 0, and if this curve is traced by a particular vector function r (t ) , then one possible function r is dr obtained by solving the following ODE system: = ∇f × ∇g (there exists, of course, other dt possible ways for finding parametric equations). And, later on, using Laplace transforms techniques (at least for a linear system), students will be able to solve the system (and will find a different paramétrisation if we consider the former plane and the former paraboloid). In fact, textbooks never give the example of finding the curve of intersection of a plane and a sphere! Of course, eigenvalues will be needed but the ODE system approach is again possible. In fact, no textbooks, even those dealing with ODEs, show examples of using numerical methods for plotting the curve of intersection! They just don’t want to mix Calculus and ODEs! With technology, there is no reason at all to do so. Let us conclude this example using Derive in order to plot the great circle when the sphere x 2 + y 2 + z 2 = 25 intersects the plane x + y + z = 0 . Setting z = 0 in both equations gives one point on the curve. The following Derive session does the job very well: 9 Figure 11 Figure 12 Example 4: Now, here is a critique of technology! When our students, in a multiple variable calculus course, have to use cylindrical coordinates for the computation of a given triple integral, they also use the given rectangular coordinates in order to check their answer, because the TI is doing the calculations! If both answers are the same (at least, numerically), they are confident that their triple integral was set correctly! Colleagues at ETS found an interesting example and I found where is the bug in the device! So, this example is something on the “bad side” of technology: Texas Instruments fixed the bug in the upcoming new version of the operating system (OS) for the Nspire CAS calculator (and software). Suppose you want to compute the volume of a solid that is bounded below by the plane z = 0, above by the cone z = x 2 + y 2 and on the sides by the cylinder x 2 + y 2 = 2 y . You will have to compute the following triple integral: 10 V= 1 1+ 1− x 2 x2 + y2 ∫ ∫ ∫ −1 1− 1− x 2 0 dz dy dx Using cylindrical coordinates, we easily get the exact answer: π 2sin θ r is simply V = ∫ 0 ∫ ∫ r dz dr dθ = 0 0 32 ≈ 3.55556 . 9 32 ≈ 3.55556 because the integral 9 When the students compared the answer obtained using rectangular coordinates, they started to be convinced of the importance of cylindrical coordinates! They did not get the answer 3.55556 but the value 3.90789 or the complex value 3.90789 − 0.523599i! Here again, the rectangular branch has the advantage for expecting a bug because the imaginary parts is not close to 0. Figure 13a Figure 13b 1 1+ 1− x 2 x2 + y2 0 1− 1− x 2 0 But some of them used the fact that the volume must be equal to 2∫ ∫ ∫ dz dy dx . With this new triple integral, the TI makes no error (see figure 14). In fact, the problem seems to be caused not by the numerical integrator of the device, but by the following fact: when the inner double integral has been computed, the integrand, as a function of x, is not an even function in fact it a is not defined for negative x , so the device could not use the shortcut ∫ −a a f ( x) dx = 2 ∫ f ( x) dx , 0 for an even function f. 11 Figure 14 Here is the mistake made by the TI : it concerns the simplification of nested radicals! When evaluating the integral 1+ 1− x 2 ∫ x 2 + y 2 dy , 1− 1− x 2 the device correctly used the antiderivative ( x 2 ln y + x 2 + y 2 2 )+ y x2 + y 2 . 2 Not let us substitute for y, the lower limit of integration, namely 1 − 1 − x 2 . The square root ( inside the log or in the second term becomes x 2 + 1 − 1 − x 2 ) 2 = 2 − 2 1 − x 2 . In order to simplify this last expression, we will use the rule shown in this Derive show step simplification: Figure 15 For −1 < x < 1, we have 2 − 2 1 − x2 = x + 1 − 1 − x . Which is equal to and only if 0 ≤ x ≤ 1 . But the TI wrongly simplified 2 − 2 1 − x 2 into x + 1 − 1 − x if x + 1 − 1 − x as figure 16 shows: 12 Figure 16 As we said earlier, this bug is fixed in the new Nspire calculator (and also software). Unfortunately, TI does not seem to release new OS for the Voyage 200… 3. Conclusion Let us conclude with a critique of both technology and textbooks! When introduced to the concept of limit, students are asked, in some exercises, to “compute” limit numerically… In fact, this is correct as long as you show (classical) examples of the importance of arbitrary precision. And this arbitrary precision is impossible on calculator (even handheld CAS calculator) for obvious reasons. But we always have access to arbitrary precision using a CAS on a computer. We think that textbooks should, inside their “CAS projects”, give students exercises about “catastrophic cancellation”. In this way, students will be aware of doing approximate arithmetic and, when exact arithmetic will not be possible or possible but not useful, they will pay more attention to the results they get on their screen. We conclude this presentation with some exercises that teachers could do with their students. Problem 1: Compute 1 + n 1 5 10 15 for n = 10 ,10 ,10 ,… The limit should be the number e… n Students who are using a calculator and tables will eventually find 1 as the limit value. This is a simple but important example to do. Problem 2: At an higher level, ask your students to find the real solutions of the following x19 equation, using a computer: ∏ ( x − k ) − 7 = 0 . Some will find integers solutions ... unless 10 k =1 20 they use a sufficient number of digits precision. This equation has 10 real roots, located between 0 and 21. 13 Problem 3: Textbooks often use a graph in order to locate zeros of a given function. But few among it will ask students to use their calculator or a computer for plotting the graph of a rational function, for example something like 1000( x − 1) (101x − 100)(100 x − 99) . Here, you must practice the “zooming techniques”! Problem 4: Let f ( x) = x x ( x + 1 + x −1 − 2 x ) ( x ≥ 1) . What happens if x goes to 1 infinity? Some students will be able to show that the limit is − . Here again, if we substitute 4 for x the value 106 , we need a sufficient precision. Problem 5 : From [3] , page 198. Alaina wants to get to the bus stop as quickly as possible. The bus stop is across a grassy park, 2000 feet west and 600 feet north of her starting position (figure 17). Alaina can walk west along the edge of the park on the sidewalk at a speed of 6 ft/sec. She can also travel through the grass in the park, but only at a rate of 4 ft/sec. What path will get her to the bus stop the fastest? Figure 17 14 Despite the massive presence of technology that we have today, we still see many textbooks (but, fortunately, reference [3] is quite progressive compare to other textbooks) that will start doing this example by finding the critical point of the function t= x 6 + (2000 − x) 2 + 6002 4 ( 0 ≤ x ≤ 2000 ) Why not recall that a continuous function over a bounder closed interval achieve an absolute minimum value and, then, use the zoomfit command of some device?! 15 REFERENCES [1] Computer Algebra Systems. A practical Guide. Edited by Michael J. Wester. John Wiley & Sons, Ltd. 1999. [2] Beaudin, Michel & Picard, Gilles. Using the Voyage 200 (OS 3.10) in the classroom: surprising results. Lecture at the Dresden International Symposium on Technology and its Integration into Mathematics Education, 20-23 July 2006, Dresden, Germany. [3] Hugues-Hallett, Gleason, McCallum et al, Calculus, Single Variable, Third Edition, Wiley, 2002 [4] Koepf, Wolfram. Keynote lecture at the Second International Derive and TI-92 Conference, Bonn, Germany, July 1996. [5] Kutzler, Bernhard & Kokol-Voljic, Vlasta. Introduction to Derive 6, 2003. 16
© Copyright 2026 Paperzz