Integral inequality of length of curve Let $f:\mathbb{R}\to \mathbb{R}$ be a continuously differentiable function. Prove that for any $a.b\in \mathbb{R}$
$$\left (\int_a^b\sqrt{1+(f'(x))^2}\,dx\right)^2\ge (a-b)^2+(f(b)-f(a))^2$$.

source: This is from TIFR GS stage 2.
I think mean value theorem kills it but can't do it ...even try Cauchy-Schwarz inequality but nothing conclusion.Geometrically its true since distance  between two point $(a,f(a))$ & $(b,f(b))$ is greater or equal to any arc length of same endpoints.

An easy way to do this is to note that since distance is invariant under rotations, without loss of generality, we may assume that $f(a)=f(b).$ And now, since $\sqrt{1-f'(x)}\ge 0$ on $[a,b]$, the function in $C^1([a,b])$ that minimizes the integral coincides with the function $f$ that minimizes the integrand, and clearly, this happens when $f'(x)=0$ for all $x\in [a,b].$ That is, when $f$ is constant on $[a,b].$ Then, $f(x)=f(a)$ and the result follows. 
If you want to do this without the wlog assumption, then argue as follows:
Let $\epsilon>0,\ f\in C^1([a,b])$ and choose a partition $P=\{a,x_1,\cdots,x_{n-2},b\}$. 
The length of the polygonal path obtained by joining the points 
$(x_i,f(x_i))$ is $\sum_i \sqrt{(\Delta x_i)^2+(\Delta y_i)^2}$ and this is clearly $\ge (b-a)^2+(f(b)-f(a))^2$. (You can make this precise by using an induction argument on $n$.)
And this is true for $\textit{any}$ partition $P$.
But the above sum is also $\sum_i\sqrt{1+\frac{\Delta y_i}{\Delta x_i}}\Delta x_i $ and now, upon applying the MVT, we see that what we have is a Riemann sum for $\sqrt{1+f'(x)}$. 
To finish, choose $P$ such that $\left |\int^b_a\sqrt{1+f'(x)}dx- \sum_i\sqrt{1+f'(c_i)}\Delta x_i  \right |<\epsilon $. (The $c_i$ are the numbers $x_i<c_i<x_{i-1}$ obtained from the MVT). Then, 
$(b-a)^2+(f(b)-f(a))^2\le \sum_i\sqrt{1+f'(c)}\Delta x_i<\int^b_a\sqrt{1+f'(x)}+\epsilon.$ 
Since $\epsilon$ is arbitrary, the result follows. 
For a slick way to do this, use a variational argument: assuming a minimum $f$ exists, consider $f+t\phi$ where $t$ is a real parameter and $\phi$ is arbitrary $C^1([a,b])$. 
Subsitute it into the integral:
$l(t)=\int_a^b \sqrt{1+(f'+t\phi')^2}dx$. 
Since $f$ minimizes this integral, the derivative of $l$ at $t=0$ must be equal to zero. Then, 
$0=l'(0)= \int_a^b \dfrac{f'\phi'}{\sqrt{1+(f')^2}}dx$. 
After an integration by parts, we get
$\dfrac{f'}{\sqrt{1+(f')^2}} = c$ for some constant $c\in \mathbb R,$ from which it follows that $f'=c$. And this means, of course, that the graph of $f$ is a straight line connecting $(a,f(a))$ and $(b,f(b)).$ The desired inequality follows.
