Example 15 (16th Irish Mathematical Olympiad) Let $a, b>0$, find the largest positive number $c$, such that for any positive real number $x$, we have $c \leqslant \max \left\{a x+\frac{1}{a x}, b x+\frac{1}{b x}\right\}$.
Let $f(t)=t+\frac{1}{t}, t>0, g(x)=\max (f(a x), f(b x))$. Convert to finding the minimum value of $g(x)$ for $x>0$.
If $a=b$, then $g(x)=a x+\frac{1}{a x} \geqslant 2$, equality holds when $x=\frac{1}{a}$, in this case, the desired $c=2$.
If $a \neq b$. Without loss of generality, assume $0<f(t)$.
Therefore, when $x \geqslant \frac{1}{\sqrt{a b}}$, $f(b x) \geqslant f\left(\sqrt{\frac{b}{a}}\right)$;
When $0<x \leqslant \frac{1}{\sqrt{a b}}$, there is also $f(b x) \geqslant f\left(\sqrt{\frac{a}{b}}\right)=f\left(\sqrt{\frac{b}{a}}\right)$. Hence $g(x) \geqslant f\left(\sqrt{\frac{b}{a}}\right)$. So $c=$ $f\left(\sqrt{\frac{b}{a}}\right)=\sqrt{\frac{b}{a}}+\sqrt{\frac{a}{b}}$. Equality holds when $x=\frac{1}{\sqrt{a b}}$.
In summary, the maximum $c=\sqrt{\frac{b}{a}}+\sqrt{\frac{a}{b}}$.