Did I find the right examples for you? yes no

# sympy.integrals.prde.is_deriv_k

All Samples(18)  |  Call(12)  |  Derive(0)  |  Import(6)

```            "be given.")

from sympy.integrals.prde import is_deriv_k

if handle_first not in ['log', 'exp']:
```
```                    # a**b == exp(b*log(a)).
basea, based = frac_in(i.base, self.t)
A = is_deriv_k(basea, based, self)
if A is None:
# Nonelementary monomial (so far)
```
```        NotImplementedError.
"""
from sympy.integrals.prde import is_deriv_k

new_extension = False
```
```            # In other words, we don't have to worry about radicals.
arga, argd = frac_in(arg, self.t)
A = is_deriv_k(arga, argd, self)
if A is not None:
ans, u, const = A
```

```            "be given.")

from sympy.integrals.prde import is_deriv_k

if handle_first not in ['log', 'exp']:
```
```                    # a**b == exp(b*log(a)).
basea, based = frac_in(i.base, self.t)
A = is_deriv_k(basea, based, self)
if A is None:
# Nonelementary monomial (so far)
```
```        NotImplementedError.
"""
from sympy.integrals.prde import is_deriv_k

new_extension = False
```
```            # In other words, we don't have to worry about radicals.
arga, argd = frac_in(arg, self.t)
A = is_deriv_k(arga, argd, self)
if A is not None:
ans, u, const = A
```

```"""Most of these tests come from the examples in Bronstein's book."""
from sympy import Poly, Matrix, S, symbols, I
from sympy.integrals.risch import DifferentialExtension
from sympy.integrals.prde import (prde_normal_denom, prde_special_denom,
prde_linear_constraints, constant_system, prde_spde, prde_no_cancel_b_large,
```
```def test_is_deriv_k():
DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t1), Poly(1/(x + 1), t2)],
'L_K': [1, 2], 'E_K': [], 'L_args': [x, x + 1], 'E_args': []})
assert is_deriv_k(Poly(2*x**2 + 2*x, t2), Poly(1, t2), DE) == \
([(t1, 1), (t2, 1)], t1 + t2, 2)

DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t1), Poly(t2, t2)],
'L_K': [1], 'E_K': [2], 'L_args': [x], 'E_args': [x]})
assert is_deriv_k(Poly(x**2*t2**3, t2), Poly(1, t2), DE) == \
```
```    DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(2/x, t1)],
'L_K': [1], 'E_K': [], 'L_args': [x**2], 'E_args': []})
assert is_deriv_k(Poly(x, t1), Poly(1, t1), DE) == \
([(t1, S(1)/2)], t1/2, 1)

DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(2/(1 + x), t0)],
'L_K': [1], 'E_K': [], 'L_args': [x**2 + 2*x + 1], 'E_args': []})
assert is_deriv_k(Poly(1 + x, t0), Poly(1, t0), DE) == \
```

```"""Most of these tests come from the examples in Bronstein's book."""
from sympy import Poly, Matrix, S, symbols, I
from sympy.integrals.risch import DifferentialExtension
from sympy.integrals.prde import (prde_normal_denom, prde_special_denom,
prde_linear_constraints, constant_system, prde_spde, prde_no_cancel_b_large,
```
```def test_is_deriv_k():
DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t1), Poly(1/(x + 1), t2)],
'L_K': [1, 2], 'E_K': [], 'L_args': [x, x + 1], 'E_args': []})
assert is_deriv_k(Poly(2*x**2 + 2*x, t2), Poly(1, t2), DE) == \
([(t1, 1), (t2, 1)], t1 + t2, 2)

DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t1), Poly(t2, t2)],
'L_K': [1], 'E_K': [2], 'L_args': [x], 'E_args': [x]})
assert is_deriv_k(Poly(x**2*t2**3, t2), Poly(1, t2), DE) == \
```
```    DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(2/x, t1)],
'L_K': [1], 'E_K': [], 'L_args': [x**2], 'E_args': []})
assert is_deriv_k(Poly(x, t1), Poly(1, t1), DE) == \
([(t1, S(1)/2)], t1/2, 1)

DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(2/(1 + x), t0)],
'L_K': [1], 'E_K': [], 'L_args': [x**2 + 2*x + 1], 'E_args': []})
assert is_deriv_k(Poly(1 + x, t0), Poly(1, t0), DE) == \
```