任意の
に対して、
は奇関数、
と
は偶関数である。
いずれも周期
の周期関数である (
は周期ではない)。
の範囲でグラフを描いてみよう。
boost には、
| testjacobi.cpp |
/*
* testjacobi.cpp --- 与えられた k に対し sn(u;k), cn(u;k) (-K≦x≦K)の値を計算
* dn(x;k) もやらないと。
* g++ -I/opt/local/include testjacobi.cpp
*/
#include <iostream>
#include <iomanip>
using namespace std;
#include <boost/math/special_functions.hpp>
int main(int argc, char **argv)
{
int i, n;
double pi, k, K, du, umin, umax;
double *u, *y1, *y2, dummy;
n = 400;
u = new double [n+1];
y1 = new double [n+1];
y2 = new double [n+1];
pi = 4 * atan(1.0);
if (argc == 2)
k = atof(argv[1]);
else {
cout << "k="; cin >> k;
}
cout << "# k=" << k << endl;
// 周期の1/4を求める
K = boost::math::ellint_1(k);
// [-2K,2K] を400等分
umin = - 2 * K; umax = 2 * K;
du = (umax - umin) / n;
for (i = 0; i <= n; i++) {
u[i] = umin + i * du;
// y1[i] = boost::math::jacobi_sn(k, u[i]);
// y2[i] = boost::math::jacobi_cn(k, u[i]);
y1[i] = boost::math::jacobi_elliptic(k, u[i], &y2[i], &dummy);
cout << setiosflags(ios::fixed) << setprecision(15)
<< u[i] << " " << y1[i] << " " << y2[i] << endl;
}
return 0;
}
|
,
である。
|
|
|
|
|
|
|
|
|
|
|
|
|
桂田 祐史