diff
Performs numerical differentiation at a point.
Syntax
-
diff(expr, var, x[, ε])
-
expr
is an expression in one variablevar
-
var
is the variable inexpr
-
x
is the point at which the derivative is computed -
ε
is the radius aboutx
used for numerical differentiation
-
Description
diff
computes a symmetric difference quotient for a real function of a real variable at a particular point in its domain:
diff(f(t), t, x, ε) = [f(t + ε) − f(t − ε)] / (2⋅ε).
If omitted, ε
is set to 10^−6.
Examples
diff(x^2, x, 1)
2
diff(e^x, x, 1)
2.71828182846
∫(diff(x^2, x, t), t, 0, 2)
4
See also
-
differentiate (synonym)