Came across a question that requires evaluation of $\int_{-3}^{+1} \left(x^{3}-3x^{2}+2x-1\right)\delta\left(x+2\right)dx$
Here's my attempt:
Recall that:
$\int_{-\infty}^{\infty} f\left(x\right)\delta\left(x-a\right)dx=f\left(a\right)\int_{-\infty}^{+\infty} \delta\left(x-a\right)dx=f\left(a\right)$
Note that a=-2 relative to the question.
Then,$$\int_{-2-1}^{-2+3} \left((-2)^{3}-3\left(-2\right)^{2}-2\left(-2\right)-1\right)\delta\left(x+2\right)dx= (-2)^{3}-3\left(-2\right)^{2}-2\left(-2\right)-1 $$
I'm still fairly uncomfortable dealing with dirac delta function due to my sparse exposure to them. My guess is that I'm doing this question wrongly and that the domain of integration requires shifting so that the domain of integration is symmetric about the point x=0. Any help is appreciated
In general, in a definite domain
$ \int_b^c f(x)\delta(x-a)dx = f(a)$ if $b < a < c$,
then $\int_{-3}^{1} (x^3 - 3x^2 + 2x -1) \delta(x+2) dx = (-2)^3 - 3(-2)^2 + 2(-2) - 1$ because $-3 < -2 < 1$.