(expr, x)
When expr is known to be of the form c*x**b, with c and/or b possibly 1,
    return c, b.

    >>> from sympy.abc import x, a, b
    >>> from sympy.integrals.meijerint import _get_coeff_exp
    >>> _get_coeff_exp(a*x**b, x)
    (a, b)
    >>> _get_coeff_exp(x, x)
    (1, 1)
    >>> _get_coeff_exp(2*x, x)
    (2, 1)
    >>> _get_coeff_exp(x**3, x)
    (1, 3)
When expr is known to be of the form c*x**b, with c and/or b possibly 1,
    return c, b.
When expr is known to be of the form c * x ** b with c and / or b possibly 1 return c b .
def _get_coeff_exp(expr, x):
    """
    When expr is known to be of the form c*x**b, with c and/or b possibly 1,
    return c, b.

    >>> from sympy.abc import x, a, b
    >>> from sympy.integrals.meijerint import _get_coeff_exp
    >>> _get_coeff_exp(a*x**b, x)
    (a, b)
    >>> _get_coeff_exp(x, x)
    (1, 1)
    >>> _get_coeff_exp(2*x, x)
    (2, 1)
    >>> _get_coeff_exp(x**3, x)
    (1, 3)
    """
    from sympy import powsimp
    (c, m) = expand_power_base(powsimp(expr)).as_coeff_mul(x)
    if not m:
        return c, S(0)
    [m] = m
    if m.is_Pow:
        if m.base != x:
            raise _CoeffExpValueError('expr not of form a*x**b')
        return c, m.exp
    elif m == x:
        return c, S(1)
    else:
        raise _CoeffExpValueError('expr not of form a*x**b: %s' % expr)
def _get_coeff_exp ( expr , x ) : from sympy import powsimp ( c , m ) = expand_power_base ( powsimp ( expr ) ) . as_coeff_mul ( x ) if not m : return c , S ( 0 ) [ m ] = m if m . is_Pow : if m . base != x : raise _CoeffExpValueError ( 'expr not of form a*x**b' ) return c , m . exp elif m == x : return c , S ( 1 ) else : raise _CoeffExpValueError ( 'expr not of form a*x**b: %s' % expr )