Basic Concepts
An integral is used to calculate the area under a curve, namely
An integral can also be used to calculate the length of a curve, namely
Just as for the area, we divide the curve into n small segments, as shown in Figure 1
Figure 1 – Decomposing the curve
Here, we use n = 3. The length of the curve y = f(x) between x = a and x = b is approximated by the sum of the n line segments. If point pi = (xi, xi+1), then the sum of these line segments is
As n gets larger, the approximation improves.
If we assume that the segments are equal in length, i.e. Δx = xi – xi-1 for all i, and Δyi = yi – yi-1 = f(xi) – f(xi-1), then
But we know that
and so
But this means that
Worksheet Function
The following worksheet function takes a lambda function parameter. Such functions are described in Real Statistics Lambda Capabilities and Lambda Functions using Cell Formulas.
Real Statistics Function: The Real Statistics Resource Pack provides the following worksheet function.
ARCLENGTH(R1, lower, upper, iter, Rx) = the arc length of y = f(x) between x = lower and x = upper, where R1 is a cell containing a formula that represents the function f(x). Rx optionally contains a cell address for x (if omitted, it defaults to the first cell referenced in R1).
iter = the number of subintervals (default 10,000).
Example
Example 1: Find the length of y = ln(cos(x) between 0 and π/4
We first show how to obtain the result using calculus.
If f(x) = ln(cos(x), then
Thus
Since
we see that
and so
Thus, we can rewrite the integral as
Using the substitution u = sin x, we get du = cos x dx, and
When x = 0, u = sin 0 = 0, and when x = π/4, u = sin π/4 = √2/2. But
Thus
Using Real Statistics
We first create a chart of the function y = ln(cos(x) using the Graph y = f(x) data analysis tool, as shown in Figure 2. This chart can be obtained as described in Graphing y = f(x).
Figure 2 – Graph of y = f(x)
Now, we can use the formula =ARCLENGTH(A2, A1, B1) to obtain the value .881374, which is the same value that we obtained above using calculus.
Ellipse Example
Click here for another example of estimating the perimeter of a curve, namely that of an ellipse.
Examples Workbook
Click here to download the Excel workbook with the examples described on this webpage.
Links
References
Wikipedia (2026) Perimeter of an ellipse
https://en.wikipedia.org/wiki/Perimeter_of_an_ellipse
Dawkins, P. (2022) Arc length
https://tutorial.math.lamar.edu/classes/calcii/arclength.aspx
Stack Exchange (2011) Integral of √ 1 + tan2x
https://math.stackexchange.com/questions/44546/integral-of-sqrt1-tan2x












