Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

laplacian

Laplacian Operator


Description

Numerically compute the Laplacian of a function.

Usage

laplacian(f, x0, h = .Machine$double.eps^(1/4), ...)

Arguments

f

univariate function of several variables.

x0

point in R^n.

h

step size.

...

variables to be passed to f.

Details

Computes the Laplacian operator f_{x_1 x_1} + … + 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.

Value

Real number.

References

Fausett, L. V. (2007). Applied Numerical Analysis Using Matlab. Second edition, Prentice Hall.

See Also

Examples

f <- function(x) x[1]^2 + 2*x[1]*x[2] + x[2]^2
laplacian(f, c(1,1))

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.