Solution (source code)

= Solution

Here $H=hI$, $h=(1+λ)^{-1}$, and prediction risk is
$$
R(h)=nσ^2+(1-h)^2\|μ\|^2+nσ^2h^2.
$$
It decreases then increases, with $h^*=\|μ\|^2/(\|μ\|^2+nσ^2)$, equivalently $λ^*=nσ^2/\|μ\|^2$. Its minimum is $nσ^2+nσ^2\|μ\|^2/(\|μ\|^2+nσ^2)$; the endpoint limits are $2nσ^2$ and $nσ^2+\|μ\|^2$.