Let $f:\mathbb{R \rightarrow R}$ satisfies $f(x)+f(y)= f \biggl(\frac{x+y}{1-xy}\biggl)$ and $f'(0)=5$. Then find $f(x)$ 

Let $f:\mathbb{R \rightarrow R}$ satisfies $f(x)+f(y)= f \biggl(\frac{x+y}{1-xy}\biggl)$ and $f'(0)=5$. Then find $f(x)$


Teacher's Method:
He differentiated the whole function with respect to $x$ as follow
$f^{\prime}(x)+f^{\prime}(y) \cdot \frac{dy}{dx}=f^{\prime}(\frac {x+y}{1-xy}) \cdot \biggl(\frac{\big(1-xy\big)\big(1+\frac{dy}{dx}\big)+\big(x+y\big)\big(x\frac{dy}{dx}+y\big)}{\big(1-xy\bigl)^2}\biggl)$
And he put $\frac{dy}{dx}=0$ stating that $x$ and $y$ are independent
and finally he obtained the result $f(x)=5\tan^{-1}(x)$
My Doubt:
why $x$ and $y$ are independent?
finally we are obtaining the result $y=5\tan^{-1}(x)$
$\;$then how can they be independent?
My second Doubt: why above method is not working for $f(x+y)=f(x)+f(y)$
I know what is the other method to solve this Question but my doubt is as mentioned above.
 A: $$f(x)+f(y)= f \biggl(\frac{x+y}{1-xy}\biggl)$$
Let $x=0=y$, then $2f(0)=f(0) \implies f(0)=0$. Next Let $y=-x$ \implies $f(-x)=-f(x)$
$$f'(x)=\lim_{h\to 0} \frac{f(x+h)-f(x)}{h}==\lim_{h\to 0} \frac{f(x+h)+f(-x)}{h}$$
$$\implies f'(x)=\lim_{h\to 0}f\left(\frac{h}{1-x^2-xh}\right)\frac{1}{h}\left(\frac{h}{1+x^2+xh}\right)^{-1}\left(\frac{h}{1+x^2+xh}\right)$$
$$\implies f'(x)=\left(\frac{1}{1+x^2}\right)\lim_{z\to 0}\frac{f(z)}{z}=\frac{f'(0)}{1+x^2}=\frac{5}{1+x^2}.$$
Integrating, we get $$f(x)=5\tan^{-1} x+C, f(0)=0 \implies f(x)=5 \tan^{-1} x$$
A: Substitute $x=\tan u , y= \tan v$ then we obtain $$f(\tan u) +f(\tan v) = f(\tan (u+v) ).$$
If we denote $$F(z) =f(\tan z)$$
and we obtain $$F(u) +F(v) =F(u+v).$$
So if we assume that $f$ is continous then we obtain $$F(x) = ax $$ for some $a.$
Hence
$$f(x) = a\arctan x$$
and since $f'(0) = 5$ thus $a=5.$
This proof does not need differentiability of $f.$
A: The given functional equation is to be read as : "for any two $x_1,x_2$ belonging to the domain of $f(x)$, the functional equation holds."
Instead of $x_1,x_2$, labels $x,y$ are used. These are independent variables. So $dy/dx=0$ or $dx_2/dx_1=0$ is true.
The last solution obtained is $f(x)=5tan^{-1}x$ which is unfortunately written as $y=f(x)=...$. Ofcourse the label $y$ for $f(x)$ is not the same as label $y$ for $x_1,x_2$ (or $x,y$). $y=f(x)$ is dependent variable.
A: I think what he did is take a partial derivative wrt x and then plug $x=0$,it becomes $$f'(x)=\left(\dfrac{1+y^2}{(1-xy)^2}\right)\cdot f'\left(\dfrac{x+y}{1-xy}\right)\implies f'(0)=\dfrac{f'(y)}{1+y^2}$$
which gives the solution $f(x)=5\arctan{x}+c$.PLugging back into the original assertion we get $c=0$ hence $f(x)=5\arctan(x)$
Actually this and what your sir did are just the same,basically we just put $y=$ something fixed and then differentiated wrt $x$ in crude terms.Thats why we can ignore the $\dfrac{dy}{dx}=0$.I hope I am making sense(This is what taking a partial derivative is)
