Example 5 For a fixed $\theta \in\left(0, \frac{\pi}{2}\right)$, find the smallest positive number $a$ that satisfies the following two conditions:
( i ) $\frac{\sqrt{a}}{\cos \theta}+\frac{\sqrt{a}}{\sin \theta}>1$;
( ii ) There exists $x \in\left[1-\frac{\sqrt{a}}{\sin \theta}, \frac{\sqrt{a}}{\cos \theta}\right]$, such that $\left[(1-x) \sin \theta-\sqrt{a-x^{2} \cos ^{2} \theta}\right]^{2}+$ $\left[x \cos \theta-\sqrt{a-(1-x)^{2} \sin ^{2} \theta}\right]^{2} \leqslant a$. (1998 39th IMO National Training Team Selection Test
From (i) we get
$$\sqrt{a}>\frac{\sin \theta \cos \theta}{\sin \theta+\cos \theta}$$

Without loss of generality, assume
$$\frac{a}{\sin ^{2} \theta}+\frac{a}{\cos ^{2} \theta} \leqslant 1$$
(ii) is equivalent to: there exists $x \in\left[1-\frac{\sqrt{a}}{\sin \theta}, \frac{\sqrt{a}}{\cos \theta}\right]$, such that $2(1-x) \sin \theta \sqrt{a-x^{2} \cos ^{2} \theta}+$ $2 x \cos \theta \sqrt{a-(1-x)^{2} \sin ^{2} \theta} \geqslant a$. That is,
$$2 \sin \theta \cos \theta\left[(1-x) \sqrt{\frac{a}{\cos ^{2} \theta}-x^{2}}+x \sqrt{\frac{a}{\sin ^{2} \theta}-(1-x)^{2}}\right] \geqslant a$$

From Example 4: Let $p, q \in(0,1), p+q>1, p^{2}+q^{2} \leqslant 1$, the function $f(x)=(1-x) \sqrt{p^{2}-x^{2}}$ $+x \sqrt{q^{2}-(1-x)^{2}}(1-q \leqslant x \leqslant p)$, then when $\sqrt{p^{2}-x^{2}}=\sqrt{q^{2}-(1-x)^{2}}$, i.e., $x=$ $\frac{p^{2}-q^{2}+1}{2} \in[1-q, p]$, $f(x)$ reaches its maximum value.

Thus, when $\frac{a}{\sin ^{2} \theta}+\frac{a}{\cos ^{2} \theta} \leqslant 1$, the maximum value is reached when and only when $\sqrt{\frac{a}{\cos ^{2} \theta}-x^{2}}=\sqrt{\frac{a}{\sin ^{2} \theta}-(1-x)^{2}}$, i.e., $x=\frac{1}{2}\left(\frac{a}{\cos ^{2} \theta}-\frac{a}{\sin ^{2} \theta}+1\right) \in\left[1-\frac{\sqrt{a}}{\sin \theta}, \frac{\sqrt{a}}{\cos \theta}\right]$. The maximum value is $2 \sin \theta \cos \theta$ $\sqrt{\frac{a}{\cos ^{2} \theta}-\frac{1}{4}\left(\frac{a}{\cos ^{2} \theta}-\frac{a}{\sin ^{2} \theta}+1\right)^{2}}$, i.e., $\sin \theta \cos \theta \sqrt{\frac{4 a}{\cos ^{2} \theta}-\left(\frac{a}{\cos ^{2} \theta}-\frac{a}{\sin ^{2} \theta}+1\right)^{2}}$.

From equation (3), the smallest $a$ that satisfies the condition and equation (1) is:
$$\sqrt{\frac{4 a}{\cos ^{2} \theta}-\left(\frac{a}{\cos ^{2} \theta}-\frac{a}{\sin ^{2} \theta}+1\right)^{2}} \geqslant \frac{a}{\sin \theta \cos \theta}$$

That is,
$$a^{2}\left(\frac{1}{\cos ^{4} \theta}+\frac{1}{\sin ^{4} \theta}-\frac{1}{\sin ^{2} \theta \cos ^{2} \theta}\right)-2\left(\frac{1}{\cos ^{2} \theta}+\frac{1}{\sin ^{2} \theta}\right) a+1 \leqslant 0$$

Since $\frac{1}{\cos ^{4} \theta}+\frac{1}{\sin ^{4} \theta}-\frac{1}{\sin ^{2} \theta \cos ^{2} \theta}=\frac{3 \sin ^{2} \theta \cos ^{2} \theta}{\sin ^{4} \theta \cos ^{4} \theta}>0$, the roots of the left side of equation (4) are
$$\begin{array}{l}
\frac{\sin ^{4} \theta \cos ^{4} \theta}{1-3 \sin ^{2} \theta \cos ^{2} \theta}\left(\frac{1}{\cos ^{2} \theta}+\frac{1}{\sin ^{2} \theta} \pm\right. \\
\sqrt{\left(\frac{-1}{\cos ^{2} \theta}+\frac{1}{\sin ^{2} \theta}\right)^{2}-\frac{1}{\cos ^{4} \theta}-\frac{1}{\sin ^{4} \theta}+\frac{1}{\sin ^{2} \theta \cos ^{2} \theta}}= \\
\frac{3 \sin ^{2} \theta \cos ^{2} \theta}{1=\sqrt{3} \sin \theta \cos \theta}
\end{array}$$

Therefore, from equation (4) we get
$$\frac{3 \sin ^{2} \theta \cos ^{2} \theta}{1+\sqrt{3} \sin \theta \cos \theta} \leqslant a \leqslant \frac{3 \sin ^{2} \theta \cos ^{2} \theta}{1-\sqrt{3} \sin \theta \cos \theta}$$

From the above, $\frac{\sin ^{2} \theta \cos ^{2} \theta}{(\sin \theta+\cos \theta)^{2}}<\frac{3 \sin ^{2} \theta \cos ^{2} \theta}{1+\sqrt{3} \sin \theta \cos \theta}$, so when $a=\frac{3 \sin ^{2} \theta \cos ^{2} \theta}{1+\sqrt{3} \sin \theta \cos \theta}$, it satisfies equation (P.
Thus, the required
$$a=\frac{3 \sin ^{2} \theta \cos ^{2} \theta}{1+\sqrt{3} \sin \theta \cos \theta}$$