Dirac delta of x Just so there are no misunderstandings let me first ask whether it is true that:
$$
\int_{-\infty}^{\infty}x\delta(x)\mathrm{d}x=0.
$$
If that is not true, then I don't know anything about the Dirac delta distribution and I will be off to correct this :)
Otherwise I have this question: Why can we take a delta functional of $x$? As far as I've read, the Dirac delta is a tempered distribution and it must act on Schwartz functions. I am not convinced that this is true for $f(x)=x$.

The Dirac delta $\delta$ distribution can be paired with a Schwarz function, but we can make sense of pairing it with more general objects too. For example, for a continuous function $f$, $$\int f(x) \delta(x) \,dx = f(0),$$ which in particular confirms your computation.
