Let $A$ be a linear operator defined on $L^2([0, \pi])$ by $$(Au)(x)=\int^\pi _0 2u(y) cos \bigg (\frac{x-y}{2} \bigg) dy$$ Where $0 \leq x \leq \pi$
I am trying to show that $(Au)(x)=v_1(x) \langle u , v_1 \rangle+ v_2 (x) \langle u, v_2 \rangle$
where $$v_1 (x)= \sqrt{2}cos\big(\frac{x}{2} \big)$$, $$v_2(x)=\sqrt{2} sin\big(\frac{x}{2}\big)$$
$$\langle v_1 , v_1 \rangle= \langle v_2, v_2 rangle = \pi$$ $$\langle v_1 , v_2 \rangle=2$$
The solution only says $$(Au)(x)=\int^\pi _0 2u(y) cos \bigg (\frac{x}{2} \bigg)cos \bigg (\frac{y}{2} \bigg)+sin \bigg (\frac{x}{2} \bigg)sin \bigg (\frac{y}{2} \bigg) dy$$
Where does this come from?
How does this prove the question?
What is $u$?