What the arc-length integral measures
Arc length is the distance you would travel walking along a curve, as opposed to the straight-line distance between its ends. The integral comes from a single geometric idea: over an infinitesimal step, a smooth curve is indistinguishable from a straight line, so Pythagoras applies. Writing ds for that tiny piece of length, ds² = dx² + dy², and the total length is the integral of ds.
Everything else is bookkeeping about which variable you integrate with respect to. Factor dx out of the square root and you get ds = √(1 + (dy/dx)²) dx, the explicit form. Factor dt out instead and you get the parametric form, whose integrand is the speed of a point tracing the curve. In polar coordinates, substituting x = r cos θ and y = r sin θ and simplifying leaves ds = √(r² + (dr/dθ)²) dθ, where the r² term is the distance swept by the angle and the (dr/dθ)² term is the movement in and out.
Arc length shows up wherever a physical length follows a path rather than a line: the developed length of a curved handrail, the material needed for a parabolic arch, the cable in a catenary span, the distance covered by a robot along a planned trajectory, the perimeter of a cam profile. In every case the number you want is the integral, not the chord.
Why the integral is almost always evaluated numerically
The arc-length integrand contains a square root of a sum of squares, and that construction almost never has an elementary antiderivative. The parabola y = x² is one of the few textbook curves that does — its length involves an inverse hyperbolic sine — and the ellipse famously does not, which is how the elliptic integrals got their name. Numerical quadrature is therefore the standard method rather than a fallback.
This calculator uses composite Simpson's rule. It splits the parameter range into an even number of panels, fits a parabola through each consecutive triple of integrand values, and adds the exact areas of those parabolas. The error falls like the fourth power of the panel width, so doubling the panel count cuts the error by roughly sixteen. The error estimate reported on the page is the difference between the full-panel and half-panel results divided by fifteen, which is the standard Richardson estimate for a fourth-order rule.
The derivatives inside the integrand are themselves numerical: a central difference with Richardson extrapolation, accurate to about twelve significant figures for a smooth function. That is comfortably below the quadrature error in ordinary use, so the reported error estimate is dominated by the quadrature, not the differentiation. Where the function has a kink or a vertical tangent, both estimates lose their meaning at once, and the calculator says so.
The sinuosity reported alongside the length is the ratio of arc length to the straight-line chord between the endpoints. It is exactly 1 for a straight segment and larger for anything that wanders, and it is undefined when the curve closes up so that the chord is zero. Geomorphologists use it to classify river channels; here it is a quick sanity check, because a value below 1 is impossible and signals an input error.
Worked example: the parabola y = x² from 0 to 1
This one has a closed form, so you can check every digit.
- Differentiate. f'(x) = 2x.
- Build the integrand. √(1 + (2x)²) = √(1 + 4x²). At x = 0 it is 1; at x = 1 it is √5 = 2.2360679775.
- Integrate. The standard antiderivative is ∫√(1 + 4x²)dx = x√(1+4x²)/2 + asinh(2x)/4. Evaluating at x = 1: the first term is √5/2 = 1.1180339887, and asinh(2) = ln(2 + √5) = ln(4.2360679775) = 1.4436354752, so the second term is 0.3609088688. At x = 0 both terms vanish.
- Add. L = 1.1180339887 + 0.3609088688 = 1.4789428575.
- Compare with the chord. The endpoints are (0, 0) and (1, 1), so the chord is √2 = 1.4142135624. The sinuosity is 1.4789428575 / 1.4142135624 = 1.0457634 — the curve is about 4.6% longer than the straight line between its ends.
- Sanity-check the size. The mean value of the integrand is 1.4789428575 / 1 = 1.4789, which sits between the integrand's endpoint values of 1 and 2.236 as it must, and closer to the low end because the curve is flat over most of the interval.
A crude two-segment polyline gives a useful lower bound: from (0,0) to (0.5, 0.25) is √0.3125 = 0.559017, and from (0.5, 0.25) to (1, 1) is √0.8125 = 0.901388, totalling 1.460405. Every inscribed polyline is shorter than the arc, and this one is already within 1.3% of it — a reminder that arc length is the supremum of inscribed polygonal lengths, which is where the integral comes from historically.
Reading the result and choosing the right form
Check three things before you trust a length. First, the sinuosity must be at least 1; if it is not, the endpoints or the limits are wrong. Second, the mean integrand must lie between the smallest and largest integrand values in the station table — that is guaranteed for a continuous integrand, so a violation means the quadrature has hit a singularity. Third, the estimated error should be several orders of magnitude below the length itself.
Choose the explicit form only when the curve passes the vertical line test over the whole range. A circle does not, which is why y = √(1 − x²) from −1 to 1 is a bad way to ask for half a circumference: the slope becomes infinite at both ends and the integrand diverges. The parametric form x = cos t, y = sin t has speed exactly 1 everywhere and integrates without effort. Whenever a curve has a vertical tangent, doubles back, or crosses itself, parametrise it.
In polar mode, watch what the range does. A cardioid r = 1 + cos θ is traced once over [0, 2π], but the rose r = cos 2θ is traced once over [0, 2π] while r = cos 3θ completes its whole shape in [0, π] and retraces it over the second half. Integrating over the wrong range gives an answer that is a whole multiple of the truth, and the calculator has no way to know you meant one traverse rather than two.
Finally, note that the reported length is a length of traverse, not of point set. If your parametrisation covers part of the curve twice, that part is counted twice — correctly, because the integral measures distance travelled. This is a feature when computing the path length of a moving particle and a trap when computing the perimeter of a shape.
Reference: arc lengths with known closed forms
| Curve | Range | Closed form | Length |
|---|---|---|---|
| y = 3x | 0 to 4 | 4√10 | 12.649110641 |
| y = x² | 0 to 1 | √5/2 + ln(2+√5)/4 | 1.478942858 |
| y = x^(3/2) | 0 to 1 | (13^1.5 − 8)/27 | 1.439709873 |
| y = cosh x (catenary) | 0 to 1 | sinh 1 | 1.175201194 |
| x = cos t, y = sin t | 0 to π | π | 3.141592654 |
| r = 1 (circle) | 0 to 2π | 2π | 6.283185307 |
| r = 1 + cos θ (cardioid) | 0 to 2π | 8 | 8.000000000 |
| r = e^θ (log spiral) | 0 to 2π | √2(e^(2π) − 1) | 755.899967 |
The catenary is the one curve whose arc-length integrand collapses: √(1 + sinh²x) = cosh x exactly, so its length is sinh b − sinh a. The cardioid's length of exactly 8 is a classic result and a good test of a polar implementation.
Assumptions, pitfalls and what this does not cover
- A vertical tangent breaks the explicit form. The integrand contains f'(x)², which diverges. Reparametrise rather than adding panels; no amount of quadrature fixes an infinite integrand.
- A corner is not smooth. The formula assumes a continuously differentiable curve. Split the range at the corner and add the two lengths.
- Retraced arcs are counted twice. Check that your parameter range traces the curve exactly once if you want a perimeter rather than a distance travelled.
- Polar mode measures the polar angle in radians. A full turn is 2π ≈ 6.283185, not 360.
- This calculator works in the plane. A space curve needs √(x'² + y'² + z'²), which is the same idea with a third term.
- The error estimate covers quadrature only. It says nothing about a singular integrand, and nothing about whether your expression is the curve you meant.
The parametric form is strictly more general
Any explicit curve y = f(x) can be written parametrically as x = t, y = f(t), and the parametric integrand then collapses to √(1 + f'(t)²) — the explicit formula. The reverse is not true: no explicit form describes a circle. When in doubt, parametrise. If you need the slope f' itself at a point rather than the length, the numerical derivative calculator reports it with an error estimate.
Related integrals and where to go next
Arc length is one of a family of geometric integrals that all start from a length, area or volume element. Rotate the curve about an axis and the same ds gives the surface area ∫2πy ds; sweep the region under it and you get the volume computed by the disk and washer calculator. The area under the curve itself is what a Riemann sum approximates, and comparing the two on the same function makes the difference between "how much" and "how far" concrete.
In vector calculus, arc length is the parameter that makes a curve canonical. Parametrising by arc length gives a unit tangent vector everywhere, which is what curvature and the Frenet frame are built on, and it is why line integrals are written ∫F·dr with |dr| = ds. Whether such a line integral is path-independent is decided by the curl of the field: a curl-free field on a simply connected region has a potential, and then only the endpoints matter, not the length of the path at all.
Numerically, the machinery here is the same as everywhere else in quadrature. Simpson's rule, Richardson extrapolation, and an error estimate from panel refinement are the standard toolkit; the numerical derivative calculator shows the differentiation half of it, and the bisection method calculator the root-finding half. If a limit of the range needs to be found as a curve intersection first, solve that with bisection and bring the result back here.
