Given the following minimization problem:
$$\begin{aligned}\min \quad & x \\ \mathrm{s.t.} \quad & f_1(x) \leq 0\end{aligned}$$
Where
$$f_1 = \begin{cases} -x + 2 &x\geq 1 \\ x & -1 \leq x \leq 1 \\ -x -2 & x \leq - 1 \end{cases}$$
How would I go about finding the dual problem? I have been working at this for hours and cannot come up with anything.
Note: I came across this post but I don't think the solution applies here as $\max(-x + 2, x, -x -2) \neq f_1(x)$. If that were the case the solution would be trivial using epigraph form.
Just use the definition: \begin{equation} L(x,\lambda) = x + \lambda f_1(x) = \begin{cases} (1-\lambda)x + 2\lambda &\mbox{if } x\geq 1 \\ (1+\lambda)x &\mbox{if } -1 \leq x \leq 1 \\ (1-\lambda)x -2\lambda &\mbox{if } x \leq - 1. \end{cases}\end{equation} The dual function is $g(\lambda) = \inf_x L(x,\lambda) \ \forall \lambda \ge 0$. Notice that if $\lambda \neq 1$ then let $x\to+\infty$ or $x\to-\infty$ we obtain $L(x,\lambda) \to -\infty$. When $\lambda=1$ it is easy to check that $\min_x L(x,1) = -2$, attained at any $x\le -1$. Therefore the dual function is \begin{equation} g(\lambda) = \begin{cases} -2 &\mbox{if } \lambda = 1 \\ -\infty &\mbox{otherwise}. \end{cases}\end{equation} Obviously the maximum of $g(\lambda)$ is $-2$, attained at $\lambda = 1$.
Note that the problem is not convex because $f_1(x)$ is not convex (although it can be reformulated as a convex program), but it turns out in this case that strong duality holds.