What Is the Laplacian?
The Laplacian of a function f(x, y), written ∇²f or Δf, is the sum of its pure second partial derivatives:
∇²f = ∂²f/∂x² + ∂²f/∂y² = fxx + fyy
It is simultaneously the divergence of the gradient, div(grad f), and the most important differential operator in mathematical physics. Intuitively, ∇²f at a point measures how the value of f compares with the average of its neighbors: positive Laplacian means f sits below its surrounding average (a local dimple), negative means it bulges above, and zero means f is perfectly in balance. Functions with ∇²f = 0 everywhere are called harmonic and satisfy Laplace's equation, the governing equation of steady-state heat flow, electrostatics, and ideal fluid flow. This calculator computes both second partials symbolically, adds them, simplifies, evaluates the result at your point, and tests whether your function is harmonic.
How to Use the Laplacian Calculator
Enter f(x, y) and a point. The steps show fx and fy, then fxx and fyy, then the simplified sum, so you can follow exactly which differentiation rules fired. The harmonic test samples ∇²f over a grid around your point: if it vanishes at every sample, the tool reports f as harmonic on that region. The graph slices the surface along the line y = y₀, drawing f and its Laplacian together; watching where the dashed Laplacian curve is positive or negative against the solid slice builds the dimple-versus-bulge intuition quickly.
Worked Example
Take f(x, y) = x³ − 3xy², the default. The partials are fx = 3x² − 3y² and fy = −6xy, so
fxx = 6x, fyy = −6x, ∇²f = 6x − 6x = 0
The Laplacian cancels identically: f is harmonic everywhere. That is no accident, x³ − 3xy² is the real part of the complex function (x + iy)³, and the real and imaginary parts of any analytic function are harmonic, a bridge between complex analysis and potential theory. Compare the paraboloid chip: x² + y² has ∇²f = 4 everywhere, positive at every point because a paraboloid sits below the average of its neighbors in every direction.
The Averaging Interpretation
The cleanest way to feel the Laplacian is through the mean value property. Average f over a small circle of radius r centered at a point: for a harmonic function, that average equals the center value exactly, for every r. In general, average minus center ≈ (r²/4)∇²f, so the Laplacian is precisely the leading-order discrepancy between a function and the mean of its surroundings. This is why the discrete Laplacian used in numerical solvers and image processing is (sum of the four neighbors) − 4·(center) on a pixel grid: the same comparison, discretized. It also explains the heat equation ut = k∇²u instantly: a point cooler than its neighbors (positive Laplacian) warms up, and heat flows until every point matches its local average, which is the harmonic steady state.
Harmonic Functions and Where They Rule
Harmonic functions inherit remarkable structure from ∇²f = 0. They obey the maximum principle: on any region, a nonconstant harmonic function attains its extremes only on the boundary, never inside, which is why a steady temperature field has no interior hot spots without a heat source. They are infinitely differentiable, determined completely by their boundary values (the Dirichlet problem), and in two dimensions they pair with harmonic conjugates to form analytic functions. The exp·sin chip, exsin(y), is a workhorse example: it solves Laplace's equation by separation of variables and appears in every treatment of steady heat flow in a strip. The log potential chip, ln(x² + y²), is harmonic away from the origin and is, up to constants, the electrostatic potential of a line charge, the fundamental solution from which all others are built by superposition.
Common Mistakes to Avoid
- Including the mixed partial. The Laplacian is fxx + fyy only; fxy does not appear. Adding it confuses the Laplacian with the full Hessian matrix, of which ∇²f is just the trace.
- Confusing ∇²f with |∇f|². The Laplacian differentiates twice and can be negative; the squared gradient magnitude is first-order and never negative. Notation is treacherous here: ∇² means div·grad, not grad squared.
- Concluding harmonic from one point. ∇²f = 0 at a single point happens constantly (any sign change forces zeros). Harmonic means identically zero, which is what the sampled test checks.
- Forgetting domain punctures. ln(x² + y²) is harmonic on the punctured plane but undefined at the origin. Statements like the mean value property require the function to be harmonic on the whole disk involved.
- Sign conventions in physics. Physicists often study −∇² (a positive operator); Poisson's equation appears both as ∇²φ = ρ/ε and ∇²φ = −ρ/ε depending on convention. Check the sign before comparing with a textbook.
Real-World Applications
The Laplacian is arguably the most-used operator in applied mathematics. Electrostatics: the potential in charge-free space satisfies Laplace's equation, and capacitor design amounts to solving it with boundary conditions. Heat and diffusion: the heat equation's spatial operator is ∇², so steady temperatures are harmonic. Fluid dynamics: incompressible, irrotational flow has a harmonic velocity potential, letting airfoil flow be modeled with complex analysis. Image processing: the discrete Laplacian is the classic edge detector, since edges are exactly where a pixel disagrees most with its neighbors, and Laplacian sharpening subtracts it to crisp images. Quantum mechanics puts ∇² at the heart of the Schrödinger equation as the kinetic energy operator; graph theory generalizes it to networks, where the graph Laplacian drives clustering algorithms and PageRank-style diffusion. Pair this tool with the gradient calculator and second partial derivatives calculator to assemble the full second-order picture of a surface.
Frequently Asked Questions
What does the sign of the Laplacian tell me at a point?
Positive ∇²f means the point sits below the average of its immediate neighbors, a local dimple that diffusion would fill in; negative means it bulges above, a bump diffusion would flatten. Zero means perfect local balance, the harmonic condition.
What is a harmonic function in practical terms?
A function already in equilibrium: steady-state temperature with no sources, electrostatic potential in empty space, the height of an ideal stretched membrane. Mathematically, ∇²f = 0 everywhere on the region, which forces the mean value property and the maximum principle.
How is the Laplacian related to the gradient and divergence?
It is their composition: ∇²f = div(grad f). The gradient turns f into a vector field pointing uphill; the divergence measures whether that field spreads out. A harmonic function's gradient field is divergence-free, flowing like an incompressible fluid.
Does the Laplacian extend to three or more variables?
Directly: ∇²f = fxx + fyy + fzz in 3D, with the same averaging meaning. The fundamental harmonic solution changes character, 1/r in three dimensions versus ln r in two, which is why gravity and Coulomb potentials fall off as 1/r.
Why do real and imaginary parts of analytic functions come out harmonic?
The Cauchy-Riemann equations ux = vy, uy = −vx link the pair; differentiating once more and adding gives uxx + uyy = 0. Every polynomial in x + iy thus mass-produces harmonic functions, like the default x³ − 3xy².
What is Poisson's equation and how does it differ from Laplace's?
Poisson's equation ∇²f = g has a source term: charge density in electrostatics, heat generation in thermal problems. Laplace's equation is the source-free special case g = 0. Solutions differ by harmonic functions, so boundary conditions still decide everything.
What does the maximum principle say and why is it useful?
A nonconstant harmonic function on a bounded region takes its maximum and minimum on the boundary only. Practically: no interior hot spots in steady heat flow, no interior pressure peaks in potential flow, and instant sanity checks, if your claimed harmonic solution peaks inside, it is wrong.
How does the discrete Laplacian in image processing relate to this one?
Replace derivatives with pixel differences: (left + right + up + down) − 4·center, which is the finite-difference version of fxx + fyy scaled by the pixel spacing squared. Large magnitude flags pixels unlike their surroundings, exactly where edges live.
Is the Laplacian the trace of the Hessian?
Yes: the Hessian collects all second partials into a matrix, and summing its diagonal, fxx + fyy, gives ∇²f. Trace being rotation-invariant explains a key property: the Laplacian reads the same in every rotated coordinate system, as a physical operator must.
Why does ∇² appear in the Schrödinger equation?
Kinetic energy in quantum mechanics is p²/2m, and momentum acts as a derivative operator; squaring it produces −ℏ²∇²/2m. A sharply curved wavefunction (large Laplacian) carries large kinetic energy, the mathematical seed of the uncertainty principle's cost for confinement.