Qu

besselj

Builtin index · Core maths

besselj(nu, x)

Input: nu, x · Output: no output

What it is

Bessel function of the first kind J_nu(x) of real order nu and real argument x; nu and x are numbers or same-shape Vec/Mats (a number pairs with every element). Steed's continued fractions with Temme's series for x < 2 (any real order), Hankel's asymptotic series with a double-double phase for x >= 25, a stable forward recurrence in the order when the argument is larger than the order, and the reflection formula for negative order; |nu| <= 1e6. Accuracy: against 3400 random points (orders 0 to 100, arguments 1e-3 to 1e5) the median error is 2e-16 and 99% of the points are within 1e-12 relative, the worst seen being 1.5e-12 (order 100 at a tiny argument); errors near a zero of the function are measured against its envelope sqrt(2/(pi x)), not against the tiny value there. A 12-point table checked against mpmath at 40 digits (orders 0 to 100, arguments 1e-3 to 1e6) agrees to 7e-14. J_0(0) = 1, J_nu(0) = 0 for nu > 0, J_nu(inf) = 0; underflow gives 0 (besselj(500, 1)). For x < 0 the result is real only for integer nu (parity rule); fractional nu there is complex in mathematics and gives NaN. Identities hold to rounding: J_{nu+1} Y_nu - J_nu Y_{nu+1} = 2/(pi x), J_{nu-1} + J_{nu+1} = 2 nu J_nu / x. Errors: missing arguments, mismatched shapes, complex input.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
besselj(nu, x)
nu number, Vec, or Matnu and x are numbers or same-shape Vec/Mats (a number pairs with every element).
x —Bessel function of the first kind J_nu(x) of real order nu and real argument x.
not documented yetA 12-point table checked against mpmath at 40 digits (orders 0 to 100, arguments 1e-3 to 1e6) agrees to 7e-14. Errors: missing arguments, mismatched shapes, complex input.

Examples

No documentation example calls this form yet. The Core maths chapter is where one belongs.