(e, x, logx=None)
return t
Calculates at least one term of the series of "e" in "x".

    This is a place that fails most often, so it is in its own function.
Calculates at least one term of the series of "e" in "x".
Calculates at least one term of the series of e in x .
def calculate_series(e, x, logx=None):
    """ Calculates at least one term of the series of "e" in "x".

    This is a place that fails most often, so it is in its own function.
    """
    from sympy.polys import cancel

    for t in e.lseries(x, logx=logx):
        t = cancel(t)

        if t.simplify():
            break

    return t
def calculate_series ( e , x , logx = None ) : from sympy . polys import cancel for t in e . lseries ( x , logx = logx ) : t = cancel ( t ) if t . simplify ( ) : break return t