I was solving some problems with Dirac delta. I don't know if my method is correct. But some answers matched coincidently, so I was thinking if my method is correct so I am going to write a question which I solved then I will write which I couldn't.
$$\int_2^6 (3x^2 − 2x − 1) δ(x − 3) dx$$
In the question I was going to assume that $x-3=0$ so simply $x=3$. I was evaluating this way : $$3(3)^2-2\cdot 3-1=20$$ My answer matched with solution. I had done another problem which I could solved either but I was having some problems to evaluate following integrand.
$$\int_0^3 x^3\delta (x+1)dx$$ To evaluate it I wrote $x=-1$ So $(-1)^3=-1$ But while solution is saying that the answer is $0$. I wonder how it is true?