Function: depends (<f_1>, <x_1>, ..., <f_n>, <x_n>) Declares functional dependencies among variables for the purpose of computing derivatives. In the absence of declared dependence,
diff (f, x) yields zero. If
depends (f, x) is declared,
diff (f, x) yields a symbolic derivative (that is, a
Each argument <f_1>, <x_1>, etc., can be the name of a variable or array, or a list of names. Every element of <f_i> (perhaps just a single element) is declared to depend on every element of <x_i> (perhaps just a single element). If some <f_i> is the name of an array or contains the name of an array, all elements of the array depend on <x_i>.
diff recognizes indirect dependencies established by
depends and applies the chain rule in these cases.
remove (<f>, dependency) removes all dependencies declared for <f>.
depends returns a list of the dependencies established. The dependencies are appended to the global variable
depends evaluates its arguments.
diff is the only Maxima command which recognizes dependencies established by
depends. Other functions (
laplace, etc.) only recognize dependencies explicitly represented by their arguments. For example,
integrate does not recognize the dependence of
x unless explicitly represented as
integrate (f(x), x).
(%i1) depends ([f, g], x); (%o1) [f(x), g(x)] (%i2) depends ([r, s], [u, v, w]); (%o2) [r(u, v, w), s(u, v, w)] (%i3) depends (u, t); (%o3) [u(t)] (%i4) dependencies; (%o4) [f(x), g(x), r(u, v, w), s(u, v, w), u(t)] (%i5) diff (r.s, u); dr ds (%o5) -- . s + r . -- du du
(%i6) diff (r.s, t); dr du ds du (%o6) -- -- . s + r . -- -- du dt du dt
(%i7) remove (r, dependency); (%o7) done (%i8) diff (r.s, t); ds du (%o8) r . -- -- du dt
There are also some inexact matches for
?? depends to see them.
(%o1) true (%i2)