#include
<cmath>
double cyl_bessel_i(double nu, double x) // C++17
Liefert Wert der modifizierten Bessel-Funktion 1. Art $I_\nu(x) = \sum_{k=0}^\infty \frac{(x/2)^{\nu+2k}}{k! \Gamma(\nu+k+1)} = \frac{1}{\pi}\int_0^\pi e^{x \cos \theta} \cos(\nu\theta) d\theta - \frac{\sin(\nu \pi)}{\pi} \int_0^\infty e^{-x \cosh t - \nu t} dt$ für $x \geq 0$.
nu | |
x | $\geq 0$ |
Rückgabewert: $I_\nu(x)$.
#include <cmath> #include <iostream> int main() { std::cout << "# x n=0 n=1 n=2\n"; for (int i = 0; i <= 1000; ++i) { double x = 0.01*i; std::cout << x << '\t' << std::cyl_bessel_i(0, x) << '\t' << std::cyl_bessel_i(1, x) << '\t' << std::cyl_bessel_i(2, x) << '\n'; } }