Post Reply 
HP Prime Numerical Integration
08-04-2022, 04:50 PM
Post: #3
RE: HP Prime Numerical Integration
(08-03-2022 06:15 PM)Ruda975 Wrote:  int(1/SQRT(1-3*(SIN(T)^2)),T,0,2)

When approximated in HP Prime this results in 1.00107718634 - 1.49027809758*i

XCAS int(...) is using the same algorithm, with full 53 bits precision (HP Prime use 48 bits)

XCAS> int(1/sqrt(1-3*sin(x)^2), x, 0., 2.)

Low accuracy, error estimate 3.0628046608e-06.
Error might be underestimated if initial boundary was +/-infinity

1.00107391075 - 1.49027871636*i

XCAS only get 6 digits accuracy, HP Prime getting 7 is just lucky.

With a pole within integral limits, even XCAS getting 6 correct digits is luck.
Error estimate seems to be in the right ballpark ... but, don't bet on it.

---

To accurately calculate EllipticF by integration, we locate the pole, and not touch it.

pole = ± asin(sqrt(1/3)) + n*pi ≈ ± 0.6155 + n*pi
For pi/2 .. 2, there is no pole.

N[integrate (1/sqrt(1-3sin^2(t)) dt from pi/2 to 2)] = -0.31885796059775706 i

Using AGM, complete elliptic integral of the first kind does not care where pole is.
EllipticK(3) = pi/2 / AGM(1, sqrt(1-3)) = 1.0010773804561062 - 1.1714200841467699 i

Sum 2 terms, we have EllipticF(2,3) = 1.0010773804561062 - 1.490278044744527 i
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP Prime Numerical Integration - Ruda975 - 08-03-2022, 06:15 PM
RE: HP Prime Numerical Integration - Albert Chan - 08-04-2022 04:50 PM



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