I found this exercise in Demidovich's "Problems in Mathematical Analysis", and found it quite interesting.
Write the function $$ f(x) = \begin{cases} 0, & \text{if $x \leq 0$} \\ x, & \text{if $x > 0$} \end{cases} $$ as a single formula using the absolute value sign.
I've posted my solution below.
Answer
$$f(x) = \frac{x + \lvert x \rvert}{2}$$
Explanation
When $x \leq 0$, $x + \lvert x\rvert = 0$, rendering the $\text{RHS} = 0$.
When $x > 0$, $x + \lvert x \rvert = 2x$. So, it must be divided by $2$ for $\text{RHS} = x$.