How to find $f(x)$, if $f(x)+f(1/x)=f(x)f(1/x)$? [duplicate]

Given: $\displaystyle f(x)+f\left(\frac{1}{x}\right) = f(x)\cdot f\left(\frac{1}{x}\right)\tag 1$

Now we can write $(1)$ as $$\displaystyle f(x) = \frac{f\left(\frac{1}{x}\right)}{f\left(\frac{1}{x}\right)-1}\tag 2$$

Now again we can write $(1)$ as $$\displaystyle f\left(\frac{1}{x}\right) = \frac{f(x)}{f(x)-1}\tag 3$$

Now multiplying these two equations, we get $\displaystyle \left[f(x)-1\right]\cdot \left[f\left(\frac{1}{x}\right)-1\right]=1$

Let $f(x)-1 = g(x)$. Then, $$f\left(\frac{1}{x}\right)-1 = g\left(\frac{1}{x}\right)$$

So the equation gets converted into: $$\displaystyle g(x)\cdot g\left(\frac{1}{x}\right) =1$$

Now if $g(x)$ is a polynomial, then $g(x) = \pm x^n$. So $f(x) = 1\pm x^n$.

We are given that $f(4) = 65$. So, $$f(x)=1+x^n$$ On putting $x=4$, we get $n=3$.

Thus, we get, $$f(x)=1+x^3$$


As other answers show, there is a large class of solutions to your functional equation if one does not restrict $f$ more. As per your request, we shall try the restriction that $f$ should be a polynomal.

Two polynomial solutions jump into our eyes, namely the zero polynomial $f(x)=0$ and $f(x)=2$. Neither of these has $f(4)=65$, though.

If $f$ is a polynomial of degree $n>0$, say $$f(x)=a_0+a_1x+\ldots +a_nx^n$$ with $a_n\ne 0$, then $\hat f(x) = x^nf(1/x)$ is also a polynomial, namely $$ \hat f(x)=x^nf(1/x)=a_n+a_{n-1}x+\ldots+a_0x^n.$$ Observe that $a_0$ could be $0$, so possibly $\deg\hat f<n$. The functional equation becomes after multiplication with $x^n$ $$ f(x)\hat f(x)=x^nf(x)+\hat f(x)$$ or $$\tag1 f(x)\cdot(\hat f(x)-x^n)=\hat f(x).$$ But if we multiply the degree $n$ polynomial $f(x)$ with the polynomial $\hat f(x)-x^n$ and obtain the polynomial $\hat f(x)$ that has degree $\le n$, we conclude that $\hat f(x)-x^n$ must be a constant. This implies that $a_0=1$ and $a_1=\ldots=a_{n-1}=0$, so $f(x)=a_nx^n+1$ and $(1)$ simplifies to $$ (a_nx^n+1)\cdot a_n = x^n+a_n$$ This allows only $a_n=\pm1$. To meet the constraint $f(4)=65$, we need $\pm 4^n=65-1$, so the positive sign and exponent $3$. We finally conclude that $${f(x)=x^3+1}. $$


I just observed that a non polynomial solution $$\frac{\pi}{2\tan^{-1}(x)}$$ also exists . How can we find other non polynomial solutions ?


Note that plugging in $x=1$, we obtain $$f(1)^2 = 2f(1) \implies f(1) = 0 \text{ or }2$$ Similarly, plugging in $x=-1$, we obtain $$f(-1) = 0 \text{ or }2$$ We have $$f(1/x)(f(x) - 1) = f(x) \implies f(1/x) = \dfrac{f(x)}{f(x)-1}$$ Hence, for $\vert x \vert > 1$ define $f(x) = g(x)$ such that $g(x) \neq 1$ for all $\vert x \vert >1$. Then define $$f(1/x) = \dfrac{g(x)}{g(x)-1}$$ Hence, there exists a wide class of possible functions given by $$f(x) = \begin{cases} 0 \text{ or }2& x = \pm1\\ g(x) & \vert x \vert > 1 \text{ such that }g(x) \neq 1\\ \dfrac{g(1/x)}{g(1/x)-1} & \vert x \vert < 1 \text{ and }x \neq 0 \end{cases}$$


Assuming that $f$ is nonzero, we can rewrite this equation as: $$\frac{1}{f(x)} + \frac{1}{f(1/x)} = 1$$

Making the substitution $g(y) = -\frac{1}{2} + \frac{1}{f(e^y)}$, we get the functional equation $g(y) + g(-y) = 0$, which simply says that $g$ is odd.

This equation can be solved, with the initial condition, by setting $g(y) = cy$ for a suitable constant $c$.