9. Let the complex number $z=3 \cos \theta+\mathrm{i} \cdot 2 \sin \theta$, find the maximum value of the function $y=\theta-\arg z\left(0<\theta<\frac{\pi}{2}\right)$ and the corresponding $\theta$ value.
9. $\tan y=\frac{\tan \theta-\tan t}{1+\tan \theta \cdot \tan t}=\frac{\tan \theta-\frac{2}{3} \tan \theta}{1+\frac{2}{3} \tan ^{2} \theta}=\frac{1}{\frac{3}{\tan \theta}+2 \tan \theta} \leqslant \frac{1}{2 \sqrt{6}}$

The equality holds when $\frac{3}{\tan \theta}=2 \tan \theta$, i.e., $\tan \theta=\frac{\sqrt{6}}{2}$, which means $\theta=\arctan \frac{\sqrt{6}}{2}$.