Problems of HP prime with triple integrals?
05-31-2020, 07:41 AM
Post: #1
 rawi Member Posts: 178 Joined: Nov 2019
Problems of HP prime with triple integrals?
Hi,

I tried to compute the following triple integral:
integral(integral(integral(e^(-x²+y²/2+1/z))dz)dy)dx
with the following limits: x: 0.,1.; y:0.,2.; z:1.,4.

Screenshot of the HP prime Pro software is attached.

I tried it with the HP Prime Pro PC software and with a HP prime G2. None delivered a solution within half an hour.

The TI-nspire CX II-T CAS came to the solution 17.147920 within 1 or 2 seconds. Even my old TI-89 titanium showed the same solution within 10 seconds.

Does the HP prime have problems with triple integrals or is there something I am doing wrong?

Thank you very much and best regards

Raimund Wildner

Attached File(s)
05-31-2020, 09:38 AM
Post: #2
 Nigel (UK) Senior Member Posts: 524 Joined: Dec 2013
RE: Problems of HP prime with triple integrals?
Any calculator will have trouble with triple integrals that don't factorise into a product of single-variable integrals. To evaluate such an integral numerically to a high degree of precision requires of the order of $$N^3$$ points, compared with $$N$$ points for similar precision for a single-variable integral.

Your integral factorises, so calculators that spot this can evaluate it rapidly. The Prime doesn't appear to check for this, so it evaluates the integral the long way.

I would guess that for multiple integrals that don't factorise the Prime and TI NSpire would be comparable, with the Titanium way behind!

Having said that, I am surprised that the Prime didn't finish at all. Perhaps there is a problem.

Nigel (UK)
05-31-2020, 10:54 AM
Post: #3
 Nigel (UK) Senior Member Posts: 524 Joined: Dec 2013
RE: Problems of HP prime with triple integrals?
Strange. If I change variables to $$u=1/z$$, then with exact mode ticked and approximate evaluation I get the correct answer to the triple integral at once, after a couple of messages.

With exact mode not ticked I get a message about using Romberg, then the calculator carries on calculating until interrupted.

With $$1/z$$ in the exponent I can't get an answer to the triple integral at all, although the equivalent single integral evaluates with no problem.

Something's not right!

Nigel (UK)
05-31-2020, 01:21 PM
Post: #4
 Albert Chan Senior Member Posts: 2,705 Joined: Jul 2018
RE: Problems of HP prime with triple integrals?
(05-31-2020 10:54 AM)Nigel (UK) Wrote:  Strange. If I change variables to u=1/z, then with exact mode ticked and approximate evaluation I get the correct answer to the triple integral at once, after a couple of messages.

With u=1/z, integral is trivial to evaluate, with integration by parts

$$\large \int e^{1\over z}\;dz = \int e^u\;d({1\over u}) = {e^u \over u} - \int {1 \over u}\;d(e^u) = {e^u \over u} - Ei(u)$$
05-31-2020, 04:04 PM
Post: #5
 lrdheat Senior Member Posts: 869 Joined: Feb 2014
RE: Problems of HP prime with triple integrals?
The TI-Nspire CX 2 (non CAS) also manages to report the correct answer...
[/u]
05-31-2020, 04:10 PM
Post: #6
 rawi Member Posts: 178 Joined: Nov 2019
RE: Problems of HP prime with triple integrals?
(05-31-2020 09:38 AM)Nigel (UK) Wrote:  Having said that, I am surprised that the Prime didn't finish at all. Perhaps there is a problem.

Hi Nigel,

thanks a lot for your answer. HP prime really seems to have a problem here. I tried it once more and after about an hour there came a message like "A problem occured to HP Prime and it will switch off in 3 seconds". Then it switched off. If switched on again everything is normal, no message. So normally you will not see it.

So I think I have to program it step by step, e.g. using Gauss' or Romberg's method.

Best

Raimund
01-07-2021, 07:23 PM
Post: #7
 parisse Senior Member Posts: 1,327 Joined: Dec 2013
RE: Problems of HP prime with triple integrals?
It's easier to compute the product of 3 integrals
Code:
int(exp(-x^2),x,0,1)*int(exp(y^2/2),y,0,2)*int(exp(1/z),z,1,4.0)
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)