24 February 2011

How do graphing calculators do numeical integration?

Here's a question I don't know the answer to, which Sam Shah asked: how does the TI-83 do ∫-zz exp(-x2) dx, or more generally numerical integration? Of course as z goes to ∞ this approaches √π, with very small tails. (The link goes to an old post of mine that unfortunately has broken LaTeX; you can read the alt text for the images. The idea is that in∫z exp(-x2) dx, the integrand can be bounded above by the exponential exp(-z2-2xz); integrating this, the original integral is less than exp(-z2)/2z and this is pretty tight. And yes, I know, I should switch to a platform with LaTeX support.)

So you expect to get something near √π for any reasonably large value of z. But if z is large enough -- say 1000 -- then you get a very small value, in this case on the order of 10-7. Presumably if the range of integration is wide enough, then the integration method used by the calculator doesn't actually pick up the central region where the action is actually happening.

3 comments:

Yaroslav said...

I'm using MathJax for math and it works fairly well. Put the snippet from http://pastebin.com/ETPfQuSF right after "head" tag in your blog template (under "Design"/"Edit HTML"), then anything between $ or $$ will render as formulas

zeebo said...
This comment has been removed by the author.
zeebo said...

On the TI-84 it uses the Gauss-Kronrod quadrature (source)

It's probably the same for the 83+.