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!

2 comments:

Unknown said...

When in high school, I remember a section in Physics on approximating errors, which we had to do since we used logarithm tables rather than calculators, and the precision achievable was rather limited.

The approach used was to write (1+x)^(1/2) as 1+x/2 (for small x) (You can justify this either using the binomial theorem or a Taylor series, depending on the level of the student). The same kind of approach would pay dividends here, and lead to quite accurate answers.

TC

Dave Marain said...

tc--

I like that! All hs students should have an opportunity to see the approximation (1+x)^n "approx =" 1 + nx for "small" |x|, a consequence of Newton's Binomial Formula (which he extended to rational exponents), Maclaurin series or even the Newton-Raphson Method. Many of these approximation techniques have fallen out of favor because of technology but, in some ways, they are still just as useful and certainly of theoretical importance. How often do students learn the Mean Value Theorem or the Taylor Series Formula and pay little attention to the bounds for the "error" or "remainder", which in my opinion is just as important (if not more so) than the formula itself.
Happy New Year tc!