fn

bessel_j1

Tensor
bessel_j1(x: Tensor)
source

Bessel function of the first kind, order 1.

Computes J1(x)J_1(x), the regular order-one solution of Bessel's equation. Closely related to J0J_0 by J0(x)=J1(x)J_0'(x) = -J_1(x); appears as the radial derivative of cylindrical waves and in the antenna-pattern of a uniformly illuminated circular aperture.

Parameters

xTensor
Input tensor; any floating-point dtype.

Returns

Tensor

J1(x)J_1(x) element-wise, same shape and dtype as x.

Notes

Series representation:

J1(x)=k=0(1)kk!(k+1)!(x2)2k+1.J_1(x) = \sum_{k=0}^\infty \frac{(-1)^k}{k!\, (k+1)!} \left(\frac{x}{2}\right)^{2k+1}.

Implementation: Abramowitz & Stegun §9.4 two-branch polynomial, accurate to 107\approx 10^{-7}. J_1 is odd, J1(0)=0J_1(0) = 0, with maximum 0.5819\approx 0.5819 at x1.8412x \approx 1.8412.

Examples

>>> import lucid
>>> from lucid.special import bessel_j1
>>> bessel_j1(lucid.tensor([0.0, 1.0, 3.8317]))
Tensor([0.0000, 0.4401, 0.0000])