# 2008 IMO Problems/Problem 4

## Problem

Find all functions $f: (0, \infty) \mapsto (0, \infty)$ (so $f$ is a function from the positive real numbers) such that

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

for all positive real numbers $w,x,y,z,$ satisfying $wx = yz.$

## Solution

Considering $w=1$ and $z=y=\sqrt{x}$ which satisfy the constraint $wx=yz$ we get the following equation:

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

At once considering $x=1$ we get $(f(1))^2 = f(1)$ and knowing that $f : \mathbb{R}^+ \rightarrow \mathbb{R}^+$ the only possible solution is $f(1)=1$ since $f(1)=0$ is impossible.

So we get the quadratic equation:

$$x(f(x))^2 - (1+x^2)f(x) + x = 0$$

Solving for $f(x)$ as a function of $x$ we get:

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

At once we see that for one value of $x$, $f(x)$ can only take one of 2 possible values:

$$f(x) = x \vee f(x) = \frac{1}{x}$$.

Take into consideration that $f(2) = 2$ but $f(3) = \frac{1}{3}$ verifies the quadratic equation and thus so far we can't say that $f(x)=x \, \forall_{x \in \mathbb{R}^+}$ or alternatively $f(x)=\frac{1}{x} \, \forall_{x \in \mathbb{R}^+}$. This is indeed the case but we haven't proved it yet.

To prove the previous assertion consider 2 values $a,b \in \mathbb{R}^+$ such that $a\ne 1 \wedge b \ne 1 \wedge a \ne b$ while having $f(a) = a \wedge f(b)=\frac{1}{b}$

Consider now the original functional equation with $w=a,\ x=b,\ y=z=\sqrt{ab}$ which verifies the constraint. Substituting we have:

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

Now either $f(ab)=ab$ or $f(ab)=\frac{1}{ab}$. (notice that $ab \ne b \wedge ab\ne b$ by hypothesis)

If $f(ab)=ab$ then we have $ab = ab\frac{a^2 + \frac{1}{b^2}}{a^2 + b^2} \Leftrightarrow b^4=1$ and since $b>0$ the only solution is $b=1$.

If $f(ab)=\frac{1}{ab}$ then we have $\frac{1}{ab} = ab\frac{a^2 + \frac{1}{b^2}}{a^2 + b^2} \Leftrightarrow a^2+b^2 = a^4b^2 +a^2 \Leftrightarrow a^4=1$ and since $a>0$ the only solution is $a=1$.

So the only solutions are $a=1$ or $b=1$ in which case both alternatives imply $f(1)=1$. Thus we conclude that solutions to the functional equation are a subset of $\left\{f(x)=x \ \forall_{x \in \mathbb{R}^+},\ f(x)=\frac{1}{x}\ \forall_{x \in \mathbb{R}^+} \right\}$.

Finally, plug each of these 2 functions into the functional equation and verify that they indeed are solutions.

This is trivial since $f(x)=x$ is an obvious solution and for $f(x)=\frac{1}{x}$ we have:

$$\frac{ \frac{1}{w^2} + \frac{1}{x^2} }{ \frac{1}{y^2} + \frac{1}{z^2}} = \frac{ \frac{w^2+x^2}{(wx)^2} }{ \frac{y^2+z^2}{(yz)^2} } = \frac{w^2+x^2}{y^2+z^2}$$ provided that $(wx)^2 = (yz)^2$ which verifies the original constraint.

So the functional equation has 2 solutions:

$$f(x) = x\ \forall_{x \in \mathbb{R}^+}\ \vee\ f(x)=\frac{1}{x}\ \forall_{x \in \mathbb{R}^+}$$