# Finding orthogonal complement

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)$?

• Better: $\;U^\perp\;$ is the space of all elements in the linear space that are perpendicular to both $\;1-x\,,\,\,1+x\;$ . No need to take $\;p(x)\;$ and use and all that. May 12, 2017 at 8:53
• @DonAntonio How does that help the calculation? May 12, 2017 at 8:59
• @Cu In my opinion, a lot: it makes things much simpler and you only have to check to specific conditions $\;p(x)\perp 1-x\;$ , and also $\;p(x)\perp 1+x\;$ , instead of using a general linear combination of the above two. Much simpler and quick, imo. May 12, 2017 at 10:17

Hint: $$\int_{-1}^{1}x^n\,dx =\begin{cases} \frac{2}{n+1} & n \text{ even}\\ 0 & n \text{ odd} \end{cases}$$

Then compute for $q(x) = ax^2+bx+c$ the integrals $\int_{-1}^{+1}(1-x)q(x)\, dx$ and $\int_{-1}^{+1}(1+x)q(x)\, dx$, i.e.

$$\int_{-1}^{+1}(1-x)q(x)\, dx = \int_{-1}^{1}q(x)\, dx - \int_{-1}^{1}xq(x)\, dx = \frac{2}{3}a+2c - \frac{2}{3}b = 0$$ $$\int_{-1}^{+1}(1+x)q(x)\, dx = \int_{-1}^{1}q(x)\, dx + \int_{-1}^{1}xq(x)\, dx = \frac{2}{3}a+2c + \frac{2}{3}b = 0.$$

From here it should follow which $q(x)$ are in $U^{\bot}$.

• I see. Now that you mention it, would it be that bad to just directly plug in $q(x)=dx^2+ex+f$ where $d, e, f \in \mathbb R$ to the equation $\int_{-1}^1(a-ax+b+bx)q(x)dx=0$ and determine the conditions on those coefficients? May 12, 2017 at 9:38
• As already mentioned it is easier to do it on $(1-x)$ and $(1+x)$
– JJR
May 12, 2017 at 10:46
• As a minor note, I got $+2c$ in both equations. May 12, 2017 at 12:29
• @CuriousKid7 thx I shall edit it
– JJR
May 12, 2017 at 12:49