(self)
Since Integral doesn't autosimplify, it is useful to see if
        it would simplify to zero or not in a trivial manner, i.e. when
        the function is 0 or two limits of a definite integral are the same.

        This is a very naive and quick test, not intended to check for special
        patterns like Integral(sin(m*x)*cos(n*x), (x, 0, 2*pi)) == 0.

        Examples
        ========

        >>> from sympy import Integral
        >>> from sympy.abc import x, y, z
        >>> Integral(1, (x, 1, 1)).is_zero
        True
        >>> Integral(0, (x, y, z)).is_zero
        True
        >>> Integral(1, (x, 1, 2)).is_zero
        False

        See Also
        ========

        is_number
Since Integral doesn't autosimplify, it is useful to see if
        it would simplify to zero or not in a trivial manner, i.e. when
        the function is 0 or two limits of a definite integral are the same.
Since Integral doesn t autosimplify it is useful to see if it would simplify to zero or not in a trivial manner i . e . when the function is 0 or two limits of a definite integral are the same .
def is_zero(self):
        """Since Integral doesn't autosimplify, it is useful to see if
        it would simplify to zero or not in a trivial manner, i.e. when
        the function is 0 or two limits of a definite integral are the same.

        This is a very naive and quick test, not intended to check for special
        patterns like Integral(sin(m*x)*cos(n*x), (x, 0, 2*pi)) == 0.

        Examples
        ========

        >>> from sympy import Integral
        >>> from sympy.abc import x, y, z
        >>> Integral(1, (x, 1, 1)).is_zero
        True
        >>> Integral(0, (x, y, z)).is_zero
        True
        >>> Integral(1, (x, 1, 2)).is_zero
        False

        See Also
        ========

        is_number
        """
        if (self.function.is_zero or
                any(len(xab) == 3 and xab[1] == xab[2] for xab in self.limits)):
            return True
        free = self.function.free_symbols
        for xab in self.limits:
            if len(xab) == 1:
                free.add(xab[0])
                continue
            if len(xab) == 2 and xab[1].is_zero and xab[0] not in free:
                return True
            # take integration symbol out of free since it will be replaced
            # with the free symbols in the limits
            free.discard(xab[0])
            # add in the new symbols
            for i in xab[1:]:
                free.update(i.free_symbols)
        if not self.free_symbols and self.function.is_number:
            # the integrand is a number and the limits are numerical
            return False
def is_zero ( self ) : if ( self . function . is_zero or any ( len ( xab ) == 3 and xab [ 1 ] == xab [ 2 ] for xab in self . limits ) ) : return True free = self . function . free_symbols for xab in self . limits : if len ( xab ) == 1 : free . add ( xab [ 0 ] ) continue if len ( xab ) == 2 and xab [ 1 ] . is_zero and xab [ 0 ] not in free : return True # take integration symbol out of free since it will be replaced # with the free symbols in the limits free . discard ( xab [ 0 ] ) # add in the new symbols for i in xab [ 1 : ] : free . update ( i . free_symbols ) if not self . free_symbols and self . function . is_number : # the integrand is a number and the limits are numerical return False