Consider the problem of finding the first variation $\delta_{y_0}J$ for $J(y)=\int_0^1\sqrt{1+y'(x)^2}\,\text{d}x$, given $y_0(x)=ax+b$. I don't know if I'm proceeding correctly and the answer I'm getting does not match my intuition for the problem. We want to find the derivative below at $t=0$:
$$\delta_{y_0}J=\frac{\text{d}}{\text{d}t}\int_0^1\sqrt{1+(a+th'(x))^2}\,\text{d}x$$ $$=\int_0^1\frac{\partial}{\partial t}\sqrt{1+(a+th'(x))^2}\,\text{d}x$$ $$=\int_0^1\frac{\partial}{\partial t}\sqrt{1+a^2+2ath'(x)+t^2h'(x)^2}\,\text{d}x$$ $$=\int_0^1\frac{2ah'(x)+2th'(x)^2}{2\sqrt{1+a^2+2ath'(x)+t^2h'(x)^2}}_{t=0}\,\text{d}x$$ $$=\int_0^1\frac{ah'(x)}{\sqrt{1+a^2}}\,\text{d}x$$ $$=\frac{a}{\sqrt{1+a^2}}(h(1)-h(0))$$
However I think this should be $0$ intuitively, since the expression in the integral is an arclength and we're finding some "variation" of this setting our arc to be a straight line, which already is the shortest distance between two points. So it should be some kind of extrema for this expression...