I have found the solution $f(x) = x + \frac{\pi^2}{24}\cos(x)$, but I need to prove that it is the only one.
I have tried assuming that there are two solutions $f(x)$ and $g(x)$, and then subtracting them and trying to find a limit that goes to $0$, but I've been unsuccesful.
\begin{equation} |f(x)-g(x)| = \frac{1}{4}|\cos(x)\int_{0}^{\frac{\pi}{2}}f(y)-g(y)dy| \end{equation} How do I continue from here?
Edit: I'm searching in $L^2((0, \pi/2))$
Let $f \in L^2$ be a solution to this equation and define : $$a = \frac{1}{4}\int_0^{\pi/2} f(x)\text dx$$
The equation is equivalent to $f(x) = x+a\cos(x)$. Using this, we can compute : $$a = \frac 14 \int_0^{\pi/2} (x+a\cos(x))\text dx =\frac{1}{4}\left( \frac{\pi^2}{8} + a\right)$$
which in turns implies $a = \frac{\pi^2}{24}$.
We have proved that any solution $f$ satisfies $f(x) = x + \frac{\pi^2}{24}\cos(x)$, ie the solution is unique.