We have a curve $y=f(x)>0$ and a moving point along the $x$ axis. For every position of the point, we find the nearest point on the curve, let $(x',f(x'))$, in the sense of the Euclidean distance.
Can we show that $x'$ is a monotonic (possibly discontinuous) function of $x$ ?


Here's a purely algebraic solution:
Let $h(x, a) = (x-a)^2 + f(x)^2$ so $\displaystyle a' = \mathop{\operatorname{argmin}}_{x \in \mathbb{R}} h(x, a)$. Let $a_1 < a_2$. Note that
$$h(x, a_2) - h(x, a_1) = (a_2-x)^2 - (a_1-x)^2 = (a_2-a_1)(a_2+a_1-2x).$$
This is a decreasing function of $x$. Now suppose for contradiction that $a_2' = x_1 < x_2 = a_1'$. Then
$$\begin{array}{lcl} x_2 = a_1' & \implies & \phantom{ h(x_2, a_2) \: - } \: h(x_2, a_1) \leqslant \phantom{h(x_1, a_2) \: - } \: h(x_1, a_1) \\ x_1 < x_2 & \implies & h(x_2, a_2) - h(x_2, a_1) < h(x_1, a_2) - h(x_1, a_1) \\ \hline & & h(x_2, a_2) \: \phantom{ - \: h(x_2, a_1) } < h(x_1, a_2) \end{array}$$
So $x_1 \neq \mathop{\operatorname{argmin}}_{x \in \mathbb{R}} h(x, a_2)$, contradiction.
This solution has a nice illustration if $f(x)$ is smooth. For a fixed $a$ the point $a'$ will be $x$ such that $h(x, a)$ is minimal. If you fix $x_1 < x_2$ and move $a$ continuously to the right, you'll note that $h(x_1, a)$ and $h(x_2, a)$ are moving up or down, but $h(x_2, a)$ is always moving faster down (or slower up) than $h(x_1, a)$, since
$$\frac{\mathrm{d}}{\mathrm{d} a} h(x_2, a) = 2(a-x_2) < 2(a-x_1) = \frac{\mathrm{d}}{\mathrm{d} a} h(x_1, a).$$
So if $x_2$ minimizes $h(x, a_1)$, and we move from $a_1$ to a point $a_2$ to the right, $x_2$ can never be worse than any point $x_1 < x_2$, because it started better and was moving better.