I have to use dirac delta in a complicated integral and was hoping to see how it works with a simple case but it returns the wrong answer. Any clue what I did wrong in the following?
from sympy import DiracDelta
from scipy import integrate
def f(x):
return x*DiracDelta(x-1)
b, err = integrate.quad(f, 0, 5)
print b
This returns 0.0
while it shouldn't.