# Is There a General Form to Find the Length of a Line Given by a Function?

Consider a function, $f(x)$, and its plot on a graph ($f(x)=y$). This plot is usually represented by a line, e.g. $f(x)=x$ is represented by a straight line. Now consider a section of this line, e.g. $f(x)=x$ for $0 \leq x \leq 10$. Measuring the length of this line is trivial by using the Pythagorean Theorem or the Distance Formula, etc.

Now consider a graph of a semicircle. In this instance, we can also find the length of the line: we use the radius to find half the circumference.

Now consider a different graph, e.g. $f(x)=x^2$. I can think of no direct way to find the length of this line for some interval on $x$. Is there a way?

I can propose a way, which, to me, seems intuitively related to Riemann Integration. In Riemann Integration, we try to approximate the area under the graph for some interval by fitting arbitrarily small rectangles between the curve and the x-axis. Similarly, one ought to be able to find the length of a line on some interval by fitting arbitrarily many right-angled triangles with equal width on the curve: this way, we can partition a curve into arbitrarily many lines that are approximately straight, which we can measure by finding the hypotenuses of our triangles. Then to find the length of the curve, we just sum those hypotenuses. Diagrams for illustration below:  As stated: in each image, the approximated length of the line is the sum of the lengths of the green straight lines. Clearly, as we let the size of the triangle base $a$ become arbitrarily small, our approximation of the length of the curve will become more accurate.

On a final note, obviously this method has something in common with how we 'intuitively' take a derivative.

Any Thoughts?

## 3 Answers

Your intuition is on point. I do not know your math background, but it sounds like you are at least familiar with basic calculus. The name for the line which you describe is arc length. We can pretty much approximate the arc length of any function, and obtain the exact value for quite a few types of functions. There are some pathological cases for which we cannot find exact values once we get into more advance stuff . For example, in general it is very difficult to obtain the arc lenght of a Fourier series restricted to a suitable domain.

Here is an edited version of the explanation of the arc length for single variable functions. This is directly from James Stewarts Calculus book, page 540, $7^{th}$ Edition. The picture here makes a little more precise your intuition, I hope this helps. To answer your specific question about $f(x)=x^2.$

$$L=\int_ a^b \sqrt{1+(2x)^2}dx$$ $$=\frac{1}{2} x \sqrt{1+4 x^2}+\frac{1}{4} \text{ArcSinh}(2 x)$$ $$= \frac{1}{2} x \sqrt{1+4 x^2}+\frac{1}{4} \log \left(\left|2x+\sqrt{(2x)^2+1} \right|\right)$$

So if you want to know the length of "the line" as you refer to it, just choose the interval $[a,b]$ for which you want to know and plug in the endpoint values accordingly. "Log" has has base $e.$

$$\int\limits_{a}^{b}\sqrt{(f'(x))^2+1}dx$$

Explanation:

For every dx distance you move along X-axis you move dy distance along Y-axis since the length along curve is very small it can be treated as straitght line so it is approximately $\sqrt{(dy)^2 + (dx)^2}$.

• A handful of words as explanation would not be misplaced... – Newb Dec 17 '13 at 6:27
• The OP don't want to compute the length of the function on any intervals, read the title again, Ramana. :-) – mrs Dec 17 '13 at 6:32
• Ramana: Your answer is complete, but Genomeme's is better-explained, while also containing your equation for computing the length. I will accept his instead. – Newb Dec 17 '13 at 7:30

I think that there is no contradiction between the post and the answer given by Ramana Venkata. I propose to go back to what the OP describes and to enter in more details just for clarfication purposes.

Let us consider two points along the curve : (x0,y0) and (x1,y1). Then, the square of the hypothenuse is given by (x1 - x0)^2 + (y1 - y0)^2. Since we consider two points which are close, we can expand function y as a Taylor series built around x0. This gives, as a first approximation : y1 = y0 + (x1 - x0) y' [y' being the value of dy/dx computed at x=x0]. So, the square of the hypothenuse write now (x1 - x0)^2 (1 + y'^2) and the length is (x1 - x0) Sqrt[1+y'^2]. For x1 = x0 + dx, the length of the hypothenuse is then Sqrt[1+y'^2] dx.

This is for one elemental segment. We now have to sum these distances between bounds a and b and we want to use an infinitesimal value of dx. We then go from summation to integration.

• That's a good explanation. Thank you – Newb Dec 17 '13 at 7:30
• @Newb. You welcome ! Cheers. – Claude Leibovici Dec 17 '13 at 8:18