jv

constexpr Complex jv(const double v, const Complex &z) noexcept

Evaluates the Bessel function of the first kind [1] for a complex input and real order.

Parameters

const double v

A real number.

const Complex &z

A complex number.

Returns

type Complex

A complex number.

The Bessel functions of the first kind are the solutions to the following differential equation:

\[x^2 \frac{d^2y}{dx^2} + x \frac{dy}{dx} + (x^2 - v^2)y = 0\]

For a real order \(v\), the following integral representation [2] can be used:

\[J_v(z) = \frac{(\frac{1}{2}z)^v}{\pi^\frac{1}{2}\Gamma(v + \frac{1}{2})}\int_{0}^{\pi}\cos(z\cos\theta)(\sin\theta)^{2v}d\theta\]

for \(\Re(v) > -\frac{1}{2}\).

Example

int n = 0.5;
Complex z = 1_j;
std::cout << jv(n, z) << "\n";

Output:

0.663036 + 0.663036j

References