Wednesday, 08 March 2006, 14:10:56 EST
One of my courses this semester is a numerical methods course. Basically, it is the study of algorithms as related to mathematics. Since computers have finite memory, they can only work with finite numbers. Many calculations deal with numbers that are anything but finite. The numerical methods course is intended to teach me how to work around this sort of problem when programming mathematical routines on a computer. It is, of course, more involved than that but this description gives you some idea as to what today's post is about.
One problem introduced by the problem described above is subtractive cancellation. Let's say you are subtracting 1.0005 from 1.0 on a computer that can only hold four digits in memory; if this computer encounters a number smaller than 1.005 it will round to 0. On this imaginary computer 1.0 - 1.0005 will equal 1.0 not -0.0005. Of course, this same problem applies to functions like cosine, sine, and the logarithm. One way to avoid this cancellation is by using a Tayler series representation of the function, or parts of the equation, causing the problem. Well, this introduces accuracy errors of its own since the Taylor series is an approximation.
So, how do you know your equation is going to be accurate to a certain number of decimal places if you replace parts of it with an approximation? By using an appropriately accurate approximation of course! To determine how accurate a Taylor series is one must examine the remainder term of the series. That is to say, you can figure out how many terms of the series are necessary for an approximation of desired accuracy without going through many iterations of the series. This is a problem I was stuck on for quite some time this semester (way longer than I should have been). Since I have written up explanations to problems I have had difficulty with in the past, I have done the same thing for this one.
This time I am providing a PDF and a TeX file of my write-up. This is a lot easier to manage than my previous write-ups and more portable. The text is licensed under the same license as my music; if you make a derivative work just add a credits page or something and list me as the original author. I am providing the TeX file so that corrections can be sent to me if any need to be made. This write-up is accurate to the best of my knowledge, though. I asked my instructor to go over it a week ago but she still hasn't replied to me other than to say she doesn't mind me posting it (the problem covered in the text was one she assigned for graded work). If you find any mistakes, though, please let me know.