fn

bessel_y1

Tensor
bessel_y1(x: Tensor)
source

Bessel function of the second kind, order 1.

Computes Y1(x)Y_1(x), the singular-at-origin order-one solution of Bessel's equation. Diverges as 2/(πx)-2/(\pi x) at the origin and decays as 2/(πx)\sqrt{2/(\pi x)} for large x.

Parameters

xTensor
Input tensor; only x>0x > 0 is in the domain. Any floating-point dtype.

Returns

Tensor

Y1(x)Y_1(x) element-wise, same shape and dtype as x.

Notes

Asymptotic forms:

Y1(x)2πx  as x0+,Y1(x)2πxsin ⁣(x3π4)  as x.Y_1(x) \sim -\frac{2}{\pi x} \;\text{as } x \to 0^+, \qquad Y_1(x) \sim \sqrt{\frac{2}{\pi x}} \sin\!\left(x - \frac{3\pi}{4}\right) \;\text{as } x \to \infty.

Implementation: Numerical Recipes §6.5 rational fit on (0,8](0, 8] (Wronskian-corrected with the J1logJ_1 \log term), trigonometric asymptotic on (8,)(8, \infty). Accuracy is 107\approx 10^{-7}.

Examples

>>> import lucid
>>> from lucid.special import bessel_y1
>>> bessel_y1(lucid.tensor([1.0, 5.0, 10.0]))
Tensor([-0.7812, 0.1479, 0.2490])