'Returns the next term in the Taylor series expansion of `\log(1+x)`.'

@staticmethod
@cacheit
def taylor_term(n, x, *previous_terms):

    from sympy import powsimp
    if (n < 0):
        return S.Zero
    x = sympify(x)
    if (n == 0):
        return x
    if previous_terms:
        p = previous_terms[(-1)]
        if (p is not None):
            return powsimp(((((- n) * p) * x) / (n + 1)), deep=True, combine='exp')
    return (((1 - (2 * (n % 2))) * (x ** (n + 1))) / (n + 1))
