9. (Sichuan Province) If the function $y=a^{2}-2 a \cos x$ $-\sin ^{2} x$ has a minimum value of 1 (where $a$ is a real number), then the maximum value of the function $y$ is $\qquad$.
$9.5+4 \sqrt{2}$.