torch.special.bessel_y0
function bessel_y0<S extends Shape>(input: Tensor<S, 'float32'>, _options?: SpecialUnaryOptions<S>): Tensor<S, 'float32'>Computes the Bessel function of the second kind of order 0, Y₀(x), also called Neumann function.
While J₀(x) and J₁(x) are the "first kind," Y₀(x) and Y₁(x) form the "second kind" and are linearly independent solutions to the Bessel differential equation. Y₀ is related to J₀ via Y₀(x) = (2/π)[ln(x/2) * J₀(x) + ...], involving logarithmic terms. Unlike J₀ which oscillates smoothly, Y₀ diverges at the origin. Essential for:
- Boundary value problems: general solutions need both J and Y (or I and K for modified)
- Cylindrical heat conduction: problems with radiation boundary conditions
- Wave propagation: exterior domain solutions (Y₀ for outgoing waves)
- Acoustic radiation: pressure field in unbounded domains
- Electromagnetic scattering: cylindrical scattering problems
- Singular perturbation: boundary layer analysis in cylindrical geometry
Key Properties:
- Y₀(0) → -∞ (logarithmic singularity at origin)
- Oscillates like J₀ for large x, but has no zeros (monotonically increasing in oscillations)
- Related: Y₀(x) ≈ (2/π)[ln(x/2)J₀(x) - series terms]
- General solution: general_y = C₁J₀(x) + C₂Y₀(x) (linear combination)
- Orthogonality: Different from J₀; Y₀ used for open-domain/exterior problems
- Wronskian: J₀(x)Y₀'(x) - J₀'(x)Y₀(x) = 2/(πx) (fundamental relation)
- Singular at origin: Y₀(0) → -∞ (unlike J₀(0)=1)
- Second kind: Linearly independent from J₀, used for general solutions
- Logarithmic singularity: Y₀ ∝ -ln(x) near x=0
- General solution: Any Bessel ODE solution is C₁J₀ + C₂Y₀ (complete basis)
- Wronskian: J₀Y₀' - J₀'Y₀ = 2/(πx) relates derivatives
- Hankel function: H₁⁽¹⁾ = J₀ + iY₀, H₁⁽²⁾ = J₀ - iY₀ (outgoing/incoming waves)
- Asymptotic: Like J₀ for large x, but phase differs slightly
- Domain x 0 only: Undefined for x ≤ 0 (no analytic continuation like J₀)
- Singularity at origin: Y₀(x) → -∞ as x → 0+, not suitable for interior problems
- Numerical accuracy: Near x=0, Y₀ becomes extremely negative
- Not orthogonal basis: Unlike J₀ zeros, Y₀ doesn't provide orthogonal basis
Parameters
inputTensor<S, 'float32'>- Input tensor with real values x 0 (must be positive, undefined at x=0)
_optionsSpecialUnaryOptions<S>optional
Returns
Tensor<S, 'float32'>– Tensor with Y₀(x) values (oscillatory, divergent at origin)Examples
// Oscillatory behavior for x > 0, singularity at origin
const x = torch.tensor([0.1, 1, 2, 5, 10]);
const y0 = torch.special.bessel_y0(x); // Oscillates, diverges as x→0+
// x=0.1: very negative (→-∞), x=1: -0.636, x=10: 0.055// Cylindrical heat conduction: general solution combining J₀ and Y₀
const r = torch.linspace(0.01, 2, 200); // Radial distance (avoid r=0)
const j0_r = torch.special.bessel_j0(r);
const y0_r = torch.special.bessel_y0(r);
// General temperature: T(r) = A*J₀(λr) + B*Y₀(λr)
// Y₀ for radiation BC, J₀ for regularity at center (typically B=0)// Exterior domain scattering (outgoing wave condition)
const rho = torch.linspace(0.1, 5, 100); // Distance from cylinder
const hankel_h1 = torch.special.bessel_j0(rho).add(
torch.special.bessel_y0(rho).mul(1j) // H₁⁽¹⁾(ρ) = J₀ + iY₀
); // Outgoing Hankel function (pseudo-code, needs complex support)// Radiation from cylindrical antenna
const distance = torch.linspace(0.1, 10, 100);
const wavelength = 2.0;
const pressure = torch.special.bessel_y0(distance.mul(2 * Math.PI / wavelength));
// Y₀ represents pressure field from cylindrical source in open spaceSee Also
- PyTorch torch.special.bessel_y0()
- torch.special.bessel_j0 - First kind order 0 (complementary solution)
- torch.special.bessel_y1 - Second kind order 1 (next order)
- torch.special.modified_bessel_k0 - Modified K₀, exponentially decaying analog