Putnam 2016, Problem A-3

Suppose that \( f \) is a function from \( \mathbb{R} \) to \( \mathbb{R} \) such that
\[
f(x) + f\left(1 - \frac{1}{x}\right) = \arctan x
\]
for all real \( x \neq 0 \). (As usual, \( y = \arctan x \) means \( -\pi/2 < y < \pi/2 \) and \( \tan y = x \).) Find
\[
\int_0^1 f(x) \, dx.
\]

Solution:
The given functional equation, along with the same equation but with $x$ replaced by $\frac{x-1}{x}$ and $\frac{1}{1-x}$ respectively, yields:

$$f(x) + f\left(1-\frac{1}{x}\right) = \tan^{-1}(x)$$
$$f\left(\frac{x-1}{x}\right) + f\left(\frac{1}{1-x}\right) = \tan^{-1}\left(\frac{x-1}{x}\right)$$
$$f\left(\frac{1}{1-x}\right) + f(x) = \tan^{-1}\left(\frac{1}{1-x}\right).$$

Adding the first and third equations and subtracting the second gives:

$$2f(x) = \tan^{-1}(x) + \tan^{-1}\left(\frac{1}{1-x}\right) - \tan^{-1}\left(\frac{x-1}{x}\right).$$

Now $\tan^{-1}(t) + \tan^{-1}(1/t)$ is equal to $\pi/2$ if $t > 0$ and $-\pi/2$ if $t < 0$; it follows that for $x \in (0,1)$,

$$2(f(x) + f(1-x)) = (\tan^{-1}(x) + \tan^{-1}(1/x)) + \left(\tan^{-1}(1-x) + \tan^{-1}\left(\frac{1}{1-x}\right)\right) - \left(\tan^{-1}\left(\frac{x-1}{x}\right) + \tan^{-1}\left(\frac{x}{x-1}\right)\right) = \frac{\pi}{2} + \frac{\pi}{2} + \frac{\pi}{2} = \frac{3\pi}{2}.$$

Thus

$$4\int_0^1 f(x)dx = 2\int_0^1 (f(x) + f(1-x))dx = \frac{3\pi}{2}$$

and finally $\int_0^1 f(x)dx = \frac{3\pi}{8}$.

**Remark:** Once one has the formula for $f(x)$, one can also (with some effort) directly evaluate the integral of each summand over $[0,1]$ to obtain the same result. A much cleaner variant of this approach (suggested on AoPS, user henrikjb) is to write

$$\tan^{-1}(x) = \int_0^x \frac{1}{1+y^2}dy$$

and do a change of variable on the resulting double integral.