Arc length
Numerical integration

In most cases, including even simple curves, there are no closed-form solutions for arc length and numerical integration is necessary. Numerical integration of the arc length integral is usually very efficient. For example, consider the problem of finding the length of a quarter of the unit circle by numerically integrating the arc length integral. The upper half of the unit circle can be parameterized as y = 1 − x 2. {\displaystyle y={\sqrt {1-x^{2}}}.} The interval x ∈ {\displaystyle x\in \left} corresponds to a quarter of the circle. Since d y / d x = − x / 1 − x 2 {\textstyle dy/dx=-x{\big /}{\sqrt {1-x^{2}}}} and 1 + (d y / d x) 2 = 1 / (1 − x 2), {\displaystyle 1+(dy/dx)^{2}=1{\big /}\left(1-x^{2}\right),} the length of a quarter of the unit circle is

∫ − 2 / 2 2 / 2 d x 1 − x 2. {\displaystyle \int _{-{\sqrt {2}}/2}^{{\sqrt {2}}/2}{\frac {dx}{\sqrt {1-x^{2}}}}\,.}

The 15-point Gauss–Kronrod rule estimate for this integral of 1.570 796 326 808 177 differs from the true length of

arcsin x | − 2 / 2 2 / 2 = π 2 {\displaystyle \arcsin x{\bigg |}_{-{\sqrt {2}}/2}^{{\sqrt {2}}/2}={\frac {\pi }{2}}}

by 1.3 × 10 and the 16-point Gaussian quadrature rule estimate of 1.570 796 326 794 727 differs from the true length by only 1.7 × 10. This means it is possible to evaluate this integral to almost machine precision with only 16 integrand evaluations.
punctuation:no_comma