Path: utzoo!attcan!uunet!tellab5!ram From: ram@tellabs.com (Bob Martin) Newsgroups: comp.sys.handhelds Subject: Re: A little problem for a HP48sx Summary: Can't do it symbolically Message-ID: <4064@tellab5.tellabs.com> Date: 5 Oct 90 00:37:13 GMT References: <2A7CD53A451F00CC7F@vms2.uni-c.dk> Sender: news@Tellabs.COM Organization: Tellabs, Inc. Lisle IL Lines: 71 In article <2A7CD53A451F00CC7F@vms2.uni-c.dk> ECO8941@ECOSTAT.AAU.DK ("Povl H. Pedersen") writes: >As I do not have a HP48sx currently, I will be glad if there is >somebody who would try to let the HP48sx find the symbolic solution >to the following function. >Integral of e^((y^2)/2) solved with respect to y, >and I would also like the numerical solution, which is finite >and surely exists. >Povl H. Pedersen According to the HP manual, pg. 429-430, the 48SX can symbollically integrate: 1) All built in functions whose anti-derivatives are other built in functions 2) Sums, differences, and negations of #1 above 3) The derivatives of built in functions (i.e. INV(1+X^2) => ARCTAN ) 4) Polynomials whose base term is linear (X^2+3X+1 but not (X^2-6)^3+(X^2-6)^2) 5) Selected patterns composed of functions whose antiderivatives are expressible in terms of other built in functions, for example 1/(COS(X)*SIN(X)) => LN(TAN(X)). In other words, certain special cases they decided to support. Now page 431 explains how otherwise non-itegrable functions can be approximated using Taylor's polynomials, and their example is e^(x^2), which is very similar to your problem (e^(.5x^2)). They specifically state that this expression "is not integrable by any of the methods thus far described in this chapter". So, to answer the first part of your question, the HP48SX cannot SYMBOLICALLY integrate your expression. Now, to answer the second part of your question, you say the numerical solution is finite and surely exists. What I do not know are your limits of integration. If I use the limits 0 and oo (infinity), the answer is infinite, so I assume you mean some specific limits. Below are some sample results obtained using the 48SX. Taylor's Polynomial: 4th order - 1 + .5*y^2 + .125*y^4 6th order - 1 + .5*y^2 + .125*y^4 + .0208*y^6 Numerical integration, degree of accuracy = .01% Numerical 4th order 6th order limits: (0,2) result: 4.7289 5 6.3312 (0,5) 56148.4372 91.625 416.625 (0,10) 5.2382E20 1301.000 22101.000 Some notes of interest: The numerical solution took about 20 seconds for any given value of y, and of course the result had an accuracy of .01%. The 4th order Taylor took a little less than 1 minute to calculate, and the 6th order took about 3.5 minutes. I tried getting the 8th order Taylor but decided to give up after about 6 minutes. However, the 4th and 6th order Taylor's are way off, so I doubt the patience required to obtain the 8th order would have been worth it. *** Moderate flame on *** While computing the 8th order Taylor described above, I decided to give up and terminate execution. Remembering that I read in the manual the ON key terminates program execution, I hit the ON key. Several times. I held it down for 10 seconds. Nothing. The Taylor computation just kept chugging. Apparently hitting on only terminates a user program. I hate to think that I might accidentally execute some command that I have no way to terminate, which ties up my calculator for days. Fortunately, my calculator is new, so I didn't have any valuable information in it, so I tried ON-C and that did the trick. Hope this helps -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Bob Martin | ram@tellabs.com ...!uunet!tellab5!ram Tellabs, Inc. | "Listen to me now, and believe me later" Lisle, IL. 60532 | - Hans und Franz