fn

spherical_bessel_j0

Tensor
spherical_bessel_j0(x: Tensor)
source

Spherical Bessel function of the first kind, order 0.

Computes j0(x)=sinx/xj_0(x) = \sin x / x with the continuous extension j0(0)=1j_0(0) = 1. Arises in 3D wave / scattering problems and is the radial component of plane waves expanded in spherical harmonics.

Parameters

xTensor
Input tensor; any floating-point dtype.

Returns

Tensor

j0(x)j_0(x) element-wise, same shape and dtype as x.

Notes

Mathematical definition:

j0(x)=sinxx,j0(0)=1.j_0(x) = \frac{\sin x}{x}, \qquad j_0(0) = 1.

The implementation guards the removable singularity at the origin by substituting x = 1 into the division and patching the result with where(x == 0, 1, ...), so the function is well-defined and differentiable across the origin. Related to the normalised sinc: j0(x)=sinc(x/π)j_0(x) = \mathrm{sinc}(x / \pi).

Examples

>>> import lucid
>>> from lucid.special import spherical_bessel_j0
>>> spherical_bessel_j0(lucid.tensor([0.0, 1.0, 3.14159265]))
Tensor([1.0000, 0.8415, 0.0000])