Complete elliptic integrals of the first and second kinds
[
returns the complete
elliptic integrals of the first and second kinds.K
,E
] =
ellipke(m
)
Compute the complete elliptic integrals of the first and second kinds for these numbers. Because these numbers are not symbolic objects, you get floating-point results.
[K0, E0] = ellipke(0) [K05, E05] = ellipke(1/2)
K0 = 1.5708 E0 = 1.5708 K05 = 1.8541 E05 = 1.3506
Compute the complete elliptic integrals for the same numbers
converted to symbolic objects. For most symbolic (exact) numbers, ellipke
returns
results using the ellipticK
and ellipticE
functions.
[K0, E0] = ellipke(sym(0)) [K05, E05] = ellipke(sym(1/2))
K0 = pi/2 E0 = pi/2 K05 = ellipticK(1/2) E05 = ellipticE(1/2)
Use vpa
to approximate K05
and E05
with
floating-point numbers:
vpa([K05, E05], 10)
ans = [ 1.854074677, 1.350643881]
0
and 1
If the argument does not belong to the range from 0 to 1, then
convert that argument to a symbolic object before using ellipke
:
[K, E] = ellipke(sym(pi/2))
K = ellipticK(pi/2) E = ellipticE(pi/2)
Alternatively, use ellipticK
and ellipticE
to
compute the integrals of the first and the second kinds separately:
K = ellipticK(sym(pi/2)) E = ellipticE(sym(pi/2))
K = ellipticK(pi/2) E = ellipticE(pi/2)
Call ellipke
for this symbolic matrix. When
the input argument is a matrix, ellipke
computes
the complete elliptic integrals of the first and second kinds for
each element.
[K, E] = ellipke(sym([-1 0; 1/2 1]))
K = [ ellipticK(-1), pi/2] [ ellipticK(1/2), Inf] E = [ ellipticE(-1), pi/2] [ ellipticE(1/2), 1]
Calling ellipke
for numbers that are not symbolic objects invokes
the MATLAB®
ellipke
function. This function accepts only 0 <= m <=
1
. To compute the complete elliptic integrals of the first and second kinds
for the values out of this range, use sym
to convert the numbers to symbolic objects, and then call
ellipke
for those symbolic objects. Alternatively, use the ellipticK
and ellipticE
functions to compute the integrals
separately.
For most symbolic (exact) numbers, ellipke
returns
results using the ellipticK
and ellipticE
functions.
You can approximate such results with floating-point numbers using vpa
.
If m
is a vector or a matrix,
then [K,E] = ellipke(m)
returns the complete elliptic
integrals of the first and second kinds, evaluated for each element
of m
.
You can use ellipticK
and ellipticE
to compute elliptic integrals
of the first and second kinds separately.
[1] Milne-Thomson, L. M. “Elliptic Integrals.” Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. (M. Abramowitz and I. A. Stegun, eds.). New York: Dover, 1972.