derivative
derivative(expr, variable)
derivative(expr, variable, {simplify: boolean})
Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.
Try it yourself:
$1 | derivative("2x^3", "x")
| |
$2 | derivative("2x^3", "x", {simplify: false})
| |
$3 | derivative("2x^2 + 3x + 4", "x")
| |
$4 | derivative("sin(2x)", "x")
| |
$5 | f = parse("x^2 + x")
| |
$6 | x = parse("x")
| |
$7 | df = derivative(f, x)
| |
$8 | df.evaluate({x: 3})
|
See also:
All functions