'Returns the next term in the Taylor series expansion'

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

    from sympy import bernoulli
    if (n == 0):
        return (1 / sympify(x))
    elif ((n < 0) or ((n % 2) == 0)):
        return S.Zero
    else:
        x = sympify(x)
        B = bernoulli((n + 1))
        F = factorial((n + 1))
        return ((((2 * (1 - (2 ** n))) * B) / F) * (x ** n))
