Integrals and singularities
|
05-06-2015, 05:10 PM
(This post was last modified: 05-06-2015 08:09 PM by Marcio.)
Post: #1
|
|||
|
|||
Integrals and singularities
Hello
Does anyone know how to numerically solve integrals with singularities like this one below on the Prime or the 50g? \[ \int_{0}^{a} \frac{1}{a^n-x^n} dx \] Assign \(a=2\), \(n=3\) and the Prime will reboot and erase data from the "stack" in texbook entry mode. Thanks |
|||
05-06-2015, 08:55 PM
Post: #2
|
|||
|
|||
RE: Integrals and singularities
Hm,
as far as I understand, the integral does not converge? So I'm not sure about the answer the calculator should give. Maybe I'm wrong, maybe I did something wrong or I did not understand? Perhaps you could explain some more details? As far as I see, both, the 50g and the Prime, (and also my very old CASIO) deliver a result I would expect/I do understand. None of my calculators crashed. Greetings Dirk. |
|||
05-06-2015, 09:34 PM
(This post was last modified: 05-06-2015 09:48 PM by Marcio.)
Post: #3
|
|||
|
|||
RE: Integrals and singularities
(05-06-2015 08:55 PM)Dirk. Wrote: Hm, In CAS settings, if 'Exact' is unchecked, the calc will crash after a few seconds, like 5 or 10, otherwise it will return \(+\infty\). What results did you get from the calculators you used? How long did it take for each to deliver the results? Thanks Marcio |
|||
05-06-2015, 09:48 PM
(This post was last modified: 05-06-2015 09:50 PM by salvomic.)
Post: #4
|
|||
|
|||
RE: Integrals and singularities
I tried:
subst(subst(int(1/(a^n+x^n),x,0,a), a=2), n=3) and I got \( \int^{2}_{0}{\frac{1}{8-x^{3}}dx} \) and evaluating this one I got \infty (\(\infty\))... Do you mean this? No crash with firmware 6975... ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
05-06-2015, 09:51 PM
Post: #5
|
|||
|
|||
RE: Integrals and singularities | |||
05-06-2015, 09:54 PM
Post: #6
|
|||
|
|||
RE: Integrals and singularities
(05-06-2015 09:51 PM)Marcio Wrote: Uncheck 'Exact' and see if it crashes! unchecking "Exact" here Terminal gives "Adaptive method failures", then a strange result: [3488371061.16 2.84200102803] ??? ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
05-06-2015, 10:01 PM
(This post was last modified: 05-06-2015 10:03 PM by Marcio.)
Post: #7
|
|||
|
|||
RE: Integrals and singularities
(05-06-2015 09:54 PM)salvomic Wrote:(05-06-2015 09:51 PM)Marcio Wrote: Uncheck 'Exact' and see if it crashes! Mine says the same but the result that appears on the terminal is a bit different from yours, 2.94669952117, then it crashes in both Home and CAS views. |
|||
05-07-2015, 06:06 AM
Post: #8
|
|||
|
|||
RE: Integrals and singularities
Indeed. Will be fixed today in giac source code.
|
|||
05-07-2015, 03:56 PM
Post: #9
|
|||
|
|||
RE: Integrals and singularities | |||
05-07-2015, 04:36 PM
Post: #10
|
|||
|
|||
RE: Integrals and singularities
The problem occured because the adaptative method (computing the integral) fails, therefore Romberg method is called. If the function is undefined at an endpoint, then the algorithm tries to find the limit there. And limit is not protected against approx input.
This is now fixed in giac source (I have no idea if/when it will be fixed for the Prime). |
|||
05-07-2015, 06:10 PM
(This post was last modified: 05-07-2015 06:13 PM by Marcio.)
Post: #11
|
|||
|
|||
RE: Integrals and singularities
Well, it seemed to me that the Prime CAS handled the situation fairly well. The problem, however, was (still is) that the machine can't handle memory demanding operations. It crashed both the calculator and the emulator. The emulator took longer to crash because it's backed up by a PC. The 50g took about 30 min to deliver the result, which was not as accurate, but at least it did not crash.
|
|||
05-08-2015, 06:26 AM
Post: #12
|
|||
|
|||
RE: Integrals and singularities
The hp50g has a much better error handling system than the Prime. You can throw the equivalent of a c++ exception everywhere in the hp50g code. This made coding much safer, I really miss this functionnality and that explains why sometimes you can't interrupt a computation or it eventually crashes.
It does not mean the 50g is bugfree, there are CAS bugs there, but you will probably never hit them because you won't have the patience to wait. On the other hand, the Prime is constantly improving, at some point in the near future it will be as reliable as the ancient code of the 48g series, but able to solve much more. |
|||
05-13-2015, 10:24 PM
Post: #13
|
|||
|
|||
RE: Integrals and singularities
(05-06-2015 10:01 PM)Marcio Wrote: Mine says the same but the result that appears on the terminal is a bit different from yours, 2.94669952117, then it crashes in both Home and CAS views. Marcio, uncheking "exact" now in 7820 in CAS I get [0.938556... 2.87166...] after that the terminal wrote "Adaptive method failure, will try with Romberg, last approxmiation was 2.87166029039..." Is it better than first? Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
05-13-2015, 10:45 PM
Post: #14
|
|||
|
|||
RE: Integrals and singularities
(05-13-2015 10:24 PM)salvomic Wrote:Well, yes, at least it didn't crash like before.(05-06-2015 10:01 PM)Marcio Wrote: Mine says the same but the result that appears on the terminal is a bit different from yours, 2.94669952117, then it crashes in both Home and CAS views. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)