# Find basis orthogonal complement

Consider the inner product :

$$(f,g) = \int_{-1}^{1} f(x)g(x) dx$$

Let $V= \Bbb R^3(t)$ which is the real vector space of polynomials of degree less or equal to 3.

Now consider $W=span(1,1+t)$. I'm asked to find a basis of W complement.

I know that $dim(W\text{ complement})=2$ but that's pretty much all I came up with trying to solve this question.

When I'm trying to determine what is W complement I end up with a single element which is the function $f(x)=0$. What is obviously wrong considering W complement is of dimension 2.

Could anyone give me a little help? Thanks.

Construct from the polynomial $t^2$ an orthogonal polynomial to $W$:
The projection of $t^2$ on $W$ is: $$P_W(t^2)=\langle 1,t^2\rangle \frac 1{||1||^2}+\langle 1+t,t^2\rangle \frac {(1+t)}{||1+t||^2}$$ then $$t^2-P_W(t^2)$$ is orthogonal to $W$. Do the same thing for the polynomial $t^3$.