For real numbers $\lambda > 0$ and $x$, I'm considering the convex minimization problem
$$t^{\star} = \mathrm{argmin}_{t}\left[\lambda|t| + \frac{1}{2}(t-x)^{2}\right] := \mathrm{argmin}_{t}\left[f(t)\right].$$
I'm wondering how to develop an equation for $t^{\star}$ in terms of $x$ and $\lambda$ by noting that $0\in \partial f(t^{\star})$ (where $\partial f(t^{\star})$ denotes the sub-differential of $f$ at $t^{\star}$). I've tried to accomplish this by considering explicitly the sets that comprise the sub-differential of $f$, but haven't been successful.
I appreciate any advice.
Note that if $x\ge 0$ then $t^* \ge 0 $ and similarly if $x \le 0$ then $t^* \le 0$.
So, suppose $x\ge 0$, then the solution is also a solution to $\min \{ \lambda t + {1 \over 2} (x-t)^2 | t \ge 0 \}$ which is easily seen to be $t^* = \max(0, x-\lambda)$.
Similarly, if $x \le 0$ the solution is $t^* = \min(0, x+\lambda)$.
As an aside, this is a deadband function.