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 <[email protected]> wrote: > 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 form, I would like to parse > it such that I know the values for c, e, f, and p. > > Any suggestions on general strategies for achieving my goals? I have been > thinking about prolific use of func and args. I imagine that I would > consider various branches for my test since c = 1, e = 0, f = 1, and p = 1 > would all change the class type of the expression or sub-expressions. > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/572B5241.4050301%40ncsu.edu. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2Bxn4jY2kcBB-TALFiHfLHDtCDUqp%2BQ7y52mZ2qwPfkhQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
