Let $U$ be the subspace of polynomials $P$ defined as follows $$U=\left\{p(x)\in P ~ \text{so that } \int _0^1 p\left(x\right)dx=\int _0^1xp\left(x\right)dx=0\right\}.$$ Is the following statement true or false? $$P=P_1⊕U.$$ Where $P_1$ is the set of all polynomials with degree at most $1$.
Since $P$ has an infinite dimension and $P_1$ has dimension of $2$, the only way that this statement could potentially be true would have been if $U$ also had an infinite dimension. After doing a general integration of an infinitely long polynomial with coefficients $a$, $b$, $c$, and so on, along with decreasing powers of $x$ starting from $n$, I got that for both integrals to equal $0$, all coefficients would have to be $0$. This led me to think the dimension of $U$ was $0$.
And since infinity does not equal $2+0$, I thought that this statement was false.
This is my work:
So I let $p\left(x\right)=ax^n+bx^{n-1}+\dots+kx^0$
Therefore, $$\int _0^1\:ax^n+bx^{n-1}+\dots+kx^0=\int _0^1\:x\left(ax^n+bx^{n-1}+\dots+kx^0\right)=0$$ This led to: $$\frac{ax^{n+1}}{n+1}+\frac{bx^n}{n}+\dots+kx=\frac{ax^{n+2}}{n+2}+\frac{bx^{n+1}}{n+1}+\dots+\frac{kx^2}{2}=0$$ Which led to: $$\frac{a\left(1\right)^{n+1}}{1+1}+\frac{b\left(1\right)^n}{n}+\dots+k=\frac{a\left(1\right)^{n+2}}{n+2}+\frac{b\left(1\right)^{n+1}}{n+1}+\dots+\frac{k\left(1\right)^2}{2}=0$$
This led to believe that all coefficients had to be $0$ as that's the only way to get $0$ as the answer. But I am not sure whether I have done the integration correctly.
Any help?
Yes, it is true. Any polynomial $p$ can be written in a unique way as the sum of a polynomial of degree at most one and a polynomial in $U$.
Let $p\in P$ with $\int _0^1p(x)dx=A$ and $\int _0^1xp(x)dx=B$. Then there is $q\in P_1$ such that $p-q\in U$ iff $$\begin{cases}\int _0^1(p(x)-ax-b)dx=0\\ \int _0^1x(p(x)-ax-b)dx=0\end{cases}$$ where $q(x)=a+bx$. After integrating, we obtain $$\begin{cases}\frac{a}{2}+b=A\\ \frac{a}{3}+\frac{b}{2}=B\end{cases}$$ Given $A$ and $B$, this linear system has a unique solution: $$(a,b)=(-6A+12B,4A-6B).$$ P.S. $U$ is an infinite-dimensional vector space: we can easily verify that for all $n\geq 2$ $$q_n(x)=x^n-\frac{6nx-2(n-1)}{(n+1)(n+2)}\in U.$$ In fact $$\int_0^1 q_n(x)dx=\frac{1}{n+1}-\frac{3n-2(n-1)}{(n+1)(n+2)}=0$$ and $$\int_0^1 xq_n(x)dx=\frac{1}{n+2}-\frac{2n-(n-1)}{(n+1)(n+2)}=0.$$