| numerical_differentiation | R Documentation |
Functions for numerical differentiation using finite difference methods and complex step methods.
finite_difference_derivative(f, x, order = 1)
complex_step_derivative(f, x)
f |
A function to differentiate. It should accept a single numeric value and return a single numeric value. |
x |
The point at which to evaluate the derivative. |
order |
The order of accuracy of the derivative to compute. Default is 1. |
The approximate value of the derivative at the point x.
# Finite difference derivative of sin(x) at pi/4
finite_difference_derivative(sin, pi / 4)
# Complex step derivative of exp(x) at 1.7
complex_step_derivative(exp, 1.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.