torch.special.bessel_j1
function bessel_j1<S extends Shape>(input: Tensor<S, 'float32'>, _options?: SpecialUnaryOptions<S>): Tensor<S, 'float32'>Computes the Bessel function of the first kind of order 1, J₁(x).
J₁(x) is closely related to J₀(x) through recurrence relations and derivatives. While J₀ appears in cylindrical waveguide TM modes and circular drums, J₁ appears in TE modes, polar moment calculations, and as derivatives of J₀. Like J₀, J₁ solves the Bessel differential equation but with order parameter n=1. Essential for:
- Electromagnetic waves: TE modes in circular waveguides, antenna radiation patterns
- Vibrations: radial force excitations on cylinders (l=1 modes)
- Heat conduction: non-uniform heat sources in cylindrical geometry
- Quantum mechanics: angular momentum l=1 partial waves
- Calculus: derivative of J₀ related to J₁ (d/dx[xJ₀(x)] = xJ₁(x))
- Optics: Bessel beams with orbital angular momentum
- Signal processing: specialized windowing functions, Bessel-type filters
Key Properties:
- J₁(0) = 0 (vanishes at origin, unlike J₀)
- Maximum ≈ 0.582 at x ≈ 1.84, minimum ≈ -0.402
- First zero ≈ 3.832, second ≈ 7.016, zeros spaced ~π apart for large x
- Odd function: J₁(-x) = -J₁(x) (antisymmetric)
- Recurrence: Jₙ₋₁ + Jₙ₊₁ = (2n/x)Jₙ relates J₀, J₁, J₂
- Derivative: dJ₀/dx = -J₁(x), d/dx[xⁿJₙ(x)] = xⁿJₙ₋₁(x)
- Order 1: Next after J₀; higher orders (J₂, J₃) for specialized applications
- Odd function: J₁(-x) = -J₁(x), antisymmetric about x=0
- Zero at origin: J₁(0) = 0 (key difference from J₀(0)=1)
- Derivative: J₀'(x) = -J₁(x), fundamental recurrence relationship
- Integral: ∫ x J₁(x) dx = x J₀(x) (integration formula)
- Maximum: Located at x ≈ 1.84, value ≈ 0.582 (not at origin)
- Asymptotic: Phase shifted from J₀ (sin vs cos in asymptotic form)
- Large x: Amplitude decreases as 1/√x, behavior similar to J₀ but phase-shifted
- Near origin: J₁(x) ≈ x/2 for small x (nearly linear)
- Oscillations: Dense for large |x|, needs fine sampling
- Odd function: Sign flips for negative arguments (unlike J₀)
Parameters
inputTensor<S, 'float32'>- Input tensor with real values x ≥ 0 (can be negative, odd function)
_optionsSpecialUnaryOptions<S>optional
Returns
Tensor<S, 'float32'>– Tensor with J₁(x) values (zero at origin, oscillating as x increases)Examples
// Basic behavior: starts at zero, oscillates
const x = torch.tensor([0, 1, 3.832, 7.016, 10.174]); // Include zeros
const j1 = torch.special.bessel_j1(x); // [0, 0.440, ≈0, -0.108, ≈0]
// J₁(0)=0, peaks near 1.84, then oscillates with decreasing amplitude// TE mode in circular waveguide (electromagnetic)
const rho = torch.linspace(0, 1, 100); // Normalized radius
const c = 1.841; // First maximum location
const h_field = torch.special.bessel_j1(rho.mul(c)); // Azimuthal field
// Field vanishes at center (ρ=0) and boundary, represents TE₁₁ mode// Derivative relationship: J₁ is derivative of x*J₀
const x = torch.linspace(0.1, 10, 100);
const j0 = torch.special.bessel_j0(x);
const j1 = torch.special.bessel_j1(x);
// Verify: -j1 ≈ d(x*j0)/dx (recurrence relation check)// Polar moment calculation: radial stress in pressurized cylinder
const r = torch.linspace(0.1, 2, 100); // Radial position
const pressure_freq = 1.0; // Frequency parameter
const stress_field = torch.special.bessel_j1(r.mul(pressure_freq));
// Stress distribution follows J₁ pattern in nonuniform pressure// Odd antisymmetric pattern (in contrast to even J₀)
const x = torch.linspace(-5, 5, 200);
const j1_even = torch.special.bessel_j1(x.abs()); // Even envelope
const j1_antisym = torch.special.bessel_j1(x); // Antisymmetric J₁
// J₁(-x) = -J₁(x) shows antisymmetrySee Also
- PyTorch torch.special.bessel_j1()
- torch.special.bessel_j0 - Order 0 (related by recurrence)
- torch.special.bessel_y1 - Second kind order 1 (complementary)
- torch.special.i1 - Modified Bessel order 1 (I₁, related to J₁(ix))