powered by
This function allows to approximate the derivative of a function by the finite differences method.
differentiation(x, fx)
A numeric vector with the \(x\) values.
A numeric vector with the \(f(x)\) values.
Numerical differentiation is a method of approximating the derivative of a function \(f\) at particular value \(x\).
x <- c(0.0, 0.2, 0.4) fx <- c(0.00000, 0.74140, 1.3718) differentiation(x, fx)
Run the code above in your browser using DataLab