Example 3 Consider the system of equations
$$
\left\{\begin{array}{l}
x+y=z+u, \\
2 x y=z u .
\end{array}\right.
$$

Find the maximum real constant $m$ such that for any positive integer solution $(x, y, z, u)$ of the system, when $x \geqslant y$, we have $m \leqslant \frac{x}{y}$.
(42nd IMO Shortlist)
Solve: Subtracting four times the second equation from the square of the first equation, we get
$$
x^{2}-6 x y+y^{2}=(z-u)^{2} \text {, }
$$

which is $\left(\frac{x}{y}\right)^{2}-6\left(\frac{x}{y}\right)+1=\left(\frac{z-u}{y}\right)^{2}$.
Let $\frac{x}{y}=w, f(w)=w^{2}-6 w+1$.
When $w=3 \pm 2 \sqrt{2}$, $f(w)=0$.
Since $\left(\frac{z-u}{y}\right)^{2} \geqslant 0$, then $f(w) \geqslant 0$, and $w>0$.

Thus, $w \geqslant 3+2 \sqrt{2}$, which means
$$
\frac{x}{y} \geqslant 3+2 \sqrt{2} \text {. }
$$

Next, we prove that $\frac{x}{y}$ can approach $3+2 \sqrt{2}$ arbitrarily closely, thus obtaining $m=3+2 \sqrt{2}$.

For this, it is sufficient to prove that $\left(\frac{z-u}{y}\right)^{2}$ can be arbitrarily small, i.e., approach zero arbitrarily closely.

Let $p$ be a common prime factor of $z$ and $u$. From the given system of equations, $p$ is also a common prime factor of $x$ and $y$. Therefore, we can assume $(z, u)=1$.
From the given system of equations, we have
$$
(x-y)^{2}=z^{2}+u^{2} \text {. }
$$

Assume without loss of generality that $u$ is even. Since $z, u$, and $x-y$ form a Pythagorean triplet, there exist coprime positive integers $a, b$ such that
$$
z=a^{2}-b^{2}, u=2 a b, x-y=a^{2}+b^{2} \text {. }
$$

Also, $x+y=z+u=a^{2}+2 a b-b^{2}$, thus,
$x=a^{2}+a b, y=a b-b^{2}$,
$z-u=a^{2}-b^{2}-2 a b=(a-b)^{2}-2 b^{2}$.
When $z-u=1$, we obtain the Pell's equation
$$
(a-b)^{2}-2 b^{2}=1 \text {, }
$$

where $a-b=3, b=2$ is the smallest solution of the equation.
Thus, this equation has infinitely many solutions, and the values of $a-b$ and $b$ can be arbitrarily large.

Therefore, the right-hand side of equation (1) $\left(\frac{z-u}{y}\right)^{2}$ can be arbitrarily small, i.e., approach zero arbitrarily closely.

Hence, $\frac{x}{y}$ can approach $3+2 \sqrt{2}$ arbitrarily closely, and we obtain $m=3+2 \sqrt{2}$.