# Is there any other solution for $f(x)=\int_0^\pi t f(t)\,\mathrm{d}t+\cos x$?

Is there any other solution for $$f(x)=\int_0^\pi t f(t)\,\mathrm{d}t+\cos x$$? I found one solution as follows but I have no clue how to prove that this solution is unique.

Let $$\int_0^\pi t f(t)=\lambda$$, we have

\begin{align} \lambda &=\int_0^\pi t f(t) \,\mathrm{d}t\\ &=\int_0^\pi t (\lambda+\cos t)\,\mathrm{d}t\\ &= \frac{4}{\pi^2-2} \end{align}

Thus $$f(x)=\frac{4}{\pi^2-2}+\cos x$$.

# Question

Is there any other solution? How to prove the uniqueness of this solution?

Assume that you have $$f,g$$ such that $$\cos(x)=f(x)-\int_0^\pi tf(t)dt=g(x)-\int_0^\pi tg(t)dt.$$ It then follows that $$0=f(x)-g(x)-\int_0^\pi tf(t)dt+\int_0^\pi tg(t)dt=f(x)-g(x)-\int_0^\pi t(f(t)-g(t))dt.$$ So you get $$f(x)-g(x)=\int_0^\pi t(f(t)-g(t))dt=C$$ a constant. So write $$f(x)=g(x)+C$$ and calculate $$C=\int_0^\pi t(f(t)-g(t))dt=\int_0^\pi t(g(t)+C-g(t))dt\\ =\int_0^\pi t(g(t)-g(t))dt+\int_0^\pi tCdt=C\int_0^\pi tdt =C\frac{\pi^2}{2}.$$
The only value of $$C$$ such that this equation can hold is $$C=0$$. Consequently, solutions are unique.
Suppose $$g$$ is another solution, so $$g(x)=\int_0^\pi tg(t)\,dt+\cos x$$ Then $$f'(x)=g'(x)$$ and therefore $$g(x)=k+f(x)$$. Hence $$g(x)=\int_0^\pi t(k+f(t))\,dt+\cos x= \int_0^\pi kt\,dt+f(x)=\frac{k\pi^2}{2}+f(x)$$ Hence $$k\pi^2/2=k$$, so $$k=0$$.
The problem can be write in this way: $$f'(x)=-sin(x) ;\hspace{0.1cm} f(\pi /2)=\lambda$$ because $$f$$ is continous and lipschitz=> Picard–Lindelöf theorem can by applied=>solution exist and is unique.The proof for Picard–Lindelöf is long you can find a proof on wikipedia.