hat is ``0`` everywhere except at ``0``,
    but in many ways it also does not. It can often be useful to treat DiracDelta
    in formal ways, building up and manipulating expressions with delta functions
    (which may eventually be integrated), but care must be taken to not treat it
    as a real function.
    SymPy's ``oo`` is similar. It only truly makes sense formally in certain contexts
    (such as integration limits), but SymPy allows its use everywhere, and it tries to be
    consistent with operations on it (like ``1/oo``), but it is easy to get into trouble
    and get wrong results if ``oo`` is treated too much like a number.
    Similarly, if DiracDelta is treated too much like a function, it is easy to get wrong
    or nonsensical results.

    DiracDelta function has the following properties:

    1) ``diff(Heaviside(x),x) = DiracDelta(x)``
    2) ``integrate(DiracDelta(x-a)*f(x),(x,-oo,oo)) = f(a)`` and
       ``integrate(DiracDelta(x-a)*f(x),(x,a-e,a+e)) = f(a)``
    3) ``DiracDelta(x) = 0`` for all ``x != 0``
    4) ``DiracDelta(g(x)) = Sum_i(DiracDelta(x-x_i)/abs(g'(x_i)))``
       Where ``x_i``-s are the roots of ``g``

    Derivatives of ``k``-th order of DiracDelta have the following property:

    5) ``DiracDelta(x,k) = 0``, for all ``x != 0``

    Examples
    ========

    >>> from sympy import DiracDelta, diff, pi, Piecewise
    >>> from sympy.abc import x, y

    >>> DiracDelta(x)
    DiracDelta(x)
    >>> DiracDelta(1)
    0
    >>> DiracDelta(-1)
    0
    >>> DiracDelta(pi)
    0
    >>> DiracDelta(x - 4).subs(x, 4)
    DiracDelta(0)
    >>> diff(DiracDelta(x))
    DiracDelta(x, 1)
    >>> diff(DiracDelta(x - 1),x,2)
    DiracDelta(x - 1, 2)
    >>> diff(DiracDelta(x**2 - 1),x,2)
    2*(2*x**2*DiracDelta(x**2 - 1, 2) + DiracDelta(x**2 - 1, 1))
    >>> DiracDelta(3*x).is_simple(x)
    True
    >>> DiracDelta(x**2).is_simple(x)
    False
    >>> DiracDelta((x**2 - 1)*y).expand(diracdelta=True, wrt=x)
    DiracDelta(x - 1)/(2*Abs(y)) + DiracDelta(x + 1)/(2*Abs(y))


    See Also
    ========

    Heaviside
    simplify, is_simple
    sympy.functions.special.tensor_functions.KroneckerDelta

    References
    ==========

    .. [1] http://mathworld.wolfram.com/DeltaFunction.html
    T