Let $f\colon\mathbb{R}\to\mathbb{R}$ be a continuous function such that $|f|$ is convex.
Define $F\colon\mathbb{R}^2\to\mathbb{R}$ as $F(x,y)=|f(x)|+|y-f(x)|$.
Prove that $F$ is convex.
AFAIK this is an old contest problem from NA.
I have searched the Putnam archive, but didn't see it there.
My only idea was the most straightforward attempt:
we need
$F(tx_1+(1-t)x_2,\: ty_1+(1-t)y_2)
\le
tF(x_1,y_1)+(1-t)F(x_2,y_2)$
for all $t\in[0,1]$, $x_1,x_2,y_1,y_2\in\mathbb{R}$, write this in terms of $f$ and use the fact that $|f|$ is convex, but the remaining inequality turned to be false, so this is not the way.
Best Answer
Since $|f(x)|$ is convex and continuous, we can prove the convexity of two other single-variable functions: $f_+(x) = \max\{0, f(x)\}$ and $f_-(x) = \max\{-f(x), 0\}$.
This follows from the definition of convexity by casework on the signs of $f(x_1), f(x_2)$, which I will only do for $f^+$:
Once we have that lemma, the rest is easy: \begin{align} F(x,y) &= \max\{f(x), -f(x)\} + \max\{f(x)-y, y-f(x)\} \\ &= \max\{f(x) + f(x)-y, f(x) + y-f(x), -f(x)+f(x)-y, -f(x)+y-f(x)\} \\ &= \max\{ \max\{2f(x)-y, -y\}, \max\{y, y-2f(x)\}\} \\ &= \max\{ 2f_+(x) - y, 2f_-(x) + y)\}. \end{align} This is the max of two convex functions, which is convex.