Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 + 3c + 3x) 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.)

click to hide/show revision 2
retagged

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 + 3c + 3x) 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.)