From a Scalar Function to the Laplacian
A scalar function assigns a number to each point in its domain. Its gradient turns the function into a vector field, and the divergence measures a particular combination of the vector field’s component derivatives. Applying divergence to the gradient therefore produces a scalar function built from second derivatives of the original function.
This operation is called the Laplacian. It is useful in multivariable calculus because it gathers the function’s pure second partial derivatives into one quantity. The calculations are direct once the order of operations is clear: first find the gradient, then take its divergence.
Definitions in Cartesian Coordinates
Let \(f(x,y)\) be a scalar function of two variables. Its gradient is the vector whose components are the first partial derivatives of \(f\):
For a two-dimensional vector field \(\mathbf{F}(x,y)=\langle P(x,y),Q(x,y)\rangle\), its divergence is the scalar function
In three variables, a scalar function \(f(x,y,z)\) has gradient \(\nabla f=\langle f_x,f_y,f_z\rangle\). For a vector field \(\mathbf{F}=\langle P,Q,R\rangle\), divergence is \(\nabla\cdot\mathbf{F}=P_x+Q_y+R_z\). Here subscripts denote partial differentiation with respect to the indicated variable.
For the usual classical formulas, assume \(f\) has continuous second partial derivatives on the region under consideration. This smoothness condition ensures that the second derivatives used in the formula exist and behave regularly. In two and three dimensions, the formulas are
The notation \(\nabla^2 f\) here means the Laplacian of the scalar function, not a vector of second derivatives. The result is a scalar function.
Why the Formula Works
The formula follows directly from the definitions. In two variables, first take the gradient of \(f\). Its first component is \(f_x\), and its second component is \(f_y\). Now apply the divergence formula for a two-dimensional vector field: differentiate the first component with respect to \(x\), and the second component with respect to \(y\), then add.
\(\nabla f=\langle f_x,f_y\rangle\).
\(\nabla\cdot(\nabla f)=\partial_x(f_x)+\partial_y(f_y)\).
\(\partial_x(f_x)=f_{xx}\) and \(\partial_y(f_y)=f_{yy}\), so \(\Delta f=f_{xx}+f_{yy}\).
Thus, the sum of pure second partials is not an unrelated shortcut: it is exactly what results from taking the divergence of the gradient. The same substitution in three variables adds the derivative of the third gradient component with respect to \(z\), giving \(\Delta f=f_{xx}+f_{yy}+f_{zz}\).
For a function of only \(x\) and \(y\), the \(z\)-component is absent, so the two-variable formula applies. A function of three variables uses all three terms.
Worked Examples
Worked Example: A Polynomial in Two Variables
Find the Laplacian of \(f(x,y)=x^2+3xy+y^2\), and evaluate it at \((1,-2)\).
First calculate the gradient by differentiating \(f\) once with respect to each variable:
Take the divergence of this vector field. Differentiate its first component with respect to \(x\), and its second component with respect to \(y\):
The Laplacian is the constant function \(4\), so its value at \((1,-2)\) is also \(4\). As a check, the direct second partials are \(f_{xx}=2\) and \(f_{yy}=2\), whose sum is \(4\).
Worked Example: Exponential and Polynomial Terms
Let \(f(x,y)=e^{x+y}+x^2y\). Find \(\Delta f\), then evaluate it at \((0,1)\).
Differentiate first with respect to \(x\), treating \(y\) as constant, and then with respect to \(y\), treating \(x\) as constant:
Differentiate each component in its own variable to take the divergence:
Therefore,
At \((0,1)\), \(x+y=1\), so \(e^{x+y}=e\), and \(2y=2\). Hence \(\Delta f(0,1)=2e+2\). To check, evaluate the gradient there: \(f_x(0,1)=e\) and \(f_y(0,1)=e\). The \(x\)-derivative of the first component at that point is \(e+2\), while the \(y\)-derivative of the second is \(e\); their sum is \(2e+2\), as required.
Worked Example: A Polynomial in Three Variables
For \(f(x,y,z)=x^2y+y^2z+z^2x\), find the Laplacian and evaluate it at \((1,2,3)\).
First find all three components of the gradient:
Now differentiate each component with respect to its corresponding variable:
Adding these pure second partials gives
At \((1,2,3)\), this is \(2(1+2+3)=12\). Check using divergence of the gradient: at the point, the gradient components are \(2(1)(2)+3^2=13\), \(1^2+2(2)(3)=13\), and \(2^2+2(3)(1)=10\). Their required derivatives are \(f_{xx}=2(2)=4\), \(f_{yy}=2(3)=6\), and \(f_{zz}=2(1)=2\). The divergence is \(4+6+2=12\), confirming the result.
A Common Mistake: Adding Mixed Partial Derivatives
The Laplacian adds pure second partial derivatives. In two variables these are \(f_{xx}\) and \(f_{yy}\), not every possible second partial derivative. Mixed derivatives such as \(f_{xy}\) and \(f_{yx}\) do not appear in the Cartesian formula for the Laplacian.
Worked Example: Correcting a Mixed-Derivative Error
Consider \(f(x,y)=x^2y+y^2\), and evaluate its Laplacian at \((1,2)\). The gradient is
Taking divergence gives \(\partial_x(2xy)=2y\) and \(\partial_y(x^2+2y)=2\). Thus \(\Delta f=2y+2\), and \(\Delta f(1,2)=2(2)+2=6\).
A common incorrect calculation adds the mixed partials as well: \(f_{xy}=2x\) and \(f_{yx}=2x\). At \((1,2)\), each is \(2\), so adding these to the correct terms would give \(4+2+2+2=10\). That is not the Laplacian. The correction is to use only the derivatives that divergence specifies: differentiate each gradient component with respect to its matching coordinate. The answer is \(6\).
Interpreting the Result
Each term in the Laplacian records how the function’s rate of change in one coordinate direction changes along that same direction. The Laplacian adds those coordinate-wise second derivatives. A positive value means their sum is positive at that point; a negative value means the sum is negative. The value alone does not tell you that every individual second derivative has the same sign.
A useful special case is a function whose Laplacian is zero throughout a region. Such a function is called harmonic there, provided the necessary second derivatives exist. This definition highlights why the Laplacian is important: it supplies a concise condition on the combined second-order behavior of a scalar function. The definition does not mean that each second partial must separately vanish; only their sum is required to be zero.
Check Your Understanding
Use the definition of the Laplacian to answer each question.
- For \(f(x,y)=x^2-4y^2\), find \(\nabla f\) and \(\Delta f\).
- For \(g(x,y)=x^2y+xy^2\), compute \(g_{xx}\), \(g_{yy}\), and \(\Delta g\).
- For \(h(x,y,z)=x^2+y^2+z^2\), find \(\Delta h\).
- Why does taking the divergence of the gradient produce pure second partials rather than mixed partials?
- If \(f_{xx}=5\) and \(f_{yy}=-5\) at a point, what is the Laplacian there, regardless of the values of the mixed partials?