Consider the vector space $\mathcal P_2(\mathbb R)$ of polynomials over $\mathbb R$ with degree at most $2$ with the inner product $\langle p, q\rangle =\int_{-1}^1 p(x)q(x)dx$. And let $U=\text {span} \{1-x, 1+x\}$.
I want to find $U^{\perp}$.
If $p(x)\in U$, then $p(t)=a(1-x)+b(1+x)$ for some $a,b\in \mathbb R$.
So I want to find all $q(x)\in \mathcal P_2(\mathbb R)$ such that $\int_{-1}^1 (a-ax +b +bx)q(x)dx=0$.
But I'm stuck here. How does one calculate such $q(x)$ without knowing anything about it except that it's in $ \mathcal P_2(\mathbb R)$?