Let $f(x)$ be a function $f :\mathbb{R}\to \mathbb{R}$ such that $$ f(x) + f\left(1-\frac{1}{x}\right) = \tan^{-1}(x) $$ for all real $x$ except $0$.
Find $\int_0^1f(x)\ \mathrm dx$.
My approach till now:
Put $x = \frac{1}{x}$ in the functional equation and consider the domain of integration $(0,1)$ such that $\tan^{-1}\frac{1}{x} = \cot^{-1}(x)$ and add the original functional equation and the resulting equation after the substitution to get:
$$f(x) + f(1-x) = \frac{\pi}{2} - f\left(\frac{1}{x}\right) - f\left(1-\frac{1}{x}\right)$$ and integrate both sides from $0$ to $1$.
Let $I = \int_0^1f(x)\ \mathrm dx $, then LHS of above functional equation becomes $2I$. Now I am not able to evaluate the RHS, some $\frac{\ln(2)}{2}$ term always creeps up and doesn't gets cancelled and its not even in the answer.
Please help me with this problem.


To long for a comment. (I'm afraid if my calculation be a little wrong. I'm in a hurry situation, sorry)
By your notations, we have $$2I=\frac{\pi}{2}-\int_0^1f(\frac{1}{x})dx-\int_0^1f(1-\frac{1}{x})dx.$$ Take $\dfrac{1}{u}=1-\dfrac{1}{x}$, we have $x=\dfrac{u}{u-1}$, $dx=-\dfrac{du}{(u-1)^2}$ and $$\int_0^1f(1-\frac{1}{x})dx=-\int_0^\infty\frac{f(1/u)}{(u-1)^2}du$$ On the other hand, by letting $x=\dfrac{1}{u}$, we have $$\int_0^1f(\frac{1}{x})dx=\int_1^\infty\frac{f(u)}{u^2}du=\int_0^\infty \frac{f(u-1)}{(u-1)^2}du.$$