Solution (source code)

= Solution

Put $\theta_0=-b/(a-1)$ and compare with the constant estimator
$\delta=\theta_0$. Its risk is $(\theta-\theta_0)^2$. For $a<0$,
$$
R(\theta,\widehat\theta_{a,b})
=\frac{a^2}{n}+(a-1)^2(\theta-\theta_0)^2
>(\theta-\theta_0)^2
$$
for every $\theta$, since $|a-1|>1$. Hence the original estimator is inadmissible.