138
10 Jacobi Elliptic Functions
% K value for periodicity:
[tau, kabs, K] = k2tK(sqrt(kq));
% time for one period
t = linspace(0,4 * K/sqrt(betaq),100);
% sn and derivative
obj = ellipFun(’djac’,t * sqrt(betaq),sqrt(kq));
y = obj.value.sn/sqrt(alphaq);
subplot(1,2,1)
plot(x,V), grid on, hold on, shg
% horizontal line at energy E
plot(y,E * ones(size(y)))
subplot(1,2,2)
% momentum
dy = obj.value.snd/sqrt(alphaq) * sqrt(betaq);
plot(y,dy), hold on
end
Utility Functions
The function [kt, deviation, info] = k2tau2k(ktau, was) converts either the modulus k into the parameter τ or vice versa. “ktau” is the
corresponding input and a scalar. “was” could have the value “k” (default) k → τ or
“tau” τ → k. The output “kt” is the corresponding converted value. By computing
again the reverse direction, “deviation” gives the deviation between the original and
computed values and should be a small number (best is 0). “info” is the information
about the conversion.
The function [tau, kabs, K] = k2tK(k) converts the modulus k into τ .
“k” could be an arbitrary complex array. The output variables are “tau” (τ ), “kabs”
the recomputed deviation from the input “k” (best is 0), and “K” the complete Jacobi
integral K of first kind.
References
1. Abramowitz, M., Stegun, I.A.: Handbook of Mathematical Functions. Dover, New York (1972)
2. Gradstein, I.S., Rhysik, I.M.: Tafeln · Tables II. Verlag Harry Deutsch Thun, Frankfurt A. M.
(1981)
3. Olver, F.W.J., Olde Daalhuis, A.B., Lozier, D.W., Schneider, B.I., Boisvert, R.F., Clark, C.W.,
Miller, B.R., Sounders, B.V. (eds.): NIST Digital Library of Mathematical Functions (2017).
http://dlmf.nist.gov, Rel. 1.0.17
10 Jacobi Elliptic Functions
% K value for periodicity:
[tau, kabs, K] = k2tK(sqrt(kq));
% time for one period
t = linspace(0,4 * K/sqrt(betaq),100);
% sn and derivative
obj = ellipFun(’djac’,t * sqrt(betaq),sqrt(kq));
y = obj.value.sn/sqrt(alphaq);
subplot(1,2,1)
plot(x,V), grid on, hold on, shg
% horizontal line at energy E
plot(y,E * ones(size(y)))
subplot(1,2,2)
% momentum
dy = obj.value.snd/sqrt(alphaq) * sqrt(betaq);
plot(y,dy), hold on
end
Utility Functions
The function [kt, deviation, info] = k2tau2k(ktau, was) converts either the modulus k into the parameter τ or vice versa. “ktau” is the
corresponding input and a scalar. “was” could have the value “k” (default) k → τ or
“tau” τ → k. The output “kt” is the corresponding converted value. By computing
again the reverse direction, “deviation” gives the deviation between the original and
computed values and should be a small number (best is 0). “info” is the information
about the conversion.
The function [tau, kabs, K] = k2tK(k) converts the modulus k into τ .
“k” could be an arbitrary complex array. The output variables are “tau” (τ ), “kabs”
the recomputed deviation from the input “k” (best is 0), and “K” the complete Jacobi
integral K of first kind.
References
1. Abramowitz, M., Stegun, I.A.: Handbook of Mathematical Functions. Dover, New York (1972)
2. Gradstein, I.S., Rhysik, I.M.: Tafeln · Tables II. Verlag Harry Deutsch Thun, Frankfurt A. M.
(1981)
3. Olver, F.W.J., Olde Daalhuis, A.B., Lozier, D.W., Schneider, B.I., Boisvert, R.F., Clark, C.W.,
Miller, B.R., Sounders, B.V. (eds.): NIST Digital Library of Mathematical Functions (2017).
http://dlmf.nist.gov, Rel. 1.0.17
