Example 5 Find the range of real number $a$ such that for any real number $x$ and any $\theta \in\left[0, \frac{\pi}{2}\right]$, the following inequality always holds:
$$
\begin{array}{l}
(x+3+2 \sin \theta \cdot \cos \theta)^{2}+(x+a \sin \theta+ \\
a \cos \theta)^{2} \geqslant \frac{1}{8} .
\end{array}
$$
(1996, National High School Mathematics Competition)
Solution 1: Conventional Approach.
Rearrange the inequality with $x$ as the variable:
$$
\begin{array}{l}
16 x^{2}+16[3+2 \sin \theta \cdot \cos \theta+a(\sin \theta \\
+\cos \theta)] x+8(3+2 \sin \theta \cdot \cos \theta)^{2} \\
+8 a^{2}(\sin \theta+\cos \theta)^{2}-1 \geqslant 0 .
\end{array}
$$

Let the left side of the inequality be $f(x)$, and for $f(x) \geqslant 0$ to always hold, we need $\Delta \leqslant 0$.
Let $t=\sin \theta+\cos \theta$, from $\Delta \leqslant 0$ we get
$$
\left(t^{2}+2-a t\right)^{2} \geqslant \frac{1}{4} \Rightarrow t^{2}+2-a t \geqslant \frac{1}{2} \text {, }
$$

or $t^{2}+2-a t \leqslant-\frac{1}{2}$.
From equation (1), we get $a \leqslant \frac{t^{2}+\frac{3}{2}}{t}=t+\frac{3}{2 t}, t+\frac{3}{2 t} \geqslant$ $2 \sqrt{t \frac{3}{2 t}}=\sqrt{6}$, hence $a \leq \sqrt{6}$.

From equation (3), we get $a \geqslant \frac{t^{2}+\frac{5}{2}}{t}=t+\frac{5}{2 t}, f(t)=$ $t+\frac{5}{2 t}$ is a decreasing function on $[1, \sqrt{2}]$,
$$
a \geqslant \frac{7}{2} \text {. }
$$

Combining the results, we get $a \in(-\infty, \sqrt{6}] \cup\left[\frac{7}{2},+\infty\right)$.
If we use the inequality $x^{2}+y^{2} \geqslant \frac{1}{2}(x+y)^{2}$, we can get another solution.
Solution 2: Let $u=3+2 \sin \theta \cdot \cos \theta$,
$v=a(\sin \theta+\cos \theta)$, the inequality becomes
$(x+u)^{2}+(x+v)^{2} \geqslant \frac{1}{8}$.
To ensure $(x+u)^{2}+(x+v)^{2} \geqslant \frac{1}{8}$ always holds, we only need the minimum value of the function $f(x)=(x+u)^{2}+(x+v)^{2}$ to be greater than or equal to $\frac{1}{8}$. The minimum value of $f(x)$ is $\frac{1}{2}(u-v)^{2}$, so $(u-v)^{2} \geqslant \frac{1}{4}$. We can then return to Solution 1.

Based on the characteristics of this problem, we can also get two simpler solutions.
Solution 3: Completing the Square.
From $(x+u)^{2}+(x+v)^{2} \geqslant \frac{1}{8}$, we get
$2 x^{2}+2(u+v) x+u^{2}+v^{2} \geqslant \frac{1}{8}$
$\Rightarrow\left(x+\frac{u+v}{2}\right)^{2}-\frac{(u+v)^{2}}{4}+\frac{u^{2}+v^{2}}{2} \geqslant \frac{1}{16}$
$\Rightarrow\left(x+\frac{u+v}{2}\right)^{2}+\frac{(u-v)^{2}}{4} \geqslant \frac{1}{16}$
$\Rightarrow \frac{(u-v)^{2}}{4} \geqslant \frac{1}{16}$. We can then return to Solution 1.
Solution 4: Geometric Method.
Let $y=x$, the original inequality transforms into
$$
\left\{\begin{array}{l}
(x+u)^{2}+(y+v)^{2} \geqslant \frac{1}{8}, \\
y=x
\end{array}\right.
$$

which must hold for all $x$.
From Figure 1, we see:
$$
\frac{|u-v|}{\sqrt{2}} \geqslant \frac{1}{2 \sqrt{2}} \text {. }
$$

We can then return to Solution 1.