The problem: Find a polynomial $q \in P_2(\mathbb{R})$ such that
$$ p(1/2)= \int_0^1 p(x)q(x) \, dx $$
for every $p \in P_2(\mathbb{R})$.
So far, I established that the inner product on $P_2(\mathbb{R})$ is
$$\left< p, q \right> = \int_0^1 p(x)q(x) \, dx $$
and that
$$p(1/2) = \varphi(p) = \left< p,q \right> = \int_0^1 p(x)q(x) \, dx $$
and that
$$ e_1 = 1, \\ e_2 = \sqrt(3)(2x-1),\\ e_3 = \sqrt(5)(6x^2-6x+1) $$
and finally that
$$ q= \varphi(e_1)e_1 + ... + \varphi(e_n)e_n.$$
The final answer is given as $q= -3/2 + 15x - 15x^2$.
My situation is that I do not understand how the inner product $\left< p, q \right>$, the orthonormal basis $(e_1,e_2,e_3)$ and the formula for $q$ relate to give me the final answer.
Thank you.