HP Prime Numerical Integration
|
08-03-2022, 06:15 PM
Post: #1
|
|||
|
|||
HP Prime Numerical Integration
Hello,
I'd like to know the method of numerical integration the hp prime uses, because it's great. For example, I tried to compute the incomplete elliptic integral of the first kind: EllipticF(x,m) = integrate 1/sqrt(1 - msin^2(t)) dt from 0 to x For parameters x=2, m=3, so: EllipticF(2,3) = integrate 1/sqrt(1 - 3sin^2(t)) dt from 0 to 2 Wolfram Alpha tells me that the result is: EllipticF(2,3) = 1.001077-1.490278*i On HP Prime the command would be: int(1/SQRT(1-3*(SIN(T)^2)),T,0,2) When approximated in HP Prime this results in 1.00107718634 - 1.49027809758*i When I tried the same thing in Wolfram Alpha: N[integrate (1/sqrt(1-3sin^2(t)) dt from 0 to 2)] the result is 0.9996911316703074 - 1.4848975811276912*i Then I tried other methods, such as programming my own methods in python. I tried the Romberg integration, Gauss Legandre Quadrature, Simpson Rule, Gauss Kronrod. None of which worked as good. Even romberg in HP Prime can't calculate it well enough. romberg(1/sqrt(1-3*(sin(t)^2)),t,0,2) returns the last approximation 0.991198869818-1.47660568998*i The scipy.integrate.quad in python works well enough, but it's not as good as HP Prime int. Since 1/sqrt(1-3sin^2(x)) has poles from 0 to 2, I suspect that some pole finding algorithm might be used. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP Prime Numerical Integration - Ruda975 - 08-03-2022 06:15 PM
RE: HP Prime Numerical Integration - KeithB - 08-04-2022, 12:18 PM
RE: HP Prime Numerical Integration - Albert Chan - 08-04-2022, 04:50 PM
|
User(s) browsing this thread: 1 Guest(s)