Show that $D$ is surjective, but not injective. Question:
Let $P$ denote the set of polynomials
$p(x) = \sum_{i=0}^n a_{i}x^i$
for $n=0, 1, 2, ....$ and real numbers $a_{i}$. Let $D:P \to P$ be the differential operator defined by
$(Dp)(x) = \sum_{i=1}^n ia_{i}x^{i-1}$
and let $I:P \to P$ be the integration operator 
$(Ip)(x) = \sum_{i=0}^n \frac{a_{i}}{i+1}x^{i+1}$
Show that $D$ is surjective, but not injective.
Attempted solution:
$D$ is surjective if $\forall$ $q$ $\in$ $P$ there exists at least one $p$ $\in$ $P$ such that $D(p) = q$. To show this I choose an arbitrary $q$ in the codomain and find a corresponding $p$ in the domain such that $D(p) = q$. Since the domain consists of the set of polynomials $p(x)$ and $p$ is a polynomial in the domain, I express $p'(x) = q$ and integrate on both sides yielding
$p(x) = \int  (\sum_{i=1}^n ia_{i}x^{i-1}) dx = \sum_{i=0}^n a_{i}x^i $
But I'm quite unsure what I have achieved at this point, or if what I've done is correct. Any help will be appreciated. .....
 A: In order to show that $D$ is surjective, you want to see that, for each polynomial $p$, there exists a polynomial $q$ such that $Dq=p$ or, in functional notation, $q'(x)=p(x)$.
What you've done is proving that $p$ is an antiderivative of $p'$, which is obvious. But your idea is good: let
$$
q(x)=\int_0^x p(t)\,dt=\sum_{i=0}^n \frac{a_i}{i+1}x^{i+1}=(Ip)(x)
$$
The fundamental theorem of calculus tells you that $q'=p$. In other words, $DI$ is the identity, so $D$ is surjective.
As regards to injectivity, what's the derivative of a constant polynomial?
A: Your wording at the beginning is off. You say

$D$ is surjective if $\forall p\in P$ there exists at least one $q$ such that $D(p)=q$.

It should say

$D$ is surjective if $\forall q\in P$ there exists at least one $p$ such that $D(p)=q$.

What you then acchieved was, well, not much.
Then, you took an arbitrary $q$. Now, you need to find some polynomial $p$ such that $p' = q$. To do that, write down
$$q=\sum_{i=0}^n a_i x^i$$
Now, try to find combination of $b_0, b_1,\dots, b_m$ such that 
$$p=\sum_{i=0}^m b_i x^i$$
and $p' = q$. To do that, you can help yourself with the integration operator.
