Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I am not sur it answers the question :

def dependance(f):
    dep = []
    for var in variables:
        if diff(f, var) != 0:
            dep.append(var)
    return dep

variables = var('x y z')
constants = var('A B C')

f = A*x + z^2/B + C
print dependance(f)

It returns [x, z].