HP Forums

Full Version: Another oddity, integral in home
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
when integrating (sqrt(tan X) - sqrt(sin X))/X^3) from 0 to 1 in home, Prime comes up with .525538402699.

WP 34S and TI NSpire come up with .5256+.

This also appears to be related to how each device handles X approaching zero as in the graphing oddity that I submitted recently.

Is the Prime's numerical integration algorithm suspect in these type of circumstances (i.e., numerators that approach zero below the resolution of the device significant digits)?

CASIO 9860gii times out on this integration.
Likely interesting to know how the various numerical algorithms deal with integrations where a 0/0 f(X) is encountered in the problem...strengths and weaknesses!
Home mode
∫( ( √( TAN(X) ) - √( SIN(X)) )/X^3, X, 0, 1) -> 0.525538402699


CAS mode:
integrate((√(tan(x))-√(sin(x)))/x^3,x,0,1) A message is displayed with "[1,0,%%%{-2+2*i .....]" ?
Hi!
On my Ti Nspire CX, the numerical result is 0,5263.
With numerical integrate with 4 digits on Mathematica 11 I get 0,5262
Marcel
HP 50g on fix 5 produces .52539
PocketCAS Pro (iPad) gives [0.52338429708,0.526548984139]
From CAS, you get the same, with a warning displayed.
You can get a more precise result like this:
a:=∫( ( √( TAN(x) ) - √( SIN(x)) )/x^3, x, 1e-4, 1);
b:=series(( √( TAN(x) ) - √( SIN(x)) )/x^3, x=0,10,polynom);
c:=int(b,x,0,1e-4);
a+c;
returns
0.52629190882
It is interesting to compare the results of HP Prime with the results of Geogebra.
We do this for the function we are talking about, let’s call it F(x), not for the integral.

Interesting about Geogebra is that it can calculate expressions with a precision of 100 significant digits, by using its cas command: Numeric[F(x),100].

So we can assume that the results of Geogebra are reliable.

We are also interested in the Taylor expansion of F (series or taylor command) and let its highest order term be (x^9)*√x.
We call this function T(x).


Now we calculate F(0.1) and T(0.1) in the Prime’s CAS.
This gives:
F(0.1)=0.792222219896
T(0.1)=0.792222219897. Geogebra gives Fgeo=0.79222221989709.........

So it is interesting to see that even for x=0.1 the Taylor expansion on the Prime is accurate until the last digit and even a bit more accurate than the direct calculation of F(0.1).

It is not surprising that this is not so anymore for F(1) and T(1).
In that case F(1) is completely precise, and T(1) much less.

Let’s see what the results are for x=1E-4.
Then:
F(1E-4)=25.0000020685
T(1E-4)=25.0000000521 and Fgeo=25.000000052083.......

Let’s finaly see what the results are for x=1E-12.
Then:
F(1E-12)=0.
T(1E-12)=250000. and Fgeo=250000.00000000000000.....

Thus we observe that the Taylor expansion keeps being completely precise, whereas F(x) is getting less and less precise.

So we can conclude that the power of using a Taylor expansion is indeed impressive.

I have firmware version 8151.
Reference URL's