Path: utzoo!attcan!uunet!samsung!usc!elroy.jpl.nasa.gov!jarthur!nntp-server.caltech.edu!piglet!madler From: madler@piglet.caltech.edu (Mark Adler) Newsgroups: comp.sys.handhelds Subject: Re: Question - Indefinite Integration Message-ID: <1990Sep28.182551.14436@nntp-server.caltech.edu> Date: 28 Sep 90 18:25:51 GMT References: <20596@orstcs.CS.ORST.EDU> Sender: news@nntp-server.caltech.edu Organization: California Institute of Technology, Pasadena Lines: 25 Nntp-Posting-Host: piglet.caltech.edu I responded to the e^(y^2/2) integration question privately, but it seems others are curious ... First off, what he really wanted was e^(-y^2/2), which is rather different for real y, and also quite useful, being the gaussian distribution (up to normalization). There is no symbolic answer that can be expressed as a rational function of trig and/or log/exp functions (except for special values of the integration bounds like -infinity, 0, and infinity). What is done when you have a useful, unsolvable integral is "solve it by naming it". The integral is given a name (the error function or complementary error function, erf(x) or erfc()), and then you have tables and subroutines to evaluate it. In fact, the HP has a function that'll do it: UTPN (upper tail probability normal) in MATH/PROB. Given the arguments 0 1 x, UTPN will return the integral from x to infinity of e^(-t^2/2)/sqrt(2pi) dt. The sqrt(2pi) is to make the result one for x equal to -infinity. The complementary error function (erfc()) is a little different, but a simple transformation of UTPN will give it. Naturally, UTPN is much faster (and probably more accurate) than doing the integral numerically on the HP-48. Mark Adler madler@piglet.caltech.edu