fn
spherical_bessel_j0
→Tensorspherical_bessel_j0(x: Tensor)Spherical Bessel function of the first kind, order 0.
Computes with the continuous extension . Arises in 3D wave / scattering problems and is the radial component of plane waves expanded in spherical harmonics.
Parameters
xTensorInput tensor; any floating-point dtype.
Returns
Tensor element-wise, same shape and dtype as x.
Notes
Mathematical definition:
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:
.
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])