Did I find the right examples for you? yes no

# sympy.integrals.risch.recognize_log_derivative

All Samples(18)  |  Call(14)  |  Derive(0)  |  Import(4)

from sympy.polys import Poly, lcm, cancel, sqf_list

from sympy.integrals.risch import (gcdex_diophantine, frac_in, derivation,
NonElementaryIntegralException, residue_reduce, splitfactor,
residue_reduce_derivation, DecrementLevel, recognize_log_derivative)

from sympy.polys import Poly, lcm, cancel, sqf_list

from sympy.integrals.risch import (gcdex_diophantine, frac_in, derivation,
NonElementaryIntegralException, residue_reduce, splitfactor,
residue_reduce_derivation, DecrementLevel, recognize_log_derivative)

"""Most of these tests come from the examples in Bronstein's book."""
from sympy import (Poly, I, S, Function, log, symbols, exp, tan, sqrt,
Symbol, Lambda, sin, cos, Eq, Piecewise, factor)
from sympy.integrals.risch import (gcdex_diophantine, frac_in, as_poly_1t,
derivation, splitfactor, splitfactor_sqf, canonical_representation,
d = Poly((2*x + t)*(t + x**2), t)
DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]})
assert recognize_log_derivative(a, d, DE, z) == True
DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]})
assert recognize_log_derivative(Poly(t + 1, t), Poly(t + x, t), DE) == True
assert recognize_log_derivative(Poly(2, t), Poly(t**2 - 1, t), DE) == True
DE = DifferentialExtension(extension={'D': [Poly(1, x)]})
assert recognize_log_derivative(Poly(1, x), Poly(x**2 - 2, x), DE) == False

"""Most of these tests come from the examples in Bronstein's book."""
from sympy import (Poly, I, S, Function, log, symbols, exp, tan, sqrt,
Symbol, Lambda, sin, cos, Eq, Piecewise, factor)
from sympy.integrals.risch import (gcdex_diophantine, frac_in, as_poly_1t,
derivation, splitfactor, splitfactor_sqf, canonical_representation,
d = Poly((2*x + t)*(t + x**2), t)
DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]})
assert recognize_log_derivative(a, d, DE, z) == True
DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]})
assert recognize_log_derivative(Poly(t + 1, t), Poly(t + x, t), DE) == True
assert recognize_log_derivative(Poly(2, t), Poly(t**2 - 1), DE) == True
DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1, t)]})
assert recognize_log_derivative(Poly(1, t), Poly(t**2 - 2), DE) == False