derivative | R Documentation |
Derivative of a function with respect to x
derivative(x, y, m = 0, n = 50)
x |
x coordinates of points in function's domain |
y |
y coordinates of points in function's range |
m |
the order of the derivative (0 for y, 1 for y', 2 for y”) |
n |
number of points in the domain for interpolation |
a function representing the mth derivative of y(x) with respect to x
x <- seq(0,5,0.1) y <- x^2 - 2*x + 3 # So dy/dx = 2x - 2 fp <- derivative(x, y, 1) fp(2) # 2 fp(5) # 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.