ellint2: Extended elliptic integral of the second kind
Description
Evaluates the extended incomplete elliptic integral of the second kind.
The function is vectorized in m but not in phi.
Usage
ellint2(phi, m)
Value
A numeric vector of the same length as m.
Arguments
phi
amplitude, a number
m
values of the parameter, a vector of numbers lower than 1/sin(phi)^2
(NaN is returned if this condition is not satisfied)
Details
For -pi/2 <= phi <= pi/2, this is the integral of
sqrt(1 - m*sin(t)^2) for t between 0 and phi.
Then the function is extended to arbitrary phi by the formula
ellint2(phi + k*pi, m) = 2*k*ellint2(pi/2, m) + ellint2(phi, m) for
any integer k.