Sunday, January 4, 2009
Using Algebra to Enhance Numerical Accuracy On Your Calculator: When is ZERO really ZERO!
When a calculator displays zero as a result should students assume that is exact or only accurate to the precision the machine can store and/or display?
The next time students ask you why we use the conjugate method to rationalize denominators, here's an example of why we sometimes use the method in "reverse". This happens more frequently in calculus but the following is an apparently trivial numerical computation your students can try on their graphing calculators. The results of this computation depend heavily on the specific technology used (e.g., expect different results between the TI-89 and the TI-84), but hopefully they will get the idea. This numerical issue came up as I was solving an applied problem which required finding the difference between two very large numbers (the difference between distances from the center of the earth to a point slightly above its surface and the radius of the earth). This numerical issue has come up more before on this blog. Look here if you want to see another application.
Here's the computation:
Let R = 2.0916 x 10^7
We need to compute the following expression (denoted by **)
\sqrt{R^2+1.5^2}-R
For the Student
(a) Do the calculation directly on your calculator. You will want to store this value of R as a variable for later use:
2.0916x10^7 STO> ALPHA R
Does your calculator display zero? If so, explain this "error."
Note: This display depends on the calculator being used. I experimented with the -84 and -83. Let me know how the display appears on other machines. Of course, one would expect a very different outcome if using Mathematica!
(b) Rewrite the above expression ** by multiplying the numerator and denominator by the conjugate of the expression. (Hint: Put the original expression "over 1").
(c) Recalculate the value of ** using the modified but equivalent form from part (b).
What result do you see this time? Can you explain what may be going on?
(d) Find other numerical expressions that produce an incorrectly displayed result on your calculator! Post these in the comments section pls!
Posted by Dave Marain at 9:27 AM 2 comments
Labels: advanced algebra, algebra 2, approximation, conjugates, limitations of technology, numerical analysis, radicals
Wednesday, October 1, 2008
Solve x^2 - 10000x - 10000 = 0 without a calculator! A Precalculus Investigation
BACKGROUND/OVERVIEW
No, there's no mistake in the constant term in that equation. Imagine giving this to your Precalculus/Math Analysis/Adv Math students! Actually, 'solving' it with the TI-84 requires some effort using Solver since one needs to make an approximate guess or adjust the lower bound so that the positive root is obtained. Using the graph is no 'walk in the park' either! The TI-89 or Mathematica would have much less difficulty in displaying the exact radical form or a suitable decimal approximation but they may not be within reach. Perhaps an important issue here is that sometimes technology gives us unexpected or even inaccurate results. That's when students need some understanding of theory to recognize the limitations of the technology and adjust accordingly.
Here's the point of all this. The given quadratic is not factorable over the integers, however we can replace it with a 'nicer' quadratic that is. The roots of the desired quadratic can be shown to be approximately the same as the 'nice' quadratic and we can show that the absolute error is less than two ten-thousanths (and a much much smaller relative or % error)! Does this 'numerical analysis' have any practical value? Why approximate roots when powerful technology can produce exact answers? Do professionals who need to apply mathematics to the solution of 'real' problems ever use such approximation techniques? Could it be that theory actually provides practical application!
THE INVESTIGATION
(1) Show that the roots of the x2-10000x-10001 = 0 are 10001 and -1 by factoring.
(2) Show that the roots of x2-10000x-10000=0 can be approximated by 10001 and -1 with an error of less than 0.0001.
(a) By direct calculation: Using the quadratic formula and, yes, you may use the calculator!
(b) (Challenging) By comparing, in general,
(*) the roots of x2-bx-(b+1)=0 and
(**) the roots of x2-bx-b=0.Here we are assuming that b > 0.
(i) First show by factoring that the roots of equation (*) are b+1 and -1.
(ii) Then use the quadratic formula to express the roots of (**) in terms of b.
(iii) Compare the positive roots of these equations by subtracting them and (after algebraic manipulation and simplication), show that the absolute value of the difference is less than 1/(b+1).
Note: For b=10000, this error is therefore less than 0.0001.
(c) Explain intuitively why the roots of the original equation and the 'approximating' equation are virtually the 'same' for 'large' values of b. One possibility here is to consider how the graphs of the associated quadratic functions are related. What do they have in common? How are they different?
Note: Subtle point here for students. Even though the difference of the function values (i.e., y-values) is always 1, this is not true of the difference between their zeros! This may be the essence of the numerical analysis in this investigation.
EXTENSION/PRACTICE
Ok, now "solve" x2 - (googol)x - googol = 0 without a calculator.
RELATED PROBLEM:
Without your calculator show that √(10001) - √(10000) is less than 0.005.
Does this provide us with an effective method of approximating the square root of some large numbers or is it limited and impractical?
For Calculus students: How does this compare to using linearization to approximate the square root?
For more advanced calculus students: Newton's Method? The Binomial Formula (using fractional exponents)? A Taylor Polynomial approximation? All equivalent?
Posted by Dave Marain at 10:37 PM 10 comments
Labels: advanced algebra, approximation, precalculus, theory of equations