# How to Calculate Divergence and Curl

Two Parts:DivergenceCurl

In vector calculus, divergence and curl are two important types of operators used on vector fields. Because vector fields are ubiquitous, these two operators are widely applicable to the physical sciences.

### Part 1 Divergence

1. 1
Understand what divergence is. Divergence is a measure of source or sink at a particular point. – In other words, how much is flowing into or out of a point. Hence, it is only defined for vector fields and outputs a scalar. Below is an example of a field with a positive divergence.
• The divergence is recognized by ${\displaystyle \operatorname {div} }$ or ${\displaystyle \nabla \cdot }$, where the dot signifies the similarity to taking a dot product.
2. 2
Take the dot product of the partial derivatives with the components of ${\displaystyle {\mathbf {F} }}$, then sum the results.
• In Cartesian coordinates, the divergence of a function ${\displaystyle {\mathbf {F} }=P{\mathbf {i} }+Q{\mathbf {j} }+R{\mathbf {k} }}$ is as follows.
• ${\displaystyle \nabla \cdot {\mathbf {F} }=\left({\frac {\partial }{\partial x}},{\frac {\partial }{\partial y}},{\frac {\partial }{\partial z}}\right)\cdot (P,Q,R)={\frac {\partial P}{\partial x}}+{\frac {\partial Q}{\partial y}}+{\frac {\partial R}{\partial z}}}$

#### Example

1. 1
Define the function:
• ${\displaystyle {\mathbf {F} }=(3x^{2}-5x^{2}y^{4}){\mathbf {i} }+(xy^{4}z^{2}-\sin(2x^{2}z^{3})){\mathbf {j} }+(5z^{2}+yz){\mathbf {k} }}$
2. 2
Take the partials of ${\displaystyle \nabla }$ and multiply them with the respective components of ${\displaystyle {\mathbf {F} }}$ like you would a dot product.
• ${\displaystyle {\frac {\partial P}{\partial x}}=6x-10xy^{4}}$
• ${\displaystyle {\frac {\partial Q}{\partial y}}=4xy^{3}z^{2}}$
• ${\displaystyle {\frac {\partial R}{\partial z}}=10z+y}$
3. 3
Sum the results.
• ${\displaystyle \nabla \cdot {\mathbf {F} }=6x-10xy^{4}+4xy^{3}z^{2}+y+10z}$
• As you can see, we have mapped from a vector field to a scalar field.

### Part 2 Curl

1. 1
Understand what curl is. The curl, defined for vector fields, is, intuitively, the amount of circulation at any point. The operator outputs another vector field. A whirlpool in real life consists of water acting like a vector field with a nonzero curl. Above is an example of a field with negative curl (because it's rotating clockwise).
• The curl is recognized by ${\displaystyle \operatorname {curl} }$ or ${\displaystyle \nabla \times }$, where the times symbol signifies the similarity of taking a cross product.
2. 2
Set up the determinant.
• ${\displaystyle \nabla \times {\mathbf {F} }={\begin{vmatrix}{\mathbf {i} }&{\mathbf {j} }&{\mathbf {k} }\\{\frac {\partial }{\partial x}}&{\frac {\partial }{\partial y}}&{\frac {\partial }{\partial z}}\\P&Q&R\end{vmatrix}}}$
• Here, we see why the curl operator is denoted with a ${\displaystyle \nabla \times }$. – It is similar to how we would normally denote the cross product of two vectors.
3. 3
Find the determinant of the matrix. Below, we do it by cofactor expansion (expansion by minors).
• ${\displaystyle \nabla \times {\mathbf {F} }=\left({\frac {\partial R}{\partial y}}-{\frac {\partial Q}{\partial z}}\right){\mathbf {i} }-\left({\frac {\partial R}{\partial x}}-{\frac {\partial P}{\partial z}}\right){\mathbf {j} }+\left({\frac {\partial Q}{\partial x}}-{\frac {\partial P}{\partial y}}\right){\mathbf {k} }}$

#### Example

1. 1
Define the function:
• ${\displaystyle {\mathbf {F} }=(5x^{2}y^{2}-7xz^{3}){\mathbf {i} }+(4x-5xy-y^{4}){\mathbf {j} }+(xz+z^{2}){\mathbf {k} }}$
2. 2
Set up the matrix.
• ${\displaystyle \nabla \times {\mathbf {F} }={\begin{vmatrix}{\mathbf {i} }&{\mathbf {j} }&{\mathbf {k} }\\{\frac {\partial }{\partial x}}&{\frac {\partial }{\partial y}}&{\frac {\partial }{\partial z}}\\P&Q&R\end{vmatrix}},}$ where ${\displaystyle P=5x^{2}y^{2}-7xz^{3},}$ ${\displaystyle Q=4x-5xy-y^{4},}$ and ${\displaystyle R=xz+z^{2}.}$
3. 3
Evaluate the determinant.
• ${\displaystyle \left({\frac {\partial R}{\partial y}}-{\frac {\partial Q}{\partial z}}\right){\mathbf {i} }=0-0}$
• ${\displaystyle \left({\frac {\partial R}{\partial x}}-{\frac {\partial P}{\partial z}}\right){\mathbf {j} }=z-(-21xz^{2})}$
• ${\displaystyle \left({\frac {\partial Q}{\partial x}}-{\frac {\partial P}{\partial y}}\right){\mathbf {k} }=(4-5y)-10x^{2}{y}}$
4. 4
Arrive at the solution.
• ${\displaystyle \nabla \times {\mathbf {F} }=-(z+21xz^{2}){\mathbf {j} }+(4-5y-10x^{2}y){\mathbf {k} }}$
• Note that we have mapped to another vector field.

## Tips

• There are several identities that are useful and worth memorizing. Here is a partial list of the more important ones, the second derivatives. You can prove them by direct computation.
• ${\displaystyle \nabla \cdot (\nabla \times {\mathbf {F} })=0}$
• ${\displaystyle \nabla \times (\nabla f)=0}$
• The Laplacian is a compound operator and is defined as the divergence of the gradient ${\displaystyle \nabla \cdot \nabla =\nabla ^{2}.}$ We write out the Laplacian in Cartesian coordinates below. The operator is especially useful in physics and engineering. For example, the potential of an electrostatic field can be described using Poisson's equation, which involves the Laplacian.
• ${\displaystyle \nabla ^{2}\phi ={\frac {\partial ^{2}\phi }{\partial x^{2}}}+{\frac {\partial ^{2}\phi }{\partial y^{2}}}+{\frac {\partial ^{2}\phi }{\partial z^{2}}}}$

## Article Info

Featured Article

Categories: Featured Articles | Calculus