Hankel Transform Calculator
Introduction: Hankel transforms for circular symmetry
The Hankel transform is the radial counterpart of the Fourier transform, so it is the right tool whenever a function depends only on distance from the origin. For a circularly symmetric profile , its zero-order Hankel transform is where denotes the Bessel function of the first kind. This transform keeps radial structure intact and appears in diffusion, acoustics, and wave-propagation problems with cylindrical symmetry.
The ordinary Fourier transform decomposes a function into plane waves . In polar coordinates, radial waves involve Bessel functions because the radial part of the Laplacian leads to the same differential equation. That is why the Hankel kernel uses , and why the transform behaves like a one-dimensional frequency analysis in polar coordinates.
Series Representation of J₀ for the Hankel kernel
The Bessel function can be expressed as a power series . In this calculator, the series is short enough to stay fast in the browser but still accurate for moderate arguments. Because the Hankel kernel multiplies the radial value by , the integrand usually changes smoothly near the origin, which helps the truncated series perform well for many practical inputs.
Numerical Integration Across the Radial Domain
To compute numerically, the calculator samples the integrand on a grid from to the selected upper limit. Simpson's rule then combines those samples with alternating weights to approximate the integral. Because the true Hankel integral extends to infinity, the upper limit is a user-controlled cutoff that should be large enough to capture the meaningful tail of the radial function.
A wider interval can reduce truncation error, while a smaller step size can better resolve oscillations in the Bessel kernel. The default values provide a reasonable trade-off for smooth, rapidly decaying radial profiles, where the transform settles before the upper limit is reached.
How to use: Evaluating a Hankel transform numerically
Enter your radial function in terms of r, using expressions such as exp(-r^2) or 1/(1+r^2) if they match the profile you want to study. Choose the value at which you want the transform evaluated, then pick an upper limit that captures the part of the function that still contributes materially to the integral. When you press the button, the script samples the function, evaluates the Bessel kernel with a short series, and applies Simpson's rule to return an approximate value for .
The output appears below the form with six decimal places. That makes it easy to compare multiple values, watch the spectrum of a radial profile change, or check whether the chosen upper limit is leaving too much of the tail behind. In optics, acoustics, and electromagnetism, this kind of radial transform often explains diffraction patterns, beam profiles, and cylindrical field solutions.
Implementation Highlights for the Hankel kernel
The integral is approximated as
Formula: F(k) ≈ ∑ j = 0 N w_j f(r_j) J_0(k r_j) r_j
where are Simpson weights and are equally spaced sample points. The series uses ten terms, which is usually enough for moderate values without slowing the calculator down. If you push to larger arguments or want a tighter comparison against a reference solution, you can increase the sampling density or use a longer series in your own code.
Because everything runs in your browser, no data leaves your computer. That makes the calculator handy for quick checks, classroom demonstrations, or exploratory work with radial functions. For large-scale numerical jobs, specialized scientific libraries may still be a better fit.
Further Exploration: checking Hankel results against a Gaussian benchmark
Try computing the transform of exp(-r^2) at several values and compare the numerical output to the known analytic result . This benchmark is a good way to confirm that the Simpson grid and the approximation are behaving as expected. It also gives a visual sense of how a smooth radial function spreads out in transform space.
Beyond the Gaussian case, Hankel transforms also show up in models with radial kernels and distance-based similarity measures. Whenever a problem depends only on radius rather than angle, the transform can simplify the analysis and reduce a two-dimensional description to a one-dimensional radial integral.
Worked Example: Gaussian radial profile and the Hankel transform
Consider the Gaussian function . The zero-order Hankel transform of this function has the analytic solution . Enter exp(-r^2) in the form, set to 1, and use an upper limit of 10. The calculator samples the integrand on 200 points and produces approximately 0.303265. The exact value is 0.303265, demonstrating the accuracy of the numerical approach for smooth functions. Try decreasing the upper limit to 5 to see how truncating the domain introduces slight error.
Benchmark Radial Profiles and Their Hankel Transforms
| f(r) | Analytic F(k) |
|---|---|
exp(-r^2) |
|
1/(1+r^2) |
|
rect(r/a) |
These reference profiles are useful when you want to see how the Hankel transform responds to smooth decay, slower decay, or compact support. Comparing the calculator’s output to known solutions helps build intuition about how radial functions spread or concentrate after the Bessel kernel is applied.
Limitations: truncation, oscillation, and Bessel-series length
The calculator assumes the radial profile is well behaved over the chosen interval and that the upper limit captures most of the tail of the Hankel integral. Highly oscillatory functions can need a smaller step size or a longer integration range, while slowly decaying functions may require a much larger cutoff before the transform stabilizes. The ten-term series is a pragmatic compromise: it is fast and usually adequate for moderate arguments, but very large values can erode accuracy. If you need high-precision results, compare against a scientific computing package or experiment with a denser grid and a longer series in your own workflow.
Related Calculators for Radial and Projection Problems
To explore other transform tools, try the Radon Transform Calculator for tomographic projections or the Laplace Equation Solver for potential problems in cylindrical coordinates.
Formula: how the Hankel estimate is assembled
The estimate is built from three parts: the radial function f(r), the Bessel kernel J₀(k r), and the extra factor of r that appears in polar coordinates. Simpson's rule then folds those sampled values into a weighted sum over the chosen interval, which is why the upper limit and step size matter so much for smoothness and tail coverage. For a Hankel transform, the key question is usually not whether the inputs are in the right units, but whether the radial expression decays quickly enough for the interval you selected.
Arcade Mini-Game: Hankel Transform Calculator Calibration Run
Use this quick arcade run to practice spotting the radial function, the value, and the upper limit before you trust a Hankel transform estimate.
Start the game, then use your pointer or arrow keys to catch useful radial inputs and avoid bad assumptions.
