diff SciMax Toolbox digitcharp

SciMax Toolbox >> diff

diff

Maxima Function

Calling Sequence

diff (expr, x_1, n_1, ..., x_m, n_m)
diff(expr,x,n)
diff(expr,x)
diff(expr)

Description

Returns the derivative or differential of expr with respect to some or all variables in expr.

diff (expr, x, n) returns the n'th derivative of expr with respect to x.

diff (expr, x_1, n_1, ..., x_m, n_m) returns the mixed partial derivative of expr with respect to x_1, ..., x_m. It is equivalent to diff (... (diff (expr, x_m, n_m) ...), x_1, n_1).

diff (expr, x) returns the first derivative of expr with respect to the variable x.

diff (expr) returns the total differential of expr, that is, the sum of the derivatives of expr with respect to each its variables times the differential del of each variable.

No further simplification of del is offered.

The noun form of diff is required in some contexts, such as stating a differential equation. In these cases, diff may be quoted (as 'diff) to yield the noun form instead of carrying out the differentiation.

When derivabbrev is true, derivatives are displayed as subscripts. Otherwise, derivatives are displayed in the Leibniz notation, dy/dx.

Examples:

(%i1) diff (exp (f(x)), x, 2);
                     2
              f(x)  d               f(x)  d         2
(%o1)       %e     (--- (f(x))) + %e     (-- (f(x)))
                      2                   dx
                    dx
(%i2) derivabbrev: true$
(%i3) 'integrate (f(x, y), y, g(x), h(x));
                         h(x)
                        /
                        [
(%o3)                   I     f(x, y) dy
                        ]
                        /
                         g(x)
(%i4) diff (%, x);
       h(x)
      /
      [
(%o4) I     f(x, y)  dy + f(x, h(x)) h(x)  - f(x, g(x)) g(x)
      ]            x                     x                  x
      /
       g(x)

For the tensor package, the following modifications have been incorporated:

(1) The derivatives of any indexed objects in expr will have the variables x_i appended as additional arguments. Then all the derivative indices will be sorted.

(2) The x_i may be integers from 1 up to the value of the variable dimension [default value: 4]. This will cause the differentiation to be carried out with respect to the x_i'th member of the list coordinates which should be set to a list of the names of the coordinates, e.g., [x, y, z, t]. If coordinates is bound to an atomic variable, then that variable subscripted by x_i will be used for the variable of differentiation. This permits an array of coordinate names or subscripted names like X[1], X[2], ... to be used. If coordinates has not been assigned a value, then the variables will be treated as in (1) above.

diff SciMax Toolbox digitcharp