HP Forums

Full Version: [BUG] CAS looping forever
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
$$\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...
(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
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.
(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?
(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
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: