4. Let the line $x \cos \theta+y \sin \theta=2, \theta \in$ $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$ and $\frac{x^{2}}{6}+\frac{y^{2}}{2}=1$ have a common point. Then the range of $\theta$ is $\qquad$
4. $\left[-\frac{\pi}{4}, \frac{\pi}{4}\right]$.

Since $2^{2}=(x \cos \theta+y \sin \theta)^{2}$
$$
\begin{array}{l}
=\left(\frac{x}{\sqrt{6}} \times \sqrt{6} \cos \theta+\frac{y}{\sqrt{2}} \times \sqrt{2} \sin \theta\right)^{2} \\
\leqslant\left(\frac{x^{2}}{6}+\frac{y^{2}}{2}\right)\left(6 \cos ^{2} \theta+2 \sin ^{2} \theta\right),
\end{array}
$$

Therefore, $\left(6 \cos ^{2} \theta+2 \sin ^{2} \theta\right) \geqslant 4$.
Thus, $\cos ^{2} \theta \geqslant \frac{1}{2}$. Hence $\theta \in\left[-\frac{\pi}{4}, \frac{\pi}{4}\right]$