Geometric series of an operator In solving a first order linear differential equation $(1-D)y=x^2$ where $D\equiv \frac{d}{dx}$ the way I learnt was that we proceed as $y=\frac{1}{1-D}x^2=(1-D)^{-1}x^2=(1+D+D^2+D^3+\cdots)x^2=x^2+2x+2+0+0+\cdots=x^2+2x+2.$ 
Now the question that comes to mind is that what justifies our saying that $$(1-D)^{-1}=1+D+D^2+D^3+\cdots$$
When I asked my teacher about this he said that it is not the case that the inverse operator of $1-D$ is $1+D+D^2+D^3+\cdots$ (whose meaning is unclear anyway). What is true instead is that $$(1-D)(1+D+D^2+\cdots+D^m)x^m=x^m$$ and that we are actually using this fact. 
Although I understand this, but I am not entirely satisfied for two reasons. Firstly the resemblance with the expression for the geometric series must be there for a reason which I want to know. Secondly can an appropriate norm be given to an appropriate function space in which we can actually prove this geometric series to be true? (The answer to the second question also covers the first).
Thanks   
 A: I think your prof is right, and this has nothing to do with series and/or norms. The space of polynomials of degree less than a fixed number is finite-dimensional and in such space the operator $D$ is nilpotent and satisfies your prof's formula.
As another way to see that your trick works only for polynomials, note that the solution to your equation is $y=x^2+2x+2+ce^x$, with the last term missed by the trick (which simply doesn't work in the homogenous case).
A: If the functions are limited to polynomials, then if the degree of $f$ is $n$,
$$
\mathrm{D}^{n+1}f=0
$$
Thus,
$$
\left(\mathrm{I}+\mathrm{D}+\mathrm{D}^2+\dots\right)f
$$
converges (it is actually a finite sum). In this way, $\mathrm{I}-\mathrm{D}$ is invertible on the set of polynomials.

Formally, this is one way to look at the Euler-Maclaurin Sum Formula. Notice that on polynomials, using Taylor's formula, $e^{\lambda\mathrm{D}}$ is the shift operator:
$$
\begin{align}
f(x+\lambda)
&=f(x)+\lambda\mathrm{D}f(x)+\frac1{2!}\left(\lambda\mathrm{D}\right)^2f(x)+\frac1{3!}\left(\lambda\mathrm{D}\right)^3f(x)+\dots\\
&=e^{\lambda\mathrm{D}}f(x)
\end{align}
$$
Thus,
$$
f(x)-f(x-1)=\left(1-e^{-\mathrm{D}}\right)f(x)
$$
The idea of the Euler-Maclaurin Sum Formula is to invert $1-e^{-\mathrm{D}}$. Since the power series for $1-e^{-x}$ has no constant term, we need to use $\frac{x}{1-e^{-x}}\frac1x$. That is, formally, the Euler-Maclaurin Sum Formula is
$$
\frac{\mathrm{D}}{1-e^{-\mathrm{D}}}\int f(x)\,\mathrm{d}x
$$
and this is exact on polynomials (other functions have a remainder term that can be computed in a fashion similar to the remainder term for the Taylor series).
