Let $K:= \{ u \in L^2(\Omega) : |u| \leq 1\}$ where the absolute value means the $L^2$ norm. Consider the Hilbert space projection operator $P:L^2(\Omega) \to K$, which satisfies by definition $$(Px-x, Px-a) \leq 0$$ for all $a \in K$.
I read in here that:
If $|x| > 1$, then $Px = \frac{x}{|x|}$
If $|x| = 1$, and $w \in L^2$ and $t > 0$ (can be chosen sufficiently small) is such that $|x+tw| \leq (1+t^2|w|^2)^{\frac 12}$, then $P(x+tw) = \frac{x+tw}{\sup(1, |x+tw|)}$.
I don't see why either of these are true. I tried plugging these expressions into the definition, but I wasn't able to prove it. ANy help please.