ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 04 May 2012 14:38:37 +0200check if symbolic expression contains a variablehttps://ask.sagemath.org/question/8951/check-if-symbolic-expression-contains-a-variable/check if symbolic expression contains a given variable
Is there a function or method that tests a symbolic expression
<type 'sage.symbolic.expression.Expression'>
to see if it contains a particular variable?
For example to test
y(x) == -3/(x^3 + 3*c + 3*x)
to see if it contains the variable c.
(I'm trying to write a a program to automatically plot the return value of the differential equation function desolve(), and it would help to be able to detect if the return expression contains the 'arbitrary constant' c.)
leonardoFri, 04 May 2012 14:38:37 +0200https://ask.sagemath.org/question/8951/