Points from continuous function form a square Let a continuous function $f:[0,1]\mapsto\mathbb{R}$, such that $f(0)=f(1)=0$ and $f(x)>0$ for all $x\in (0,1)$. Prove or disprove that there are two points on the graph of $f$, such that with their projections to $x$-axis, form a square.
I tried to start with a horizontal line moving from up to down but I cannot define the correct quantity that will form a well-defined continuous function, that will be vanished.
 A: If we additionally assume that $f(x) \le 1 - x$ on the whole interval then you can prove the existence of the points in the following way.
Consider the function $h\colon x\mapsto f(x) - f(x + f(x))$. Because of the assumption, $h$ is correctly defined on the whole segment. If we can find $x$ such that $h(x) = 0$ then this will mean $f(x) = f(x + f(x))$ and hence points $x$ and $f(x)$ will form a desired square.
Assume that $h(x)\neq 0$ on $(0,1)$. If $x_0$ is a point of a global maximum of $f$ then $h(x_0) \ge 0$. On the other hand $g\colon x\mapsto x + f(x)$ is continuous, $g(0) =0$, $g(1) = 1$ hence there exists $x_1$ such that $x_0 = g(x_1) = x_1 + f(x_1)$. Then $h(x_1)\le 0$. Now the intermediate value theorem concludes the proof.
$\textbf{UPD}$. This idea can be used to prove the existence without the assumption.
Let $y_1 = \inf\{x\colon f(x) \ge 1 - x\}$, i.e, the $x$-coordinate of the frist intersection of the graph of $f$ with the line $y = 1 - x$. We assume that $y_1 < 1$.  Then the function $h$ is defined correctly on $[0, y_1]$. Moreover, $y_1 + f(y_1) = 1$ hence $h(y_1) = f(y_1) - f(1) = f(y_1) > 0$. On the other hand, if we define $x_0$ as a point of maximum of $f$ on $[0,y_1]$ then there still would be $x_1\in [0,y_1]$ such that $x_1 + f(x_1) = x_0$ and consequently $h(x_1) \le 0$. To finish, use the Intermediate value theorem again.
