Example 12 Let $x, y$ be positive numbers, and $x+y=1$. Find the minimum value of the function $W=\left(1+\frac{1}{x}\right)\left(1+\frac{1}{y}\right)$. (Adapted from the 3rd Canadian Mathematical Competition)
Solution: Without loss of generality, let $x \geqslant y$, and set $x=\frac{1}{2}+t$, then $y=$
$$
\begin{array}{l} 
\frac{1}{2}-t, 0 \leqslant t<\frac{1}{2} . \\
\therefore W=\left(1+\frac{1}{x}\right)\left(1+\frac{1}{y}\right) \\
=\frac{3+2 t}{1+2 t} \cdot \frac{3-2 t}{1-2 t}=\frac{9-4 t^{2}}{1-4 t^{2}} \\
\geqslant \frac{9-36 t^{2}}{1-4 t^{2}}=9 .
\end{array}
$$

When $t=0$, i.e., $x=y$, the minimum value sought is 9.