Divergence and curl
Before you start: you'll need the gradient and the \(\nabla\) operator.
A vector field \(\vec F = F_1\mathbf{i} + F_2\mathbf{j} + F_3\mathbf{k}\) attaches a vector to every point: the velocity of a fluid, or an electric or magnetic field. Divergence and curl are the two ways of differentiating it.
\[\operatorname{div}\vec F = \nabla\cdot\vec F = \frac{\partial F_1}{\partial x} + \frac{\partial F_2}{\partial y} + \frac{\partial F_3}{\partial z}\]
Curl (a vector)
\[\operatorname{curl}\vec F = \nabla\times\vec F = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \dfrac{\partial}{\partial x} & \dfrac{\partial}{\partial y} & \dfrac{\partial}{\partial z} \\ F_1 & F_2 & F_3 \end{vmatrix}\]
Expanded: \(\left(\dfrac{\partial F_3}{\partial y} - \dfrac{\partial F_2}{\partial z}\right)\mathbf{i} + \left(\dfrac{\partial F_1}{\partial z} - \dfrac{\partial F_3}{\partial x}\right)\mathbf{j} + \left(\dfrac{\partial F_2}{\partial x} - \dfrac{\partial F_1}{\partial y}\right)\mathbf{k}\)
What they mean
| Name | Condition | Meaning |
|---|---|---|
| Solenoidal | \(\nabla\cdot\vec F = 0\) | no sources or sinks; what flows in flows out |
| Irrotational | \(\nabla\times\vec F = \vec 0\) | no swirling; the field has a scalar potential |
Scalar potential
If \(\nabla\times\vec F = \vec 0\), there is a scalar function \(\phi\), the scalar potential, with \[\vec F = \nabla\phi\]
How to find \(\phi\)
- Check \(\nabla\times\vec F = \vec 0\) first. If not, no potential exists.
- Integrate \(F_1\) with respect to \(x\), treating \(y\) and \(z\) as constants.
- Add the terms of \(\displaystyle\int F_2\,dy\) that don't contain \(x\), and the terms of \(\displaystyle\int F_3\,dz\) that contain neither \(x\) nor \(y\).
- Check by differentiating: \(\nabla\phi\) must give back \(\vec F\). Add a constant \(c\).
Identities worth knowing
- \(\nabla\times(\nabla\phi) = \vec 0\): every gradient field is irrotational.
- \(\nabla\cdot(\nabla\times\vec F) = 0\): every curl is solenoidal.
- \(\nabla\cdot\vec r = 3\), \(\;\nabla\times\vec r = \vec 0\), \(\;\nabla\cdot(r^n\vec r) = (n + 3)\,r^n\).
Solved examples
Example 1: Divergence and curl
EasyFind \(\nabla\cdot\vec F\) and \(\nabla\times\vec F\) for \(\vec F = x^2y\,\mathbf{i} + xz\,\mathbf{j} + 2yz\,\mathbf{k}\).
- \(\nabla\cdot\vec F = 2xy + 0 + 2y\).
- \(\mathbf{i}\): \(\dfrac{\partial(2yz)}{\partial y} - \dfrac{\partial(xz)}{\partial z} = 2z - x\).
- \(\mathbf{j}\): \(\dfrac{\partial(x^2y)}{\partial z} - \dfrac{\partial(2yz)}{\partial x} = 0\). \(\;\mathbf{k}\): \(\dfrac{\partial(xz)}{\partial x} - \dfrac{\partial(x^2y)}{\partial y} = z - x^2\).
Answer\(\nabla\cdot\vec F = 2xy + 2y\), \(\;\nabla\times\vec F = (2z - x)\,\mathbf{i} + (z - x^2)\,\mathbf{k}\)
Example 2: Making a field solenoidal
EasyFind \(a\) so that \(\vec F = (x + 3y)\,\mathbf{i} + (y - 2z)\,\mathbf{j} + (x + az)\,\mathbf{k}\) is solenoidal.
- \(\nabla\cdot\vec F = 1 + 1 + a = 0\).
Answer\(a = -2\)
Example 3: Irrotational, with its potential
MediumShow that \(\vec F = (y + z)\,\mathbf{i} + (z + x)\,\mathbf{j} + (x + y)\,\mathbf{k}\) is irrotational, and find its scalar potential.
- \(\nabla\times\vec F = (1 - 1)\,\mathbf{i} + (1 - 1)\,\mathbf{j} + (1 - 1)\,\mathbf{k} = \vec 0\).
- \(\displaystyle\int (y + z)\,dx = xy + xz\). From \(\displaystyle\int (z + x)\,dy\), the new term without \(x\) is \(yz\). Nothing new comes from \(F_3\).
Answer\(\phi = xy + yz + zx + c\)
Example 4: A classic potential
Exam levelShow that \(\vec F = (6xy + z^3)\,\mathbf{i} + (3x^2 - z)\,\mathbf{j} + (3xz^2 - y)\,\mathbf{k}\) is irrotational and find \(\phi\) with \(\vec F = \nabla\phi\).
- \(\mathbf{i}\): \(-1 - (-1) = 0\). \(\;\mathbf{j}\): \(3z^2 - 3z^2 = 0\). \(\;\mathbf{k}\): \(6x - 6x = 0\). So \(\nabla\times\vec F = \vec 0\).
- \(\displaystyle\int F_1\,dx = 3x^2y + xz^3\). Its \(y\)-derivative is \(3x^2\), but \(F_2 = 3x^2 - z\), so add \(-yz\).
- Check: \(\dfrac{\partial}{\partial z}(3x^2y + xz^3 - yz) = 3xz^2 - y = F_3\). ✓
Answer\(\phi = 3x^2y + xz^3 - yz + c\)
Example 5: Finding constants for an irrotational field
Exam levelFind \(a, b, c\) so that \(\vec F = (x + 2y + az)\,\mathbf{i} + (bx - 3y - z)\,\mathbf{j} + (4x + cy + 2z)\,\mathbf{k}\) is irrotational, and find its potential.
- \(\mathbf{i}\): \(c - (-1) = 0\), so \(c = -1\). \(\;\mathbf{j}\): \(a - 4 = 0\), so \(a = 4\). \(\;\mathbf{k}\): \(b - 2 = 0\), so \(b = 2\).
- Potential: \(\displaystyle\int (x + 2y + 4z)\,dx = \frac{x^2}{2} + 2xy + 4xz\); add \(-\dfrac{3y^2}{2} - yz\) from \(F_2\), and \(z^2\) from \(F_3\).
Answer\(a = 4,\; b = 2,\; c = -1\); \(\;\phi = \dfrac{x^2}{2} - \dfrac{3y^2}{2} + z^2 + 2xy + 4xz - yz + c'\)
Example 6: A result about r
Exam levelShow that \(\nabla\cdot(r^n\vec r) = (n + 3)\,r^n\). Hence show that \(\dfrac{\vec r}{r^3}\) is solenoidal.
- Product rule: \(\nabla\cdot(r^n\vec r) = \nabla(r^n)\cdot\vec r + r^n\,\nabla\cdot\vec r\).
- \(\nabla r^n = n\,r^{n-2}\vec r\) (see gradient) and \(\nabla\cdot\vec r = 3\). So \(= n\,r^{n-2}\,r^2 + 3r^n = (n + 3)r^n\).
- With \(n = -3\): \(\nabla\cdot\dfrac{\vec r}{r^3} = 0\).
Answer\(\dfrac{\vec r}{r^3}\) is solenoidal: this is the inverse-square field of gravity and electrostatics.
For curl, use the cyclic pattern \(x \to y \to z \to x\). The \(\mathbf{i}\) part is \(\dfrac{\partial F_3}{\partial y} - \dfrac{\partial F_2}{\partial z}\); shift every letter one step to get the \(\mathbf{j}\) part, and again for \(\mathbf{k}\). No determinant expansion needed.
Common mistakes
1. Mixing up which is a scalar
Divergence is a scalar (a dot product); curl is a vector (a cross product).
2. Getting the middle component of curl the wrong way round
The \(\mathbf{j}\) component is \(\dfrac{\partial F_1}{\partial z} - \dfrac{\partial F_3}{\partial x}\). Expanding the determinant, students often forget its minus sign.
3. Looking for a potential before checking the curl
If \(\nabla\times\vec F \ne \vec 0\), no scalar potential exists, however you integrate.
4. Counting a term twice in the potential
Only add the terms from \(F_2\) and \(F_3\) that haven't already appeared. Always check by differentiating.
How it's asked in exams
- Find \(\nabla\cdot\vec F\) and \(\nabla\times\vec F\) at a point.
- Show a field is solenoidal or irrotational, or find constants that make it so.
- Find the scalar potential of an irrotational field.
- Prove identities such as \(\nabla\cdot(r^n\vec r) = (n + 3)r^n\) or \(\nabla\times(\nabla\phi) = \vec 0\).
Practice questions
Try each one on paper before you open the answer.
Q1Find \(\nabla\cdot\vec r\) and \(\nabla\times\vec r\), where \(\vec r = x\mathbf{i} + y\mathbf{j} + z\mathbf{k}\).
\(\nabla\cdot\vec r = 3\), \(\;\nabla\times\vec r = \vec 0\).
Q2Find \(\nabla\cdot\vec F\) at \((1, -1, 1)\) for \(\vec F = x^2z\,\mathbf{i} - 2y^3z^2\,\mathbf{j} + xy^2z\,\mathbf{k}\).
\(\nabla\cdot\vec F = 2xz - 6y^2z^2 + xy^2 = 2 - 6 + 1 = -3\).
Q3Find \(\nabla\times\vec F\) for \(\vec F = xy\,\mathbf{i} + yz\,\mathbf{j} + zx\,\mathbf{k}\).
\(-y\,\mathbf{i} - z\,\mathbf{j} - x\,\mathbf{k}\).
Q4Show that \(\vec F = (2xy + z^3)\,\mathbf{i} + x^2\,\mathbf{j} + 3xz^2\,\mathbf{k}\) is irrotational and find its potential.
Curl components: \(0 - 0\), \(3z^2 - 3z^2\), \(2x - 2x\), all zero. \(\phi = x^2y + xz^3 + c\).
Q5Find \(a\) so that \(\vec F = (axy - z^3)\,\mathbf{i} + (a - 2)x^2\,\mathbf{j} + (1 - a)xz^2\,\mathbf{k}\) is irrotational.
\(\mathbf{j}\): \(-3z^2 - (1 - a)z^2 = (a - 4)z^2\). \(\mathbf{k}\): \(2(a - 2)x - ax = (a - 4)x\). Both vanish when \(a = 4\).
Q6Show that \(\nabla\times(\nabla\phi) = \vec 0\) for every scalar field \(\phi\).
The \(\mathbf{i}\) component is \(\phi_{zy} - \phi_{yz} = 0\), since mixed partials are equal; likewise for \(\mathbf{j}\) and \(\mathbf{k}\).
Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.
Frequently asked questions
What is the physical meaning of divergence?
The net rate at which the field flows out of a tiny volume around a point. Positive means a source, negative means a sink, and zero means as much flows in as out.
What is the physical meaning of curl?
How much the field rotates around a point. For a rigidly rotating body, the curl of the velocity is twice the angular velocity.
What is a solenoidal field?
A field with zero divergence everywhere, such as a magnetic field.
What is an irrotational field?
A field with zero curl. Such a field is the gradient of a scalar potential, such as a gravitational or electrostatic field.