Bessel Function Calculator

J, Y, I, K, zeros and drum modes, checked.

  • Zeros listed
  • Drum overtones
  • Stable recurrence
A small rounded clay table holding a round clay drum surface with raised soft circular ripples that fall in height toward the rim, and a few loose beads.

The guide

A drum, a hot cylinder and one stubborn recurrence: why Bessel functions need care

Bessel functions of integer order describe a round drum and a heated cylinder, and their values go wrong fast unless the recurrence runs in its one safe direction.

  • 0.765198 J_0(1), the worked example, to six digits
  • 1.5933 second drum mode as a multiple of the fundamental
  • 8.2e+29 relative error of the forward recurrence for J_20(1)
  • 2.4048 first zero of J_0, the rim condition of the fundamental
  • -0.258061 J_3(7.5), from Bessel's integral and from the recurrence
Read the full guide Fold the guide 7 min · 17 sources

Strike a round drum and its skin moves in patterns that no string ever makes. Heat a metal cylinder from the outside and its temperature settles into a pattern just as particular. Both patterns come from the same family of functions.

They are the Bessel functions, solutions of an equation that Daniel Bernoulli met in 1732 while studying a hanging chain, and that Euler met in 1780 in vibrating membranes. Around 1811 Joseph Fourier used one of them to solve the heat equation in a problem with cylindrical symmetry. Friedrich Bessel studied them systematically in 1824, and his name stuck.

Where the functions come from

Take a drum. Its skin obeys a wave equation, and when you separate the variables the part that depends on the distance from the centre must satisfy Bessel’s equation: x^2 y'' + x y' + (x^2 - n^2) y = 0. The whole number n enters through the angle: the skin’s height varies as cos(n t) around the centre, so n counts the straight lines across it that stay still. Solutions come in two families. For integer n the first, J_n, is finite at the centre and has a power series built from factorials. The second, Y_n, runs off to minus infinity at the centre, which no real drumhead does, so it is thrown away.

What survives is J_n. A clamped rim forces the skin to be still there, so the argument at the rim must be a zero of J_n. That one condition produces the whole list of drum notes, and it is why a table of zeros is worth having.

The hot cylinder uses the same function for a different reason. Heat flowing in from the sides sets up a temperature that depends only on the distance from the axis, and the radial part is again J_0. Nothing about the algebra cares whether the thing being solved for is a displacement or a temperature.

Bessel’s own integral gives a second way to reach a value. For a whole number n, J_n(x) equals one over pi times the integral from 0 to pi of cos(n t - x sin t). Put n = 3 and x = 7.5 into that integral by numerical quadrature and you get -0.258061. The recurrence method used by the page gives -0.2580609132 for the same input, which is the kind of agreement a number quoted from memory cannot promise.

Why J and Y swing while I and K climb and fall

For large x the picture is simple. J_n(x) behaves like the square root of 2 / (pi x) times cos(x - n pi / 2 - pi / 4). The envelope shrinks only as one over the square root of x, so the swings never die out, and the function crosses zero infinitely often. Y_n has the same envelope and a shifted phase.

That large-argument form is a sketch, not a calculator. At x = 50 it gives 0.05605867 for J_0, while the true value is 0.05581233. The gap is 2.5e-04, which is small on a plot and large in a table of digits.

Now change the equation. If the argument is purely imaginary, the solutions are the modified functions, I_n and K_n. The series for I_n is the series for J_n without its alternating sign. Remove the sign and the oscillation becomes growth, which is easy to check: dropping the sign from the J_0 series at x = 1 turns 0.7651976866 into I_0(1) = 1.2660658778.

I_n grows roughly like e^x over the square root of 2 pi x, and K_n decays roughly like the square root of pi / (2x) times e^-x. At x = 10 that gives I_0 = 2815.7166 and K_0 = 1.778e-05. At x = 1000, I_0 is about 2.4857e+432 and K_0 about 2.0115e-436, and neither fits in an ordinary double, which tops out near 1.8e+308. The page therefore carries every value as a mantissa and a power of ten.

The two kinds are tied together by a Wronskian: I_n(x) K_(n+1)(x) + I_(n+1)(x) K_n(x) = 1 / x. The page uses it to get K_1 from K_0 without a second integral.

Why a recurrence works in one direction only

The functions J and Y obey one recurrence: J_(n-1)(x) + J_(n+1)(x) = (2n / x) J_n(x). It is very tempting. Compute J_0(1) = 0.765198 and J_1(1) = 0.4400505857 once, then climb: J_2, J_3, and on up to any order.

Try it for order 20 at x = 1 in ordinary doubles. Nineteen steps give 3.169e+05. The true value is 3.873503e-25. The relative error is 8.2e+29, so not a single digit is right. If you start from correctly rounded copies of J_0 and J_1 instead, the same climb ends at -2.428e+06. The exact wrong number depends on the last bit of the start; the failure does not.

