0

To get a numerical evaluation of the first (K) and second (E) complete elliptic integrals:

$$K(k)=\int_0^1\frac{dt}{(1-t^2)^{1/2}(1-k^2t^2)^{1/2}}, \ \ \ \ \ E(k)=\int_0^1\frac{(1-k^2t^2)^{1/2}}{(1-t^2)^{1/2}}dt$$

in a left neighbourhood of the point $k=1$. What numerical methods do you recommend to get a "good" approximation of K and E in a left neighbourhood of the point $k=1$?

Mark
  • 103
  • 2

2 Answers2

1

A truncated power series about $k=1$ is one way. You can find several forms at functions.wolfram.com for $K(k)$ and $E(k)$. The number of terms used should allow you to estimate your error for a given neighborhood size.

Matlab's ellipke uses a simple arithmetic–geometric mean method (see Abramowitz & Stegun) to find values for any $k$.

horchler
  • 763
  • 1
  • 5
  • 17
0

The scipy package for Python has ellipkm1 "The complete elliptic integral of the first kind around m=1."

k20
  • 772
  • 3
  • 3
  • Sadly this function is a very limited implementation, it works only for real arguments 0 <= m <= 1. So it is not really practical. – DerWeh Jul 26 '19 at 09:59