Function: gradef (<f>(<x_1>, ..., <x_n>), <g_1>, ..., <g_m>)
Function: gradef (<a>, <x>, <expr>) Defines the partial derivatives (i.e., the components of the gradient) of the function <f> or variable <a>.
gradef (<f>(<x_1>, ..., <x_n>), <g_1>, ..., <g_m>) defines
d<f>/d<x_i> as <g_i>, where <g_i> is an expression; <g_i> may be a function call, but not the name of a function. The number of partial derivatives <m> may be less than the number of arguments <n>, in which case derivatives are defined with respect to <x_1> through <x_m> only.
gradef (<a>, <x>, <expr>) defines the derivative of variable <a> with respect to <x> as <expr>. This also establishes the dependence of <a> on <x> (via
depends (<a>, <x>)).
The first argument
<f>(<x_1>, ..., <x_n>) or <a> is quoted, but the remaining arguments <g_1>, ..., <g_m> are evaluated.
gradef returns the function or variable for which the partial derivatives are defined.
gradef can redefine the derivatives of Maximas built-in functions. For example,
gradef (sin(x), sqrt (1 - sin(x)^2)) redefines the derivative of
gradef cannot define partial derivatives for a subscripted function.
printprops ([<f_1>, ..., <f_n>], gradef) displays the partial derivatives of the functions <f_1>, ..., <f_n>, as defined by
printprops ([<a_n>, ..., <a_n>], atomgrad) displays the partial derivatives of the variables <a_n>, ..., <a_n>, as defined by
gradefs is the list of the functions for which partial derivatives have been defined by
gradefs does not include any variables for which partial derivatives have been defined by
Gradients are needed when, for example, a function is not known explicitly but its first derivatives are and it is desired to obtain higher order derivatives.
There are also some inexact matches for
?? gradef to see them.
(%o1) true (%i2)