Maximum length between two points There is given:
$$f(x) = x^2$$
$$g(x) = x$$
A parallel line to the $x$-axis is put so there is two cut points between the line and the two functions.

Find the biggest length of the line that connects the two functions.

I tried the length between $(x, x)$  and $(x, x^2)$ but didn't work.
EDIT: To explain it better, which orange line is bigger?

 A: Take the point on the line $y=x$ as some $(a,a)$. The point on the curve $y=x^2$ will be $(\sqrt a,a)$ since their $y$ coordinate must be the same.
Now we must maximise the function $\sqrt a -a$ 
(Since that is the length of the line you have drawn as orange.)
$${1\over {2\sqrt a}}-1=0$$
$\Rightarrow$ $$a=1/4$$
Substituting that in $\sqrt a -a$
The length is also $1/4$
Another solution is to see that the distance between the two curves between $0$ and $1$ is maximum when the slope of the curve $y=x^2$ is equal to the slope of $y=x$
A: I assume that the "parallel line to the $x-$ axis" is of the form $x = a$, in which case the result of the length of this line is fixed. Is this what you mean? If $a < 1$ then the length of the line is $a - \sqrt{a}$, and has a maximum when $a = 1/4$. If $a > 1$ the length of the line is $\sqrt{a} - a$ and there is no maximum.
A: The easiest way is to think about it in terms of switching axes. If $y = f(x) = x^2$ and $y_1 = g(x) = x_1$ then $$x = \sqrt{y}$$ and $$ x_1 = y_1$$ Your job is to find the maximum value of $x - x_1$. This is easily done by differentiating with respect to $y$. 
A: HINT
Differentiate
$$(\sqrt y -y) $$
with respect to $y$,equate to zero,...
