Sponsored links: Algebra eBooks ### The Maxima on-line user's manual

Algebra Calculator

#### Search: #### Depends

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 `diff` noun). 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 `dependencies`. `depends` evaluates its arguments.

`diff` is the only Maxima command which recognizes dependencies established by `depends`. Other functions (`integrate`, `laplace`, etc.) only recognize dependencies explicitly represented by their arguments. For example, `integrate` does not recognize the dependence of `f` on `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`. Try `?? depends` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

depends(f,x);

depends(g,x);

diff(f*g,x);

Calculate

##### depends-hessian

hessian (x ^2+y^2+7*z...

depends (F, [a, b]);

hessian (F, [a, b]);

Calculate

##### depends-hessian

hessian ((z)/(x*y), [...

depends (F, [a, b, c]);

hessian (F, [a, b, c]);

Calculate

##### depends-hessian

hessian (-4*x^2+6*x*y...

depends (F, [a, b]);

hessian (F, [a, b]);

Calculate

##### depends-hessian-sinh

hessian (x * sinh(x+y...

depends (F, [a, b]);

hessian (F, [a, b]);

Calculate

##### depends-hessian

hessian (x^2 + 3*y^2 ...

depends (F, [a, b]);

hessian (F, [a, b]);

Calculate

##### depends-exp-hessian

hessian (exp(x^2 + 2*...

depends (F, [a, b]);

hessian (F, [a, b]);

Calculate

##### depends-hessian

hessian (xyz - x^2 - ...

depends (F, [a, b, c]);

hessian (F, [a, b,c ]);

Calculate

##### depends-solve

eqn: x^2 + y^2 = 25;

depends(y,x);

diff_of_eqn : diff(e...

Calculate

##### depends-hessian-sin

hessian ( e^xy * sin ...

depends (F, [a, b, c]);

hessian (F, [a, b,c ]);

Calculate 