

def meijerint_inversion(f, x, t):
    '\n    Compute the inverse laplace transform\n    :math:\\int_{c+i\\infty}^{c-i\\infty} f(x) e^{tx) dx,\n    for real c larger than the real part of all singularities of f.\n    Note that ``t`` is always assumed real and positive.\n\n    Return None if the integral does not exist or could not be evaluated.\n\n    Examples\n    ========\n\n    >>> from sympy.abc import x, t\n    >>> from sympy.integrals.meijerint import meijerint_inversion\n    >>> meijerint_inversion(1/x, x, t)\n    Heaviside(t)\n    '
    from sympy import I, Integral, exp, expand, log, Add, Mul, Heaviside
    f_ = f
    t_ = t
    t = Dummy('t', polar=True)
    f = f.subs(t_, t)
    c = Dummy('c')
    _debug('Laplace-inverting', f)
    if (not _is_analytic(f, x)):
        _debug('But expression is not analytic.')
        return None
    shift = 0
    if f.is_Mul:
        args = list(f.args)
        newargs = []
        exponentials = []
        while args:
            arg = args.pop()
            if isinstance(arg, exp):
                arg2 = expand(arg)
                if arg2.is_Mul:
                    args += arg2.args
                    continue
                try:
                    (a, b) = _get_coeff_exp(arg.args[0], x)
                except _CoeffExpValueError:
                    b = 0
                if (b == 1):
                    exponentials.append(a)
                else:
                    newargs.append(arg)
            elif arg.is_Pow:
                arg2 = expand(arg)
                if arg2.is_Mul:
                    args += arg2.args
                    continue
                if (x not in arg.base.free_symbols):
                    try:
                        (a, b) = _get_coeff_exp(arg.exp, x)
                    except _CoeffExpValueError:
                        b = 0
                    if (b == 1):
                        exponentials.append((a * log(arg.base)))
                newargs.append(arg)
            else:
                newargs.append(arg)
        shift = Add(*exponentials)
        f = Mul(*newargs)
    gs = _rewrite1(f, x)
    if (gs is not None):
        (fac, po, g, cond) = gs
        _debug('Could rewrite as single G function:', fac, po, g)
        res = S(0)
        for (C, s, f) in g:
            (C, f) = _rewrite_inversion((fac * C), (po * (x ** s)), f, x)
            res += (C * _int_inversion(f, x, t))
            cond = And(cond, _check_antecedents_inversion(f, x))
            if (cond == False):
                break
        cond = _my_unpolarify(cond)
        if (cond == False):
            _debug('But cond is always False.')
        else:
            _debug('Result before branch substitution:', res)
            res = _my_unpolarify(hyperexpand(res))
            if (not res.has(Heaviside)):
                res *= Heaviside(t)
            res = res.subs(t, (t + shift))
            if (not isinstance(cond, bool)):
                cond = cond.subs(t, (t + shift))
            return Piecewise((res.subs(t, t_), cond), (Integral((f_ * exp((x * t))), (x, (c - (oo * I)), (c + (oo * I)))).subs(t, t_), True))

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