Suppose we have a vector $p \in \Re ^n$. How can I get analytical solution for that optimization problem: $p = \arg \min {f(x)}_{p \in R} $ if $f(p) = ||p-z||^{2}_{2} + x||p||_{1} $, where $|| \cdot || $ are $L^1$ and $L^2$ norm and $x > 0$.
UPD1 Is it correct if I rewrite $f(p)$ as following: $f(p) = \sum_{i=1}^{N} \sqrt{(p-z)^2} + x\sum_{i=1}^{N}|{p}| $ ?
Here is a sketch for obtaining an analytical solution:
First, we consider only the case $n=1$. The problem can be written as $ \min f(p)= (p-z)^2+x |p|$. Then, by using classical methods and analyzing the cases $p \leq,0$ and $p\geq0$ one can optain that the solution $\bar p$ is given by $$ \bar p = \tfrac12 \min(z+x,\max(z-x,0)). $$ I suggest you try to figure out the details by yourself.
For $n>1$, the objective function $f$ can be written as $$ f(p) = \sum_{i=1}^N \left( (p_i-z_i)^2 + x | p_i| \right). $$
For this problem the solution can be obtained by minimizing each $p_i$ seperately using the method of the case $n=1$. This is possible due to the special structure of the problem. Then the analytical solution can be obtained by putting the individual solutions together in a vector $\bar p\in\mathbb R^n$.