# Find all functions for $x+f(\frac1x) = 2f(x)$

This is a very interesting word problem that I came across in an old textbook of mine. So I know its got something to do with induction, which yields the shortest, simplest proofs, but other than that, the textbook gave no hints really and I'm really not sure about how to approach it. Any guidance hints or help would be truly greatly appreciated. Thanks in advance :) So anyway, here the problem goes:

Find all functions $f:\mathbb{R}\setminus\{0\}\rightarrow \mathbb{R}$ such that, for all $x\in \mathbb{R}\setminus\{0\}$,

$$x+f\left(\frac1x\right) = 2f(x).$$

• Hint: substitute $1/x$ for $x$ and solve a system of two equations. – Robert Israel Aug 13 '17 at 20:47
• Note: this has nothing to do with number theory, induction, nor integers. – lulu Aug 13 '17 at 20:47
• @lulu Actually, the OP did mention induction, however, any induction proof here would probably assume continuity (not given) and if not, then it'd probably only prove the solution holds for $x\in\mathbb Q\setminus\{0\}$. – Simply Beautiful Art Aug 13 '17 at 21:08
• Induction won't work as $\mathbb R$ is uncountable. But if $x + f(1/x) = 2f(x)$ then $\frac 1x + f(x) = 2f(\frac 1x)$. Hence $\frac 1x + f(x)= 2(2(f(x)- x)$ ought to be solvable. Indeed $\frac 1x = 3f(x) - 2x$ so $f(x)= \frac {\frac 1x + 2x}3$. – fleablood Aug 13 '17 at 21:18

Using Robert's comment,

If we put $y=\frac {1}{x}$ then

$$2f (x)-f (y)=x$$ $$2f (y )-f (x)=y$$

hence $$3f (x )=2x+y$$ and $$f (x)=\frac {1}{3}\left(2x+\frac {1}{x}\right)$$

You are given the equation $$x+f\left(\frac1x\right) = 2f(x)$$

Following Robert Israel's hint, replace $\frac{1}{x}$ for $x$ and get $$\frac{1}{x}+f(x) = 2f\left(\frac{1}{x}\right)$$

Combine the two equations to get $$f(x) = \frac{2}{3}x+\frac{1}{3x}$$

Succumbing to my inclination to generalize, I'll look at $x+af\left(\frac1x\right) = bf(x)$.

Then $f(\frac1{x}) =\frac{b}{a}f(x)-\frac{x}{a}$.

Putting $\frac1{x}$ for $x$, this becomes $\frac1{x}+af(x) = bf(\frac1{x})$ or

$\begin{array}\\ f(x) &=\frac{b}{a}f(\frac1{x})-\frac{1}{ax}\\ &=\frac{b}{a}(\frac{b}{a}f(x)-\frac{x}{a})-\frac{1}{ax}\\ &=\frac{b^2}{a^2}f(x)-\frac{bx}{a^2}-\frac{1}{ax}\\ \text{or}\\ f(x)\frac{a^2-b^2}{a^2} &=-\frac{bx}{a^2}-\frac{1}{ax}\\ \text{or}\\ f(x)(b^2-a^2) &=bx+\frac{a}{x}\\ \text{or}\\ f(x) &=\frac1{(b^2-a^2)}(bx+\frac{a}{x})\\ \end{array}$

For $a=1, b=2$, this gives $f(x) =\frac1{3}(2x+\frac{1}{x})$.

Note that there is no solution if $a=b$. This is because we get $f(x) =f(\frac1{x})+\frac{x}{a} =f(x)+\frac{1}{xa}+\frac{x}{a}$.

This method can also solve the apparently more general $g(x)+af\left(\frac1x\right) = bf(x)$. The result will depend on $g(x)$ and $g(\frac1{x})$.