Did I find the right examples for you? yes no

sympy.integrals.rde.cancel_primitive

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

```"""Most of these tests come from the examples in Bronstein's book."""
from sympy import Poly, S, symbols, oo, I
from sympy.integrals.risch import (DifferentialExtension,
NonElementaryIntegralException)
from sympy.integrals.rde import (order_at, order_at_oo, weak_normalizer,
```
```    # If the DecrementLevel context manager is working correctly, this shouldn't
# cause any problems with the further tests.
raises(NonElementaryIntegralException, lambda: cancel_primitive(Poly(1, t), Poly(t, t), oo, DE))

assert cancel_primitive(Poly(1, t), Poly(t + 1/x, t), 2, DE) == \
Poly(t, t)
assert cancel_primitive(Poly(4*x, t), Poly(4*x*t**2 + 2*t/x, t), 3, DE) == \
```

```"""Most of these tests come from the examples in Bronstein's book."""
from sympy import Poly, S, symbols, oo, I
from sympy.integrals.risch import (DifferentialExtension,
NonElementaryIntegralException)
from sympy.integrals.rde import (order_at, order_at_oo, weak_normalizer,
```
```    # If the DecrementLevel context manager is working correctly, this shouldn't
# cause any problems with the further tests.
raises(NonElementaryIntegralException, lambda: cancel_primitive(Poly(1, t), Poly(t, t), oo, DE))

assert cancel_primitive(Poly(1, t), Poly(t + 1/x, t), 2, DE) == \
Poly(t, t)
assert cancel_primitive(Poly(4*x, t), Poly(4*x*t**2 + 2*t/x, t), 3, DE) == \
```