Re: [sympy] Testing an expression

2016-05-05 Thread Aaron Meurer
Take a look at Wild and match http://docs.sympy.org/latest/modules/core.html#sympy.core.symbol.Wild. Aaron Meurer On Thu, May 5, 2016 at 10:01 AM, Alex Lindsay wrote: > I am trying to build a rule for manual integration. I want to test whether > an expression matches the

[sympy] Testing an expression

2016-05-05 Thread Alex Lindsay
I am trying to build a rule for manual integration. I want to test whether an expression matches the general form: c (e + f x)**p where c, f, and p can be non-zero expressions not containing x, whereas e can be zero but again cannot contain x. Moreover, if the expressions matches the above