HP Forums
can the prime really not solve this integral? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: can the prime really not solve this integral? (/thread-780.html)

Pages: 1 2


can the prime really not solve this integral? - DeucesAx - 02-27-2014 06:47 AM

I tried solving int(x^3/(e^3-1),x, 0,infinity) (this I ti89 notation, I did not type it like this) on the Prime without success. My nspire does it, even my ti89 does it without a problem. Please tell me this is a user error, otherwise I finally throw the prime out of the window.


RE: can the prime really not solve this integral? - massimo - 02-27-2014 07:27 AM

Where is the problem? It is a simple cubic function and CAS hasn't any problem.


RE: can the prime really not solve this integral?yy - DeucesAx - 02-27-2014 08:03 AM

This is what I got:

[Image: oswy78.jpg]

First without, then with pressing shift before entering.


RE: can the prime really not solve this integral? - patrice - 02-27-2014 08:08 AM

Did you try +infinity ?

By the way, Emulator and CK permit to do screen shoots


RE: can the prime really not solve this integral? - DeucesAx - 02-27-2014 08:19 AM

I'm typing this on my phone while trying to sleep Smile
No change with the plus sign.


After more hacking on buttons I found out it works if you place an "approx" in front of the integral. I'm probably going to have nightmares of having to use the Prime on an exam.


RE: can the prime really not solve this integral? - eried - 02-27-2014 08:45 AM

(02-27-2014 08:19 AM)DeucesAx Wrote:  I'm typing this on my phone while trying to sleep Smile
No change with the plus sign.


After more hacking on buttons I found out it works if you place an "approx" in front of the integral. I'm probably going to have nightmares of having to use the Prime on an exam.

hahaha... thanks the spaggetti monster that I have my trusty 50g as backup---- *won't turn on due inactive time* (every 2-3 days someone writes me thru my website telling me that his 50g does not turn on anymore after long inactivity periods)


RE: can the prime really not solve this integral? - DrD - 02-27-2014 10:33 AM

(02-27-2014 08:19 AM)DeucesAx Wrote:  I'm typing this on my phone while trying to sleep Smile
No change with the plus sign.


After more hacking on buttons I found out it works if you place an "approx" in front of the integral. I'm probably going to have nightmares of having to use the Prime on an exam.

Did you mean to use e^x (instead of e^3, as in the op)?


RE: can the prime really not solve this integral? - CR Haeger - 02-27-2014 11:24 AM

(02-27-2014 06:47 AM)DeucesAx Wrote:  I tried solving int(x^3/(e^3-1),x, 0,infinity) (this I ti89 notation, I did not type it like this) on the Prime without success. My nspire does it, even my ti89 does it without a problem. Please tell me this is a user error, otherwise I finally throw the prime out of the window.

Might be user error.

With CAS exact unchecked get 6.49 for the definite integral. It does seem to hang in function app if you try to compute signed area for say x=0-100.

For indefinite solution I'm not sure.


RE: can the prime really not solve this integral? - parisse - 02-27-2014 12:21 PM

You get a numeric answer with:
int(x^3/(exp(x)-1),x,0,inf)
then shift-enter.
x^3/(exp(x)-1) does not have an antiderivative than you can express with elementary function (special functions required, polylogs here). There is probably a trick than can give you the exact answer (pi^4/15) for the definite integral, any idea? On a voyage 200, you don't get the exact value by the way.


RE: can the prime really not solve this integral? - Tugdual - 02-27-2014 12:37 PM

(02-27-2014 08:19 AM)DeucesAx Wrote:  I'm probably going to have nightmares of having to use the Prime on an exam.
I already mentioned that. I was initially thinking of offering the Prime to my daughter until I realized I had no intention to sabotage her studies.
As I write this, I have not yet been able to do the integration on your example...


RE: can the prime really not solve this integral? - CR Haeger - 02-27-2014 12:39 PM

(02-27-2014 12:21 PM)parisse Wrote:  You get a numeric answer with:
int(x^3/(exp(x)-1),x,0,inf)
then shift-enter.
x^3/(exp(x)-1) does not have an antiderivative than you can express with elementary function (special functions required, polylogs here). There is probably a trick than can give you the exact answer (pi^4/15) for the definite integral, any idea? On a voyage 200, you don't get the exact value by the way.

Thanks - I keep forgetting to use shift enter.

Hitting "a b/c" seems to convert 6.49 to the fraction equivalent to pi^4/15.


RE: can the prime really not solve this integral? - Terje Vallestad - 02-27-2014 02:11 PM

(02-27-2014 12:21 PM)parisse Wrote:  You get a numeric answer with:
int(x^3/(exp(x)-1),x,0,inf)
then shift-enter.
x^3/(exp(x)-1) does not have an antiderivative than you can express with elementary function (special functions required, polylogs here). There is probably a trick than can give you the exact answer (pi^4/15) for the definite integral, any idea? On a voyage 200, you don't get the exact value by the way.

Possibly a dumb question, but why is the result dependent on the Rad/Deg setting when solving this? If the calc is in Degrees the result (on my calculator) is 372.07.... Other integrals involving exp(x) (for instance int(exp(x^2),x,0,.5)) seems not to be influenced by the Deg/Rad setting. Am I missing something?

Cheers, Terje


RE: can the prime really not solve this integral? - Han - 02-27-2014 02:14 PM

