derivative#
Differentiate an expression symbolically.
Available in: math cells, REPL.
Syntax#
derivative(expression, variable)
Arguments and behavior#
Pass the expression and differentiation variable. Returns a displayed symbolic result (or a number for a constant derivative), not an object with an evaluate method. Use sub to substitute into an expression; do not call .evaluate on this result. The example returns text.
Example#
Edit the inputs, then use Run or Reset. Changes stay in this example.
Example
derivative("x^2+3*x","x")Interactive examples could not load. You can still copy the expressions.
Expected result: 3+2*x.