# Vector space of functions $\mathbb{R}\rightarrow\mathbb{R}$

Let $V$ be the vector space of functions $\mathbb{R}\rightarrow\mathbb{R}$ and $W$ the subspace generated by the functions $f_1=\cos(x),f_2=\sin(x),f_3=\sin(2x)$. For $k=1,2,3$ let $\phi_k\in W^*$ with $\phi_k(f)=f((k-1)\pi/4)$. Then $f_1,f_2,f_3$ form a basis for $W$ and $\phi_1,\phi_2,\phi_3$ form a basis for the dual $W^*$.

My question is: How do I show that there exist $a,b,c\in\mathbb{R}$ such that we get for every function $f\in W$ that $\int_0^{\pi}x^2f(x)dx=af(0)+bf(\pi/4)+cf(\pi/2)$?

If you know that $W^*$ is generated by $\phi_1,\phi_2,\phi_3$, then $L(f)=\int_0^\pi x^2f(x)dx$ is linear function on $W$, thus $L(f)=a\phi_1(f)+b\phi_2(f)+c\phi_3(f)=af(0)+bf(\pi/4)+cf(\pi/2)$
• How do you know that $L(f)=\int x^2f(x)dx$ is a linear function on W? – user242125 Oct 21 '15 at 18:30