Gradient, Divergence and Curl Calculator
Find the gradient, directional derivative, divergence, curl and scalar potential of fields, line integrals along curves, and check Green's, Gauss's and Stokes' theorems with both sides worked out.
About the Gradient, Divergence and Curl Calculator
The gradient ∇φ = (∂φ/∂x, ∂φ/∂y, ∂φ/∂z) points the way φ increases fastest, and its length is that fastest rate. The directional derivative along a unit vector â is ∇φ·â, and ∇φ/|∇φ| is the unit normal to the surface φ = constant.
For a vector field F = P i + Q j + R k, the divergence ∇·F = P_x + Q_y + R_z measures outflow (F is solenoidal when it is 0) and the curl ∇×F measures rotation (F is irrotational when it is 0, and then F = ∇φ for a scalar potential φ).
The formula
∇φ = (φ_x, φ_y, φ_z); ∇·F = P_x + Q_y + R_z; ∇×F = (R_y − Q_z, P_z − R_x, Q_x − P_y)
- Directional derivative
- ∇φ·a/|a|
- Irrotational
- ∇×F = 0 ⇔ F = ∇φ
- Solenoidal
- ∇·F = 0
Worked example
φ = x²yz + 4xz² at (1, −2, −1), along 2i − j − 2k
- ∇φ = (2xyz + 4z², x²z, x²y + 8xz) = (8, −1, −10)
- |a| = 3, so ∇φ·a/|a| = (16 + 1 + 20)/3 = 37/3
Questions people ask
Why is the curl of a gradient always zero?
Because mixed partial derivatives are equal: (φ_y)_z = (φ_z)_y and so on. Likewise the divergence of a curl is always zero.
How is the scalar potential found?
Integrate P with respect to x, then add the parts of Q and R that depend only on y and z: the textbook method. The answer is checked by taking its gradient.