Complete elliptic integral of the first kind
ellipticK(
returns the complete elliptic integral of the first
kind.m
)
Compute the complete elliptic integrals of the first kind for these numbers. Because these numbers are not symbolic objects, you get floating-point results.
s = [ellipticK(1/2), ellipticK(pi/4), ellipticK(1), ellipticK(-5.5)]
s = 1.8541 2.2253 Inf 0.9325
Compute the complete elliptic integrals of the first kind for the same numbers converted
to symbolic objects. For most symbolic (exact) numbers, ellipticK
returns
unresolved symbolic calls.
s = [ellipticK(sym(1/2)), ellipticK(sym(pi/4)),... ellipticK(sym(1)), ellipticK(sym(-5.5))]
s = [ ellipticK(1/2), ellipticK(pi/4), Inf, ellipticK(-11/2)]
Use vpa
to approximate this result with
floating-point numbers:
vpa(s, 10)
ans = [ 1.854074677, 2.225253684, Inf, 0.9324665884]
Differentiate these expressions involving the complete elliptic integral of the first
kind. ellipticE
represents the complete elliptic integral of the second
kind.
syms m diff(ellipticK(m)) diff(ellipticK(m^2), m, 2)
ans = - ellipticK(m)/(2*m) - ellipticE(m)/(2*m*(m - 1)) ans = (2*ellipticE(m^2))/(m^2 - 1)^2 - (2*(ellipticE(m^2)/(2*m^2) -... ellipticK(m^2)/(2*m^2)))/(m^2 - 1) + ellipticK(m^2)/m^2 +... (ellipticK(m^2)/m + ellipticE(m^2)/(m*(m^2 - 1)))/m +... ellipticE(m^2)/(m^2*(m^2 - 1))
Call ellipticK
for this symbolic matrix. When the input argument is a
matrix, ellipticK
computes the complete elliptic integral of the first
kind for each element.
ellipticK(sym([-2*pi -4; 0 1]))
ans = [ ellipticK(-2*pi), ellipticK(-4)] [ pi/2, Inf]
Plot the complete elliptic integral of the first kind.
syms m fplot(ellipticK(m)) title('Complete elliptic integral of the first kind') ylabel('ellipticK(m)') grid on
ellipticK
returns floating-point results for numeric arguments that
are not symbolic objects.
For most symbolic (exact) numbers, ellipticK
returns unresolved
symbolic calls. You can approximate such results with floating-point numbers using
vpa
.
If m
is a vector or a matrix, then
ellipticK(m)
returns the complete elliptic integral of the first
kind, evaluated for each element of m
.
You can use ellipke
to compute elliptic integrals of the
first and second kinds in one function call.
[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.
ellipke
| ellipticCE
| ellipticCK
| ellipticCPi
| ellipticE
| ellipticF
| ellipticPi
| vpa