#include
<cmath>
double ellint_1(double k, double phi) // C++17
Liefert Wert des unvollständigen Elliptischen Integrals 1. Art $F(k,\varphi) = \int_0^\varphi \frac{d\theta}{\sqrt{1-k^2 \sin^2 \theta}}$.
k | Modul $|k| \leq 1$ |
phi | Amplitude |
Rückgabewert: $F(k,\varphi)$.
#include <cmath> #include <iostream> int main() { const auto pi = std::acos(-1.0); std::cout << "# k=0 k=0.7 k=1\n"; for (int i = 0; i < 100; ++i) { double phi = 0.01*i*pi/2; std::cout << phi << '\t' << std::ellint_1(0.0, phi) << '\t' << std::ellint_1(0.7, phi) << '\t' << std::ellint_1(1.0, phi) << '\n'; } }