You could keep a list of each type and compare them against the expression's free_symbols property.
But as Jason said, the best way to denote that a symbol depends on time is to use a Function and explicitly use f(t). You can use the mechanics printer if you don't like the extra (t) in the printing. If you do this, then a simple "t in expr.free_symbols" will do the check for you. Or if you want to be careful against things that cancel out when you simplify them, check if the derivative with respect to t simplifies to 0 (but this will be more computationally expensive). Aaron Meurer On Sat, Dec 28, 2013 at 11:18 PM, Roger W <[email protected]> wrote: > I want to develop a procedure in sympy to determine whether the product of > one or more symbols contains at least one variable, for example, at least > one symbol changes with time. That is, I have one group of symbols > representing variables and another group representing constants. I haven't > found a way to assign, for example, True or False, to a symbol's "constant" > or "variable" property. Has anyone done something like this, or is there a > procedure to override sympy functions to add and test this property? > > -- > 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 http://groups.google.com/group/sympy. > For more options, visit https://groups.google.com/groups/opt_out. -- 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 http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
