Let $f(x)$ be a differentiable, continuous function on $[0,1]$, such that $$f(0)+f(1)=0, \quad \displaystyle\int_0^1 (f(x))^2\, \mathrm{d}x=\dfrac{1}{2}, \quad \displaystyle\int_0^1 f'(x) \cdot \cos \pi x\, \mathrm{d}x=\dfrac{\pi}{2}.$$ Find the value of $\displaystyle\int_0^1 f(x)\, \mathrm{d}x$.
\begin{align*} \displaystyle\int_0^1 \left (f'(x)-\cos \pi x\right )^2 \, \mathrm{d}x&= \displaystyle\int_0^1 (f'(x))^2\, \mathrm{d}x - 2 \displaystyle\int_0^1 f'(x) \cdot \cos \pi x\, \mathrm{d}x + \displaystyle\int_0^1 \cos^2 \pi x \, \mathrm{d}x\\ & = \displaystyle\int_0^1 (f'(x))^2\, \mathrm{d}x - 2\cdot \dfrac{\pi}{2} +\dfrac{1}{2}\\ &= \displaystyle\int_0^1 (f'(x))^2\, \mathrm{d}x - \pi +\dfrac{1}{2}. \end{align*} Another way $$\displaystyle\int_0^1 \left (f'(x)-\cos \pi x\right )\, \mathrm{d}x = \displaystyle\int_0^1 f'(x) \, \mathrm{d}x - \displaystyle\int_0^1 \cos \pi x \, \mathrm{d}x = f(1)-f(0).$$
From here, I don't know how to use the condintions $$f(0)+f(1)=0, \quad \displaystyle\int_0^1 (f(x))^2\, \mathrm{d}x=\dfrac{1}{2}. $$ How can I find $\displaystyle\int_0^1 f(x)\, \mathrm{d}x$?
Integrating by parts the third condition we see that
$$\int_0^1f(x)\sin(\pi x)\,dx=\frac12.$$
Hence
$$\int_0^1(f(x)-\sin(\pi x))^2\,dx=[\text{fill the details}]=0.$$
What can you conclude?