This is a very famous problem and there are many articles discussing it. For example: https://stanford.edu/~jduchi/projects/DuchiShSiCh08.pdf .
$$\min_{\|x\|_1 \leq \tau} \frac{1}{2}\|x-z\|^2$$
My question is how to derive its dual problem.
The following is my effort:
he Lagrangian dual is the following:
\begin{align*}
L(x,u) = \frac{1}{2}\|x-z\|^2 + u(\|x\|_1 -\tau)
\end{align*}So
\begin{align*}
\nabla_x L = (x - z) + \bar{u}
\end{align*} where the $i$-th entry of $\bar{u}$ is
\begin{align*}
\bar{u}_i=\begin{cases}
u_i, &x_i > 0\\
[-u_i,u_i], &x_i=0 \\
-u_i, &x_i< 0
\end{cases}
\end{align*}
So let $\nabla_x L = 0$, we have $x^* = z-\bar{u}$. So
\begin{align*}
L(u) = \frac{1}{2}\|\bar{u}\|^2 + u(\|z-\bar{u}\|_1 - \tau)
\end{align*}
I am confused that there are three cases for $\bar{u}$, and they are imbedded in the norm functions. I have no idea how to write down a neat and clear dual problem.