I have to find the function $f(x)$ that minimizes the expression $$ L(y, f(x)) = \left\{\begin{array}{ll} \max(0, 1 - yf(x)), & yf(x) \geq 0 \\ 1 - kyf(x), & otherwise\end{array}\right.$$
where $y \in \mathbb{R}$ and $k \geq 1$.
I know that I may have to take a look at the different intervals, but I don't seem to find a start.