The cause is that J is the small solution. For small x, J_n behaves like (x/2)^n / n!, which shrinks as n grows, while Y_n behaves like minus (n-1)! / pi times (2/x)^n, which explodes. At x = 1 and n = 20 that is 3.9e-25 for J against about -4.1e+22 for Y. A rounding error near 1e-17 in the start values carries a trace of the explosive solution, and the climb magnifies it by about that factor: 1e-17 times 4e+22 is of the order of 4e+05, the size of the wreckage. This is an estimate of the mechanism, not an exact accounting.

Run the recurrence downward and the roles swap. The wanted solution is now the one that grows fastest, so every error from the trial values dies out. This is Miller’s algorithm: start well above the order with arbitrary seeds, such as 1 and 0, run down, and fix the scale at the end. The scale comes from the identity 1 = J_0 + 2 (J_2 + J_4 + J_6 + …), which is a special case of a series of cosines in J_(2k).

Here is the effect for x = 1. Start at index 4 and J_0 comes out as 0.7652811736, wrong by 8.3e-05. Start at 8 and it is 0.7651976875, wrong by 9.1e-10. Start at 12 and it is right to the last double digit. For x up to 1000 and n up to 200 the page starts above the larger of the two with a generous margin, and rescales whenever a value passes 1e+250.

For Y the stable direction is the other one. Y_n grows with order, so after Y_0 and Y_1 are found the recurrence climbs safely.

Why drum overtones are not whole multiples

Mode (m, k) of an ideal circular membrane has m straight nodal lines across it and k - 1 nodal circles, and its frequency is proportional to the k-th zero of J_m. The first zero of J_0 is 2.4048255577, and the first zero of J_1 is 3.8317059702. Divide the second by the first and you get 1.5933.

Line up the six lowest modes and the ratios to the fundamental are 1.0000, 1.5933, 2.1355, 2.2954, 2.6531 and 2.9173. The overtones of a string follow the harmonic series, at two, three, four times its fundamental. A drum has nothing of the kind: its second mode sits at 1.5933, not 2, and the fourth mode is a nodal circle rather than another line.

Each of those numbers is a zero found by computation, not read from a table. The method scans J_n for sign changes in steps of 0.5. That is safe because no two zeros were ever closer than 3.1: across all 201 orders from 0 to 200, the closest pair is the first two zeros of J_0, 3.1153 apart. Each bracket is then narrowed by bisection and Newton steps until the answer is stable to about 1e-13.

How the page gets its numbers, and what it cannot do

J_n and I_n come from Miller’s recurrence. Y_0 and Y_1 come from a series in J_(2k), and Y_n for higher order from the upward recurrence. K_0 comes from the integral of e^(-x cosh t) over t from 0 to infinity, summed by the trapezoid rule, which converges very fast for a smooth integrand that dies off so quickly.

The zero search, the comparison against a many-digit reference and the plot samples run in a module worker, so typing never freezes the page, and the limits and caps are printed on it. Caps such as the 1,000 limit are written with the browser’s own number formatting.

All of it was checked outside the page against an independent library at 50 digits. Over 2432 values the relative gap was at most about 1e-14 away from zero crossings, and near a crossing the absolute gap was a few times 1e-15. Twelve zeros for each of nine orders agree with that library to better than 1e-13.

The limits are real. The page handles integer orders only, from 0 to 200, and arguments up to 1000. It does not do fractional or complex orders, spherical or Hankel functions, or fits of Bessel series to data. Doubles carry about 15 digits. The many-digit reference check is made for J only. The drum is an ideal uniform clamped skin, not the full wave solution of a real instrument.

Sources

Every source consulted for this guide. Links checked November 11, 2026.

  1. Bessel function Wikipedia (CC BY-SA 4.0)
  2. Vibrations of a circular membrane Wikipedia (CC BY-SA 4.0)
  3. String vibration Wikipedia (CC BY-SA 4.0)
  4. DLMF 10.2 Definitions NIST Digital Library of Mathematical Functions
  5. DLMF 10.6 Recurrence Relations and Derivatives NIST Digital Library of Mathematical Functions
  6. DLMF 10.9 Integral Representations NIST Digital Library of Mathematical Functions
  7. DLMF 10.12 Generating Function and Associated Series NIST Digital Library of Mathematical Functions
  8. DLMF 10.17 Asymptotic Expansions for Large Argument NIST Digital Library of Mathematical Functions
  9. DLMF 10.21 Zeros NIST Digital Library of Mathematical Functions
  10. DLMF 10.23 Sums NIST Digital Library of Mathematical Functions
  11. DLMF 10.28 Wronskians and Cross-Products NIST Digital Library of Mathematical Functions
  12. DLMF 10.32 Integral Representations NIST Digital Library of Mathematical Functions
  13. DLMF 10.40 Asymptotic Expansions for Large Argument NIST Digital Library of Mathematical Functions
  14. DLMF 3.6 Linear Recurrence Relations and Summation of Series NIST Digital Library of Mathematical Functions
  15. A115368 Decimal expansion of first zero of the Bessel function J_0(z) The On-Line Encyclopedia of Integer Sequences (CC BY-SA 4.0)
  16. Web Workers API MDN Web Docs (CC BY-SA)
  17. Intl.NumberFormat MDN Web Docs (CC BY-SA)