示例#1
0
def test_issue_18008():
    y = x * (1 + x * (1 - x)) / ((1 + x * (1 - x)) - (1 - x) * (1 - x))
    assert y.series(x, oo, n=4) == -9/(32*x**3) - 3/(16*x**2) - 1/(8*x) + S(1)/4 + x/2 + \
        O(x**(-4), (x, oo))
示例#2
0
def test_issue_12578():
    y = (1 - 1 / (x / 2 - 1 / (2 * x))**4)**(S(1) / 8)
    assert y.series(x, 0, n=17) == 1 - 2*x**4 - 8*x**6 - 34*x**8 - 152*x**10 - 714*x**12 - \
        3472*x**14 - 17318*x**16 + O(x**17)