In $\triangle A B C$, $\angle A C B=90^{\circ}, A C=B C$, $D$ is a point on side $A B$, and the perpendicular bisector of line segment $C D$ intersects sides $A C$ and $B C$ at points $M$ and $N$, respectively. If $A D=a, B D=b$ (where $a, b$ are given positive integers), try to find the lengths of $C M$ and $C N$ (expressed in the simplest form involving $a$ and $b$), and determine the range of $\frac{b}{a}$.
Solution: As shown in Figure 2, it is clear that
$A C=B C$
$=\frac{a+b}{\sqrt{2}}$,
$\angle C A B=45^{\circ}$.
By the cosine rule,
$C D^{2}=\left(\frac{a+b}{\sqrt{2}}\right)^{2}+a^{2}-2 \cdot \frac{a+b}{\sqrt{2}} \cdot a \cos 45^{\circ}$
$=\frac{a^{2}+b^{2}}{2}$.
Therefore, $C D=\sqrt{\frac{a^{2}+b^{2}}{2}}$.
Let $C D$ intersect $M N$ at point $K$, and let $C M=x, C N=y$, then $C K=K D=\frac{C D}{2}=\frac{1}{2} \sqrt{\frac{a^{2}+b^{2}}{2}}$,
$M N=\sqrt{x^{2}+y^{2}}$.
By the projection theorem,
$x^{2}=M K \cdot \sqrt{x^{2}+y^{2}}, y^{2}=N K \cdot \sqrt{x^{2}+y^{2}}$,
$C K^{2}=M K \cdot K N$.
Thus, $x^{2} y^{2}=M K \cdot N K\left(x^{2}+y^{2}\right)$
$=C K^{2}\left(x^{2}+y^{2}\right)=\frac{a^{2}+b^{2}}{8}\left(x^{2}+y^{2}\right)$,
which means $\frac{1}{x^{2}}+\frac{1}{y^{2}}=\frac{8}{a^{2}+b^{2}}$.
Connecting $M D$ and $N D$, we have
Rt $\triangle M C N \cong \mathrm{Rt} \triangle M D N$.
By $S_{\triangle C Q N}+S_{\triangle M O N}+S_{\triangle M N D}+S_{\triangle A N D}=S_{\triangle A B C}$ we get
$2 \cdot \frac{1}{2} x y+\frac{1}{2} a\left(\frac{a+b}{\sqrt{2}}-x\right) \sin 45^{\circ}+$
$\frac{1}{2} b\left(\frac{a+b}{\sqrt{2}}-y\right) \sin 45^{\circ}=\frac{1}{2}\left(\frac{a+b}{\sqrt{2}}\right)^{2}$.
Simplifying, we get $2 \sqrt{2} x y=a x+b y$. Therefore,
$\frac{b}{x}+\frac{a}{y}=2 \sqrt{2}$.
Solving equations (1) and (2) simultaneously, we get
$x=\frac{a^{2}+b^{2}}{2 \sqrt{2} b}, y=\frac{a^{2}+b^{2}}{2 \sqrt{2} a}$.
Thus, $C M=\frac{a^{2}+b^{2}}{2 \sqrt{2} b}, C N=\frac{a^{2}+b^{2}}{2 \sqrt{2} a}$.
Also, from $x \leqslant \frac{a+b}{\sqrt{2}}$, and $y \leqslant \frac{a+b}{\sqrt{2}}$ we get
$$
\begin{array}{l}
\left\{\begin{array}{l}
a^{2}+b^{2} \leqslant 2 a b+2 b^{2} \\
a^{2}+b^{2} \leqslant 2 a^{2}+2 a b
\end{array},\left\{\begin{array}{l}
a^{2}-b^{2} \leqslant 2 a b, \\
b^{2}-a^{2} \leqslant 2 a b
\end{array}\right.\right. \\
\Leftrightarrow\left\{\begin{array} { l } 
{ 1 - ( \frac { b } { a } ) ^ { 2 } \leqslant 2 \cdot \frac { b } { a } , } \\
{ ( \frac { b } { a } ) ^ { 2 } - 1 \leqslant 2 \cdot \frac { b } { a } }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
\frac{b}{a} \geqslant \sqrt{2}-1, \\
1-\sqrt{2} \leqslant \frac{b}{a} \leqslant \sqrt{2}+1
\end{array}\right.\right. \\
\Leftrightarrow=\sqrt{2}-1 \leqslant \frac{b}{a} \leqslant \sqrt{2}+1 .
\end{array}
$$

In summary, $C M=\frac{a^{2}+b^{2}}{2 \sqrt{2} b}, C N=\frac{a^{2}+b^{2}}{2 \sqrt{2} a}$, and the range of $\frac{b}{a}$ is the closed interval $[\sqrt{2}-1, \sqrt{2}+1]$.