def METHOD_NAME():
    e = (x**2 + 1)**3/((x - 1)**2*(x + 1)**2*(-x**2 + 2*x + 1)*(x**2 + 2*x - 1))
    def mul2(x):
        return Mul(2, x, evaluate=False)
    r = (1/mul2(x - sqrt(2) + 1) - 1/mul2(x - sqrt(2) - 1) +
         1/mul2(x + 1 + sqrt(2)) - 1/mul2(x - 1 + sqrt(2)) +
         1/mul2((x + 1)**2) + 1/mul2((x - 1)**2))
    assert apart(e, x, extension=sqrt(2)) == r