Determine all functions $f:(0, \infty) \rightarrow(0, \infty)$ (i.e., $f$ maps from the set of positive real numbers to the set of positive real numbers) such that

$$
\frac{(f(w))^{2}+(f(x))^{2}}{f\left(y^{2}\right)+f\left(z^{2}\right)}=\frac{w^{2}+x^{2}}{y^{2}+z^{2}}
$$

holds for any positive real numbers $w, x, y, z$ satisfying $w x=y z$.
Kiss Viktor's solution. Substitute $w=x=y=z=1$. The condition $w x=y z$ is satisfied, so

$$
\frac{2 f^{2}(1)}{2 f(1)}=\frac{1^{2}+1^{2}}{1^{2}+1^{2}}=1
$$

Since $f(1)>0$, we can simplify, yielding $f(1)=1$. Next, substitute $w=1, x=a, y=z=\sqrt{a}$, where $a$ is any positive real number. The condition $w x=y z$ is satisfied, so

$$
\frac{f^{2}(1)+f^{2}(a)}{2 f(a)}=\frac{1+f^{2}(a)}{2 f(a)}=\frac{1+a^{2}}{2 a}
$$

Since $f(a)$ and $a$ are positive, we can multiply by them, yielding

$$
a\left(1+f^{2}(a)\right)=f(a)\left(1+a^{2}\right)
$$

or

$$
f^{2}(a) \cdot a-f(a)\left(1+a^{2}\right)+a=0
$$

This is a quadratic equation in $f(a)$, with solutions:

$$
f(a)=\frac{1+a^{2} \pm \sqrt{\left(1+a^{2}\right)^{2}-4 a^{2}}}{2 a}=\frac{1+a^{2} \pm \sqrt{1+a^{4}-2 a^{2}}}{2 a}
$$

For $a \geq 1$,

$$
f(a)=\frac{1+a^{2} \pm \sqrt{\left(a^{2}-1\right)^{2}}}{2 a}=\frac{1+a^{2} \pm\left(a^{2}-1\right)}{2 a}=a \quad \text { or } \quad \frac{1}{a}
$$

For $a<1$,

$$
f(a)=\frac{1+a^{2} \pm \sqrt{\left(1-a^{2}\right)^{2}}}{2 a}=\frac{1+a^{2} \pm\left(1-a^{2}\right)}{2 a}=a \quad \text { or } \quad \frac{1}{a}
$$

Thus, we have that $f(a)$ is either $a$ or $\frac{1}{a}$ for any $a$. Suppose there exist $a, b \neq 1$ such that

$$
f(a)=a \quad \text { and } \quad f(b)=\frac{1}{b}
$$

Substitute $w=a, x=b, y=1, z=a b$.

Case I: $f\left(a^{2} b^{2}\right)=a^{2} b^{2}$. Then

$$
\frac{f^{2}(a)+f^{2}(b)}{f\left(1^{2}\right)+f\left(a^{2} b^{2}\right)}=\frac{a^{2}+\frac{1}{b^{2}}}{1+a^{2} b^{2}}=\frac{a^{2}+b^{2}}{1+a^{2} b^{2}}
$$

which is not possible since $b \neq 1$ and positive, so $b^{2} \neq \frac{1}{b^{2}}$.

Case II: $f\left(a^{2} b^{2}\right)=\frac{1}{a^{2} b^{2}}$. Then

$$
\frac{f^{2}(a)+f^{2}(b)}{f\left(1^{2}\right)+f\left(a^{2} b^{2}\right)}=\frac{a^{2}+\frac{1}{b^{2}}}{1+\frac{1}{a^{2} b^{2}}}=\frac{a^{4} b^{2}+a^{2}}{a^{2} b^{2}+1}=\frac{a^{2}+b^{2}}{1+a^{2} b^{2}}
$$

which can only hold if $a^{4}=1$ (since $a$ is positive), but this is not true. Therefore, we have that either $f(a)=a$ for all $a \neq 1$, or $f(a)=\frac{1}{a}$ for all $a \neq 1$ (since $f(1)=1$, the two possible functions are $f(x)=x$ and $f(x)=\frac{1}{x}$). Now we will show that both functions satisfy the problem's conditions. If we consider $f(x)=x$, then

$$
\frac{f^{2}(w)+f^{2}(x)}{f\left(y^{2}\right)+f\left(z^{2}\right)}=\frac{w^{2}+x^{2}}{y^{2}+z^{2}}
$$

is trivially satisfied.

If $f(x)=\frac{1}{x}$, then

$$
\begin{aligned}
\frac{f^{2}(w)+f^{2}(x)}{f\left(y^{2}\right)+f\left(z^{2}\right)}=\frac{\frac{1}{w^{2}}+\frac{1}{x^{2}}}{\frac{1}{y^{2}}+\frac{1}{z^{2}}} & \left\lvert\, \cdot \frac{w^{2} x^{2}}{y^{2} z^{2}}\right. \\
\frac{x^{2} y^{2} z^{2}+w^{2} y^{2} z^{2}}{z^{2} x^{2} w^{2}+y^{2} x^{2} w^{2}}=\frac{\left(x^{2}+w^{2}\right) y^{2} z^{2}}{\left(y^{2}+z^{2}\right) x^{2} w^{2}}=\frac{x^{2}+w^{2}}{y^{2}+z^{2}} & \text { (since } w x=y z)
\end{aligned}
$$

Thus, only the functions $f(x)=x$ and $f(x)=\frac{1}{x}$ satisfy the problem's conditions, and they indeed satisfy them.