(02-27-2014 02:11 PM)Terje Vallestad Wrote:  
(02-27-2014 12:21 PM)parisse Wrote:  You get a numeric answer with:
int(x^3/(exp(x)-1),x,0,inf)
then shift-enter.
x^3/(exp(x)-1) does not have an antiderivative than you can express with elementary function (special functions required, polylogs here). There is probably a trick than can give you the exact answer (pi^4/15) for the definite integral, any idea? On a voyage 200, you don't get the exact value by the way.

Possibly a dumb question, but why is the result dependent on the Rad/Deg setting when solving this? If the calc is in Degrees the result (on my calculator) is 372.07.... Other integrals involving exp(x) (for instance int(exp(x^2),x,0,.5)) seems not to be influenced by the Deg/Rad setting. Am I missing something?

Cheers, Terje

Do you also have complex mode on? Since \( e^{i\theta} = cos\theta + i \sin \theta \) the angle mode would affect the result.


RE: can the prime really not solve this integral? - Terje Vallestad - 02-27-2014 02:29 PM

(02-27-2014 02:14 PM)Han Wrote:  Do you also have complex mode on? Since \( e^{i\theta} = cos\theta + i \sin \theta \) the angle mode would affect the result.

Yes I thought of that, but it does not seem to have any effect on the result whether complex mode is ticked or not, except for getting a warning message about complex answers when it is set.

Cheers, Terje


RE: can the prime really not solve this integral? - Tugdual - 02-27-2014 03:47 PM

(02-27-2014 02:11 PM)Terje Vallestad Wrote:  Possibly a dumb question, but why is the result dependent on the Rad/Deg setting when solving this? If the calc is in Degrees the result (on my calculator) is 372.07.... Other integrals involving exp(x) (for instance int(exp(x^2),x,0,.5)) seems not to be influenced by the Deg/Rad setting. Am I missing something?
Cheers, Terje
Had the same question... so I took my 15C and tried both. As a result I always get pi^4/15 deg or rad which makes much more sense.


RE: can the prime really not solve this integral? - C.Ret - 02-27-2014 05:44 PM

Hi,

I am just wondering, how did you integrate up to infinity on your HP-15C ?

I just curious, I have a weak practice of this calculator especially with the solver and the integration ... only use it with defined numeric intervals !


RE: can the prime really not solve this integral? - parisse - 02-27-2014 07:08 PM

We almost never test the CAS in degree mode, therefore more bugs are expected there. The reason here is that for numeric integration with an infinite boundary you must make a change of variable, here we set tan(y)=x for y in 0..pi/2, dx=(1+tan(y)^2)*dy ... except that in degree mode you must add a pi/180 factor.


RE: can the prime really not solve this integral? - Manolo Sobrino - 02-27-2014 09:11 PM

(02-27-2014 12:21 PM)parisse Wrote:  You get a numeric answer with:
int(x^3/(exp(x)-1),x,0,inf)
then shift-enter.
x^3/(exp(x)-1) does not have an antiderivative than you can express with elementary function (special functions required, polylogs here). There is probably a trick than can give you the exact answer (pi^4/15) for the definite integral, any idea? On a voyage 200, you don't get the exact value by the way.

No, no, you don't use primitives for this, come on. You could use contour integration/Residue Theorem, but it's a bit tricky for this. See for instance:

http://en.wikipedia.org/wiki/Stefan_boltzmann_law#Appendix

The easy way is:

http://math.stackexchange.com/questions/413571/how-can-i-calculate-int-0-infty-u3-eu-1-du

That integral appears when you integrate the Planck distribution to all frequencies in order to recover the Stefan-Boltzmann law, also in the Debye theory of specific heat. The functions defined by these integrals are called Debye functions. See Abramowitz-Stegun §27.1

http://people.math.sfu.ca/~cbm/aands/page_998.htm

(Now that I'm thinking about it, it shouldn't be too difficult to implement a large class of definite integrals by the Residue theorem. That would be come in handy.)


RE: can the prime really not solve this integral? - jte - 02-28-2014 01:51 AM

(02-27-2014 11:24 AM)CR Haeger Wrote:  
(02-27-2014 06:47 AM)DeucesAx Wrote:  I tried solving int(x^3/(e^3-1),x, 0,infinity) (this I ti89 notation, I did not type it like this) on the Prime without success. My nspire does it, even my ti89 does it without a problem. Please tell me this is a user error, otherwise I finally throw the prime out of the window.

Might be user error.

With CAS exact unchecked get 6.49 for the definite integral. It does seem to hang in function app if you try to compute signed area for say x=0-100.

For indefinite solution I'm not sure.

Are you performing a signed area computation for X^3/(e^X-1), from 0 to 100, in the Function app Plot view? I just tried this on the emulator and on the device. Neither hanged for me — both quickly brought up a numerical approximation.

Can you reliably reproduce the hang?


RE: can the prime really not solve this integral? - rkf - 02-28-2014 04:52 AM

(02-27-2014 07:08 PM)parisse Wrote:  We almost never test the CAS in degree mode, therefore more bugs are expected there. The reason here is that for numeric integration with an infinite boundary you must make a change of variable, here we set tan(y)=x for y in 0..pi/2, dx=(1+tan(y)^2)*dy ... except that in degree mode you must add a pi/180 factor.

Interestingly enough, both HP50g, and TI-92 Plus, give a numerically correct approximation to the exact answer (pi^4/15) independent of the degree/radiant setting :-)