A proof in real analysis If $f(x)$ is a non-constant function with continuous derivatives in $[0,1]$ and we have $|f(1)|\geq|f(0)|.$ Prove that there exists an $x\in(0,1),$ such that $f(x)$ and $f'(x)$ have the same sign.
I am pretty sure Mean Value Theorem is supposed to be used here. But how?
 A: Hint: What is $\frac{\mathrm d}{\mathrm dx}f^2(x)$?
A: Argue by contradiction. Assume that $f(x)f'(x)\le 0$ for any $x\in (0,1).$ Then the function $$F(x)=\int_0^x f(t)f'(t)dt=\frac12 f^2(x)-\frac12 f^2(0)$$ 
is decreasing (since $F'(x)=f(x)f'(x)\le 0.$) So we have that $$F(1)-F(0)=\frac12 f^2(1)-\frac12 f^2(0)\le 0.$$ On the other hand, by assumption, it is $$F(1)-F(0)=\frac12 f^2(1)-\frac12 f^2(0)\ge 0.$$ Thus $F$ must be constant, that is,  $f(x)f'(x)\equiv 0, \forall x\in [0,1].$ 
Now, by assumption, $f$ is not constant. So there exists $x_0\in(0,1)$ such that $f'(x_0)\ne 0.$ If $f(x_0)\ne 0$ we have done. If $f(x_0)=0,$ we use the continuity of $f'$ to guarantee the existence of $\delta>0$ such that $f'$ doesn't vanish in $(x_0-\delta,x_0+\delta)\subset (0,1).$ Now, there exists $x_1\in (x_0-\delta,x_0+\delta)$ such that $f(x_1)\ne 0,$ since, in other case, $f$ would be constant in $(x_0-\delta,x_0+\delta)\subset (0,1),$ contradicting that  $f'$ doesn't vanish in $(x_0-\delta,x_0+\delta)\subset (0,1).$ This contradicts the fact that $F$ is constant. So there exists $x\in(0,1)$ such that $f(x)f'(x)>0,$ which solves the problem.
