Skip to content
fn

bessel_j1

→Tensor
bessel_j1(input: Tensor)

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

inputTensor
Input tensor; any floating-point dtype.

Returns

Tensor

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

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 ≈10−7\approx 10^{-7}; a float64 input takes the Cephes double-precision series instead, with its first two zeros exact. J_1 is odd, J1(0)=0J_1(0) = 0, with maximum ≈0.5819\approx 0.5819 at x≈1.8412x \approx 1.8412.

Examples

>>> import lucid
>>> from lucid.special import bessel_j1
>>> bessel_j1(lucid.tensor([0.0, 1.0, 5.0]))
tensor([0., 0.4401, -0.3276])
>>> bool(bessel_j1(lucid.tensor(3.8317)).abs() < 1e-4)  # the first zero
True