| Applying science to business management |
  
derivative
Format: derivative( f(x), x, x0 )
Arguments: (num) f(x) Function or expression to
be differentiated
(node) x Name of the input variable in f(x)
(num) x0 Point where the derivative is calculated
Returns: (num) The derivative of f(x) at x=x0
in the real direction
Description: Derivative is equivalent to the standard
mathematical expression
f(x) may be a function of any number of variables. Derivative
calculates the partial derivative of f(x) with respect to x
only.
Derivative is an approximated function that is not
subject to the tolerance set by precision.
This primitive creates a temporary variable named x. If a
node named x already exists, it is replaced for all
evaluations of f(x) and is then restored to its original
state.
Note: If the expression f(x) is a tree node
rather than a function based on x, the reset primitive must be used to
cause the tree to recalculate on each iteration. Constants retain
their value from the first evaluation and return this value on
all subsequent evaluations. To cause the constant to be
reevaluated, use an expression similar to
derivative({reset,f},x,x0)
rather than
derivative(f,x,x0)
Examples: derivative(exp(x),x,1)
= 2.718
f(x):=x^3
derivative(f(x),x,2) = 12
See Also: integral
|