Method on @sym: laplacian (f)
Method on @sym: laplacian (f, x)

Symbolic Laplacian of symbolic expression.

The Laplacian of a scalar expression f is the scalar expression:

syms f(x, y, z)
laplacian(f)
  ⇒ (sym)
        2                 2                 2
       ∂                 ∂                 ∂
      ───(f(x, y, z)) + ───(f(x, y, z)) + ───(f(x, y, z))
        2                 2                 2
      ∂x                ∂y                ∂z

x can be a scalar, vector or cell list. If omitted, it is determined using symvar.

Example:

syms x y
laplacian(x^3 + 5*y^2)
  ⇒ (sym) 6⋅x + 10

Note: assumes x is a Cartesian coordinate system.

See also: @sym/divergence, @sym/gradient, @sym/curl, @sym/jacobian, @sym/hessian.

Package: symbolic