laplacian | R Documentation |
Numerically compute the Laplacian of a function.
laplacian(f, x0, h = .Machine$double.eps^(1/4), ...)
f |
univariate function of several variables. |
x0 |
point in |
h |
step size. |
... |
variables to be passed to |
Computes the Laplacian operator f_{x_1 x_1} + \ldots + f_{x_n x_n}
based on the three-point central difference formula, expanded to this
special case.
Assumes that the function has continuous partial derivatives.
Real number.
Fausett, L. V. (2007). Applied Numerical Analysis Using Matlab. Second edition, Prentice Hall.
hessian
f <- function(x) x[1]^2 + 2*x[1]*x[2] + x[2]^2
laplacian(f, c(1,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.