Continuity and arc length I have recently looked back on the formula for arc length $$\int_a^b \sqrt{1+f'(x)^2}\ dx .$$ In the case of a circle we have the interval $[-r,r]$ and can rearrange $ r^2 = x^2 + y^2 $ to $y=\sqrt{r^2-x^2}$. Since we consider the principal square root we have the top half of the circle and so can simply multiply by $ 2 $ in our final answer. In this formula we require the function that describes this curve to have a continuous derivative on the closed interval $[a, b]$ we find the arc length in. However, in the case of this "semi-circle" function the derivative $f'(x) = \frac{-x}{\sqrt{r^2 - x^2}}$ has an infinite discontinuity at $x=-r$ and $x=r$, the endpoints of our interval $[-r, r]$ . So why does the integral, when evaluated, give the correct answer ?
 A: Because you don't need a continuous derivative. You need only a continuously defined tangent, which is allowed to be vertical, on a bounded curve and the integral always converges properly. Since the endpoints here give vertical tangents, they do not really interfere.
A: Your formula is a particular case of the following definition: the length of a (equivalence class of) $C^1$ parametrized arc of curve is
$$\int_{t_0}^{t_1}\sqrt {\left(\frac {\mathrm dx}{\mathrm dt}\right)^2 + \left(\frac {\mathrm dy}{\mathrm dt}\right)^2}\mathrm d t.$$
This makes the length a continuous function of the ends of the arc. Hence your integral, when evaluated on $[-r+\varepsilon,r-\varepsilon]$, ($0<\varepsilon<r$), gives (without singularity) the length of an arc of circle which, as $\varepsilon\to0$, tends to the length of the semi-circle.
A: A formal definition of arc length is discussed (along with the integral formula) in this answer.
The key part to understand here is that arc length is a continuous function. To put in symbols let $x=f(t), y=g(t) $ where $f, g$ are continuous on $[a, b] $ define a simple curve $\mathcal{C} $. Further let $\mathcal{C} $ be rectifiable and if $[c, d] \subseteq [a, b] $ then let $L_{\mathcal{C}} ([c, d]) $ denote the arc length of the portion of curve $\mathcal{C} $ corresponding to $t\in [c, d] $.
Then it is a standard result that $L_{\mathcal{C}} ([a, x]) $ and $L_{\mathcal{C}} ([x, b]) $ are continuous functions of $x$ on $[a, b] $. Under certain conditions there is an explicit formula to evaluate the arc length. Thus if $f'(t), g'(t) $ are Riemann integrable on $[c, d] $ (this implies that these derivatives are necessarily bounded) then $$L_{\mathcal{C}} ([c, d]) =\int_c^d\sqrt{(f'(t)) ^2+(g'(t))^2} \, dt\tag{1}$$
Now the curve in question (let us denote it by $\mathcal{C} $) is given by $x=t, y=\sqrt{r^2-t^2},t\in[-r,r]$ and it can be proved that it is rectifiable. Note however that the derivatives $f', g'$ are not bounded on $[-r, r] $ and hence the formula $(1)$ does not apply directly.
But let us observe that the derivatives $f', g'$ are bounded in any interval of the form $[-r+h, r-h] $ where $0<h<r$. We now use continuity of the arc length mentioned earlier. We have for $0<h<r$
\begin{align}
L_{\mathcal{C}} ([0,r]) & =\lim_{h\to r^{-}} L_{\mathcal{C}} ([0,h])\notag\\
&=\lim_{h\to r^{-}} \int_0^h\sqrt{(f'(t))^2+(g'(t))^2}\,dt\notag\\
&=\lim_{h\to r^{-}}r \int_0^h\frac{dt}{\sqrt{r^2-t^2}}\,dt\notag\\
&=r\lim_{h\to r^{-}} \int_0^{h/r}\frac{du}{\sqrt{1-u^2}}\text{ (putting }t=ru) \notag\\
&=r\int_0^1\frac{du}{\sqrt{1-u^2}}\notag
\end{align}
where the last integral exists as an improper Riemann integral. A similar treatment can be provided for $L_{\mathcal{C}} ([-r, 0])$ to reach the same result and adding them we get $$L_{\mathcal{C}} ([-r, r]) =2r\int_0^1\frac{du}{\sqrt{1-u^2}}$$ as the length of a semicircle of radius $r$.
