Calculus/Arc length

Suppose that we are given a function $$f$$ that is continuous on an interval $$[a,b]$$ and we want to calculate the length of the curve drawn out by the graph of $$f(x)$$ from $$x=a$$ to $$x=b$$. If the graph were a straight line this would be easy — the formula for the length of the line is given by Pythagoras' theorem. And if the graph were a piecewise linear function we can calculate the length by adding up the length of each piece.

The problem is that most graphs are not linear. Nevertheless we can estimate the length of the curve by approximating it with straight lines. Suppose the curve $$C$$ is given by the formula $$y=f(x)$$ for $$a\le x\le b$$. We divide the interval $$[a,b]$$ into $$n$$ subintervals with equal width $$\Delta x$$ and endpoints $$x_0,x_1,\ldots,x_n$$. Now let $$y_i=f(x_i)$$ so $$P_i=(x_i,y_i)$$ is the point on the curve above $$x_i$$. The length of the straight line between $$P_i$$ and $$P_{i+1}$$ is
 * $$\bigl|P_iP_{i+1}\bigr|=\sqrt{(y_{i+1}-y_i)^2+(x_{i+1}-x_i)^2}$$

So an estimate of the length of the curve $$C$$ is the sum
 * $$\sum_{i=0}^{n-1}\bigl|P_iP_{i+1}\bigr|$$

As we divide the interval $$[a,b]$$ into more pieces this gives a better estimate for the length of $$C$$. In fact we make that a definition.

The Arclength Formula
Suppose that $$f'$$ is continuous on $$[a,b]$$. Then the length of the curve given by $$y=f(x)$$ between $$a$$ and $$b$$ is given by
 * $$L=\int\limits_a^b \sqrt{1+f'(x)^2}dx$$

And in Leibniz notation
 * $$L=\int\limits_a^b \sqrt{1+\left(\tfrac{dy}{dx}\right)^2}dx$$

Proof: Consider $$y_{i+1}-y_i=f(x_{i+1})-f(x_i)$$. By the Mean Value Theorem there is a point $$z_i$$ in $$(x_{i+1},x_i)$$ such that
 * $$y_{i+1}-y_i=f(x_{i+1})-f(x_i)=f'(z_i)(x_{i+1}-x_i)$$

So


 * $$\bigl|P_iP_{i+1}\bigr|$$
 * $$=\sqrt{(x_{i+1}-x_i)^2+(y_{i+1}-y_i)^2}$$
 * $$=\sqrt{(x_{i+1}-x_i)^2+f'(z_i)^2(x_{i+1}-x_i)^2}$$
 * $$=\sqrt{\bigl(1+f'(z_i)^2\bigr)(x_{i+1}-x_i)^2}$$
 * $$=\sqrt{1+f'(z_i)^2}\Delta x$$
 * }
 * $$=\sqrt{\bigl(1+f'(z_i)^2\bigr)(x_{i+1}-x_i)^2}$$
 * $$=\sqrt{1+f'(z_i)^2}\Delta x$$
 * }
 * $$=\sqrt{1+f'(z_i)^2}\Delta x$$
 * }
 * }

Putting this into the definition of the length of $$C$$ gives


 * $$L=\lim_{n\to\infty}\sum_{i=0}^{n-1}\sqrt{1+f'(z_i)^2}\Delta x$$

Now this is the definition of the integral of the function $$g(x)=\sqrt{1+f'(x)^2}$$ between $$a$$ and $$b$$ (notice that $$g$$ is continuous because we are assuming that $$f'$$ is continuous). Hence


 * $$L=\int\limits_a^b \sqrt{1+f'(x)^2}dx$$

as claimed.

As a sanity check of our formula, let's calculate the length of the "curve" $$y=2x$$ from $$x=0$$ to $$x=1$$. First let's find the answer using the Pythagorean Theorem.
 * $$P_0=(0,0)$$

and
 * $$P_1=(1,2)$$

so the length of the curve, $$s$$, is
 * $$s=\sqrt{2^2+1^2}=\sqrt5$$

Now let's use the formula
 * $$s=\int\limits_0^1 \sqrt{1+\left(\tfrac{d(2x)}{dx}\right)^2}\,dx=\int\limits_0^1 \sqrt{1+2^2}\,dx=\sqrt5x\bigg|_0^1=\sqrt5$$

Arclength of a parametric curve
For a parametric curve, that is, a curve defined by $$x=f(t)$$ and $$y=g(t)$$, the formula is slightly different:
 * $$L=\int\limits_a^b \sqrt{f'(t)^2+g'(t)^2}\,dt$$

Proof: The proof is analogous to the previous one: Consider $$y_{i+1}-y_i=g(t_{i+1})-g(t_i)$$ and $$x_{i+1}-x_i=f(t_{i+1})-f(t_i)$$.

By the Mean Value Theorem there are points $$c_i$$ and $$d_i$$ in $$(t_{i+1},t_i)$$ such that
 * $$y_{i+1}-y_i=g(t_{i+1})-g(t_i)=g'(c_i)(t_{i+1}-t_i)$$

and
 * $$x_{i+1}-x_i=f(t_{i+1})-f(t_i)=f'(d_i)(t_{i+1}-t_i)$$

So


 * $$\bigl|P_iP_{i+1}\bigr|$$
 * $$=\sqrt{(x_{i+1}-x_i)^2+(y_{i+1}-y_i)^2}$$
 * $$=\sqrt{f'(d_i)^2(t_{i+1}-t_i)^2+g'(c_i)^2(t_{i+1}-t_i)^2}$$
 * $$=\sqrt{\bigl(f'(d_i)^2+g'(c_i)^2\bigr)(t_{i+1}-t_i)^2}$$
 * $$=\sqrt{f'(d_i)^2+g'(c_i)^2}\Delta t$$
 * }
 * $$=\sqrt{\bigl(f'(d_i)^2+g'(c_i)^2\bigr)(t_{i+1}-t_i)^2}$$
 * $$=\sqrt{f'(d_i)^2+g'(c_i)^2}\Delta t$$
 * }
 * $$=\sqrt{f'(d_i)^2+g'(c_i)^2}\Delta t$$
 * }
 * }

Putting this into the definition of the length of the curve gives
 * $$L=\lim_{n\to\infty}\sum_{i=0}^{n-1}\sqrt{f'(d_i)^2+g'(c_i)^2}\Delta t$$

This is equivalent to:
 * $$L=\int\limits_a^b \sqrt{f'(t)^2+g'(t)^2}\,dt$$