### The Maxima on-line user's manual

Algebra Calculator

#### 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-diff-ordergreat-sqrt

ordergreat(x,y,z);

depends(Phi,[x,y,z]);

R(x,y,z):=sqrt(x^2+y^...

Calculate

kill(all);

x:x;

Calculate

##### depends-hessian

hessian (12*(y^3)+11*...

depends (F, [a, b]);

hessian (F, [a, b]);

Calculate

##### depends-jacobian-sin

jacobian ([sin (x1 - ...

depends ([F, G], [y,...

jacobian ([F, G], [y...

Calculate

##### depends-diff-ode2-solve

depends(x, t) ;

eq: diff(x, t, 2) = -...

r: ode2(eq, x, t);

Calculate

##### depends-hessian

hessian (x^2 +(x+y)^2...

depends (F, [a, b]);

hessian (F, [a, b]);

Calculate

##### depends-diff

DERIVABBREV:TRUE;

depends([w], x);

diff(f(x, w(x)), x);

Calculate

##### depends-hessian

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

depends (F, [a, b]);

hessian (F, [a, b]);

Calculate

##### depends-hessian

hessian (x^+y^2, [x, ...

depends (F, [a, b]);

hessian (F, [a, b]);

Calculate

##### depends-diff-sin

depends(V,x);

diff(V*sin(theta*i),x);

Calculate