HP50g glitch  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: HP50g glitch (/thread213203.html) 
HP50g glitch  Crawl  03022012 There's an integral it gets the complete wrong answer to.
Oddly, it fails rather completely. It doesn't just report it can't get the right answer but reports a wrong answer. And it doesn't try awhile before it fails; it gives the wrong answer instantly. It also can give the right answer in approximate mode:
It can also do similar problems correctly in exact mode (when the exponent is smaller):
The TI89 can do it correctly:
[link:http://www.wolframalpha.com/input/?i=integral%28%28sin%28x%29%29^16*cos%282*x%29%2Cx%2C0%2C2*pi%29]Wolfram Alpha link on integral[/link]
Re: HP50g glitch  peacecalc  03032012 Hello Crawl,
I've checked your integral and get same result.
First idea: Maybe there is not enough memory for the stack operations.
The hp 50g is able to give the right result, when the integrand is But than it is necessary to get a hint that former result is wrong or the former integrand is not possible to integrate that you have the idea for transforming the integrand. Double booboo!
Sincerely Re: HP50g glitch  peacecalc  03032012 P.S.: It functioned till ^10 by ^12 it fails.
IF you use RISCH you get as antideriviate: 0,5*SIN(2*X)*SIN(X)^16, only the second factor was integrated by CAS. Very astonishing!
Re: HP50g glitch  Crawl  03032012 Quote: I don't know. You'd think if it was trying to do the integral but running out of memory, it would take a while before returning the wrong answer. Also, I would expect it to end with an error ("Out of Memory") rather than returning zero.
I'm wondering if, as some sort of time saving thing, the system tries to check if trigonometric integrals are even or odd (about their midpoint), and if they're odd, they immediately evaluate to zero. This one, of course, is even. But maybe there's a glitch in how it's checked? This is all just speculation, of course.
Re: HP50g glitch  peacecalc  03032012 Hello Crawl, I don't think that a checking for symmetry is responsible for this behavior, because ^8 or ^10 works, but not greater for example ^12 or ^16. If you take the step mode and interrupt while it is working, the stack is full with, symbols (even i, that shows me the CAS goes through the complex numbers).
Sincerely Re: HP50g glitch  Marcus von Cube, Germany  03042012 I had a discussion with Bernard Parisse about the topic. Here it is:
Quote:
Quote: Re: HP50g glitch  Ronald Williams  03042012 Marcus, thank you for contacting Bernard. Bernard, thank you for the handy workaround which should be applicable to similar type problems (not that I've come across any like this in my life). Maybe someone at HP could issue a new ROM 2.15+... with this fix :)
Ronald Williams
Re: HP50g glitch  peacecalc  03042012 Hello Marcus, thank you for your engagement in that stuff. And thank you to Bernard Parisse for his work and statement, which clears the situation, fast and furious. As my knowlege in the functionality of the hp 50g raises, raises my respect towards persons, who develops a CAS for an calculator. I hope my "double booboo" isn't misunderstood.
Sincerely Re: HP50g glitch  Crawl  03052012 Thanks for answering this.
Re: HP50g glitch  Ronald Williams  03062012 I took another look at this issue and I experimented with higher powers of the sine function up to 64 using Bernard Parisse's workaround. The actual results I get on the HP50g agree with what I'm getting using computer program XCAS. I did this for three cases. The exact integral gave "pi*27767032438524099/144115188075855872" in about 5 min. 22 seconds. The approximate integral using "sin(x)^64*cos(2*x)" in std format gave '.6052984857784' in about 55 seconds and the symbolic antiderivative (much to long to write out) in about 4 minutes 23 seconds. I set up a small RPL programs to compute the different cases and used the calculator's time function to compute the run times. I find this method easier than the stopwatch approach. I also looked at the TI89 emulator, TIEmu v2.00, version 2.05, HW2, all using unrestricted speed. The "sin(x)^64*cos(2*x)" case in exact mode ran for over 24 hours without a solution before I killed it The same case for the symbolic antiderivative took about 26 seconds but I could not verify that the answer is correct because it does not agree with Wolfram Alpha or XCAS or Xmaxima and I have no desire to try and work it out by hand, assuming I could without mistakes. The approximate mode case gave ".60529848578 in about 11 seconds. I then decided to try the original case "sin(x)^16*cos(2*x)" in exact mode and found it gave "715*pi/2048" in about 4 minutes 29 seconds. On the other hand the HP takes about 24 seconds using the workaround and not emulated. I am always amazed by the HP 49 series of calculators, they provide so many different ways to solve problems. However, the challenge for me is to master the machine and find one that works. One could say the HP 49 series represent the 'Swiss Army Knife' of calculators but then again I may be biased :)
Ronald Williams
Re: HP50g glitch  MacDonald Phillips  03062012 My TINSpire CAS CX computes the exact integral of sin(x)^64*cos(2*x) in about 11 seconds. It's the same answer as computed by Wolfram Alpha on my iPad. It's the same exact answer you got on the HP50g.
