Post Reply 
[BUG] CAS looping forever
03-08-2014, 06:13 PM (This post was last modified: 03-08-2014 06:21 PM by Tugdual.)
Post: #1
[BUG] CAS looping forever
Trying to integrate using radians:
$$\int_{3}^{5}\tan (\sin \left ( x \right )+\ln \left ( \left | x \right | \right ))dx$$

Home returns 2.067...
CAS loops forever on emulator and freezes the physical device.

Edit: Epsilon was super small, like 1e-12 which is the default value. I tried to change Epsilon to 0.01 and got a message "Restoring epsilon to 1e-6 from 0.01". Loops again...
Find all posts by this user
Quote this message in a reply
03-08-2014, 07:07 PM (This post was last modified: 03-08-2014 07:25 PM by Mark Hardman.)
Post: #2
RE: [BUG] CAS looping forever
(03-08-2014 06:13 PM)Tugdual Wrote:  Trying to integrate using radians:
$$\int_{3}^{5}\tan (\sin \left ( x \right )+\ln \left ( \left | x \right | \right ))dx$$
Home returns 2.067...
CAS loops forever on emulator and freezes the physical device.

Just taking the indefinite integral of \(\int \tan \left ( \sin \left ( x \right ) \right ) dx\) produces a result that is 122,286 characters long!

integrate((-5*sin(x)+6*e^(cos(x)*((cos(x))²-(sin(x))²-1)/((cos(x))²+(sin(x))²)+sin(x)*2*cos(x)*sin(x)/((cos(x))²+(sin(x))²))*sin(
...<SNIP>...
+(sin(x))²)))²-216*(cos(x))²*(sin(x))²+132*cos(x)^4+132*sin(x)^4+24*(cos(x))²-24*(sin(x))²+2),x)

Impressive if the result is correct.

Mark Hardman

Ceci n'est pas une signature.
Find all posts by this user
Quote this message in a reply
03-08-2014, 07:33 PM
Post: #3
RE: [BUG] CAS looping forever
It does not have an antiderivative that can be expressed with elementary function therefore you must do numeric integration using approx boundaries. I probably should add a check in the autosimplification function, if you set it to none you get the unevaluated "exact" answers without problems.
Find all posts by this user
Quote this message in a reply
03-08-2014, 08:21 PM
Post: #4
RE: [BUG] CAS looping forever
(03-08-2014 07:33 PM)parisse Wrote:  you must do numeric integration using approx boundaries.
Hi Parisse, it was indeed my intention to look for an approximation. How do you do "an integration using approx boudaries"? Do you mean Home version?
Find all posts by this user
Quote this message in a reply
03-08-2014, 08:46 PM (This post was last modified: 03-08-2014 08:46 PM by Mark Hardman.)
Post: #5
RE: [BUG] CAS looping forever
(03-08-2014 08:21 PM)Tugdual Wrote:  How do you do "an integration using approx boudaries"?

He means that you should specify real values for the limits of integration:

$$\int_{3.0}^{5.0}\tan (\sin \left ( x \right )+\ln \left ( \left | x \right | \right ))dx$$

This gives the same approximation you get in Home mode (2.06725680644).

Mark Hardman

Ceci n'est pas une signature.
Find all posts by this user
Quote this message in a reply
03-08-2014, 11:09 PM
Post: #6
RE: [BUG] CAS looping forever
I get the same results here, when using approximate (real) boundaries.
However the time to compute the same result is quite different between Home and CAS environments:
Home takes about 2 seconds, and CAS answer is instantaneous !
So the Prime gives the same apparent result, but it is using different algorithms, where one takes significant more time than the other?

Jose Mesquita
RadioMuseum.org member

Find all posts by this user
Quote this message in a reply
Post Reply 




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