Elliptic integrals

11012017, 10:00 AM
(This post was last modified: 11022017 05:47 PM by salvomic.)
Post: #1




Elliptic integrals
hi everybody,
I put in the Prime Software Library a first attempt to make a program to handle Elliptical integrals (1st, 2nd and 3rd kind). It calculate: ell1F(x, k) > F, Elliptic integral of first kind ell2E(x, k) > E, Elliptic integral of second kind ell3∏(x, k, n) > ∏, Elliptic integral of third kind But it needs to have some controls to avoid singular values and other issues. More, it could be expanded to calc also sn(), cn(), dn() [sometimes called amplitude sine, amplitude cosine, delta amplitude] and other parameters... In that program k is the "eccentricity", n (only for 3rd type) is a number called "characteristic" of the various curves. The program handle the "incomplete" integrals. For now, to attempt the complete ones, put x=1. I invite to collaborate and make a stronger and more stable and useful program, if you want. Thank you! you're welcome. Salvo M. ∫aL√0 (@salvomic, IT9CLU)  HP Prime, 50g, 12C :: HP Prime Software Library 

11022017, 05:42 PM
(This post was last modified: 11022017 05:54 PM by salvomic.)
Post: #2




RE: Elliptic integrals
These integrals are related to the Jacobi Elliptic Function (see in Wikipedia).
See here in the Library my version for the Prime. About the two version of 1st kind integral I used in the two programs, they are related, being the same integral: x = sin(φ), then φ=ASIN(x), m=k^2... The relation involve also sn(), cn(), dn() [sometimes called amplitude sine, amplitude cosine, delta amplitude However I get values a bit different (see attachment): what kind of rounding is responsible of the difference, in this case? A part of the examples in the attached image, another example: in the first case for the function ell1F() I test x=1 k=0.4 then ell1F(1,0.4) that returns 1.63999977306; in the second case (Jacobi) for the function Jacobi_fn() I test φ=ASIN(x), m=0.4^2 that returns 1.63999986587... First case: the integral is int(1/(SQRT((1t^2)*(1(k^2)*t^2))),t,0,x); Second case: the integral is int(1/(SQRT(1m*SIN(θ)*SIN(θ))),θ,0,φ). The *should* be the same value. laTeX form (Wikipedia): 1st form 2nd form What about it? Salvo ∫aL√0 (@salvomic, IT9CLU)  HP Prime, 50g, 12C :: HP Prime Software Library 

11032017, 01:54 PM
Post: #3




RE: Elliptic integrals
In the first pair of calculations you are integrating over a singularity at the end of the integration internval when you use the nontrig defiinition (i.e. at x=t=1). The trig version does not have that singularity. So I suspect that the integration algorithm gives you a less accurate result because of that singularity, i.e. it is not so good at guessing the limit of the improper Riemann integral.
This seems to be comfirmed by the second pair of calculations where you are staying away from the singularity and the results are essentially the same. 

11032017, 03:41 PM
(This post was last modified: 11032017 03:48 PM by salvomic.)
Post: #4




RE: Elliptic integrals
(11032017 01:54 PM)AlexFekken Wrote: In the first pair of calculations you are integrating over a singularity at the end of the integration internval when you use the nontrig defiinition (i.e. at x=t=1). The trig version does not have that singularity. So I suspect that the integration algorithm gives you a less accurate result because of that singularity, i.e. it is not so good at guessing the limit of the improper Riemann integral. thank you for the explaining, Alex. Yes, I left the first pair in non trig definition for studying purpose, as they are well know in this form, however you are right: so there is a singularity to avoid (and in effect the Prime gives also a message first to calculate). Surely the code could be stronger, but I'd not want to pass at trigform for the 1st pair, for now... Salvo ∫aL√0 (@salvomic, IT9CLU)  HP Prime, 50g, 12C :: HP Prime Software Library 

11072017, 12:51 PM
Post: #5




RE: Elliptic integrals
Thank you salvomic!


11072017, 01:30 PM
Post: #6




RE: Elliptic integrals
∫aL√0 (@salvomic, IT9CLU)  HP Prime, 50g, 12C :: HP Prime Software Library 

« Next Oldest  Next Newest »

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