

def _find_splitting_points(expr, x):
    '\n    Find numbers a such that a linear substitution x -> x + a would\n    (hopefully) simplify expr.\n\n    >>> from sympy.integrals.meijerint import _find_splitting_points as fsp\n    >>> from sympy import sin\n    >>> from sympy.abc import a, x\n    >>> fsp(x, x)\n    set([0])\n    >>> fsp((x-1)**3, x)\n    set([1])\n    >>> fsp(sin(x+3)*x, x)\n    set([-3, 0])\n    '
    (p, q) = [Wild(n, exclude=[x]) for n in 'pq']

    def compute_innermost(expr, res):
        if (not isinstance(expr, Expr)):
            return
        m = expr.match(((p * x) + q))
        if (m and (m[p] != 0)):
            res.add(((- m[q]) / m[p]))
            return
        if expr.is_Atom:
            return
        for arg in expr.args:
            compute_innermost(arg, res)
    innermost = set()
    compute_innermost(expr, innermost)
    return innermost

dataset/ETHPy150Open sympy/sympy/sympy/integrals/meijerint.py _find_splitting_points/original