DiracDelta (x**2+x-2).simplify (x)

solve(DiracDelta(x - 1)/3 + DiracDelta(x + 2)/3, x)

diff(DiracDelta(x - 1)/3 + DiracDelta(x + 2)/3, x)

series(DiracDelta(x - 1)/3 + DiracDelta(x + 2)/3, x, 0, 10)

Want a full Python shell? Use SymPy Live.