yv

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

Evaluates the Bessel function of the second 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 second 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:

\[Y_v(z) = \frac{2(\frac{1}{2}z)^v}{\pi^\frac{1}{2}\Gamma(v + \frac{1}{2})}(\int_{0}^{1}(1 - t^2)^{v - \frac{1}{2}}\sin(zt)dt - \int_{0}^{\infty}e^{-zt}(1 + t^2)^{v - \frac{1}{2}}dt)\]

for \(\Re(v) > -\frac{1}{2}\) and \(\DeclareMathOperator\arg{arg} |\arg(z)| < \frac{1}{2}\pi\).

Example

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

Output:

-0.261856 + 0.828685j

References