Skip to content
fn

bessel_y1

→Tensor
bessel_y1(input: Tensor)

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

inputTensor
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 input.

Notes

Asymptotic forms:

Y1(x)∼−2πx  as x→0+,Y1(x)∼2πxsin⁡ ⁣(x−3π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 J1log⁡J_1 \log term), trigonometric asymptotic on (8,∞)(8, \infty). Accuracy is ≈10−7\approx 10^{-7}; a float64 input takes the Cephes double-precision series instead.

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.249])