Gradient Divergence Curl Calculator
Our free calculus calculator solves gradient divergence curl problems. Get worked examples, visual aids, and downloadable results.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Gradient Divergence Curl Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: div(F) = dF1/dx + dF2/dy + dF3/dz; curl(F) = nabla x F
Worked example โ Divergence = 9 (source) | Curl = (-3, 0, -2) with magnitude 3.606 | Not irrotational, not solenoidal
Formula
div(F) = dF1/dx + dF2/dy + dF3/dz; curl(F) = nabla x F
For a linear vector field F = (ax+by+cz, dx+ey+fz, gx+hy+iz), the divergence is a+e+i (trace of the Jacobian), the curl is (h-f, c-g, d-b), and the Jacobian determinant measures local volume scaling.
Worked Examples
Example 1: Electromagnetic Field Analysis
Problem:Given vector field F = (2x + y, -x + 3y + z, -2y + 4z), compute gradient, divergence, and curl at point (1, 2, 3).
Solution:Field at (1,2,3): F = (2(1)+2, -(1)+3(2)+3, -2(2)+4(3)) = (4, 8, 8) Divergence: dF1/dx + dF2/dy + dF3/dz = 2 + 3 + 4 = 9 (source present) Curl: (dF3/dy - dF2/dz, dF1/dz - dF3/dx, dF2/dx - dF1/dy) = (-2 - 1, 0 - 0, -1 - 1) = (-3, 0, -2) Curl magnitude: sqrt(9 + 0 + 4) = 3.606 Jacobian determinant: 2(12-(-2)) - 1(-4-0) + 0 = 28 + 4 = 32
Result:Divergence = 9 (source) | Curl = (-3, 0, -2) with magnitude 3.606 | Not irrotational, not solenoidal
Example 2: Conservative Field Verification
Problem:Check if F = (2x, 2y, 2z) is conservative and solenoidal at point (1, 1, 1).
Solution:Coefficients: a=2, b=0, c=0, d=0, e=2, f=0, g=0, h=0, i=2 Divergence: 2 + 2 + 2 = 6 (not solenoidal, acts as source) Curl: (0-0, 0-0, 0-0) = (0, 0, 0) (irrotational = conservative!) This means F = grad(phi) where phi = x^2 + y^2 + z^2. Field at (1,1,1): F = (2, 2, 2), magnitude = 2*sqrt(3) = 3.464 Jacobian determinant: 2(4-0) - 0 + 0 = 8
Result:Curl = (0,0,0): Field is conservative. Divergence = 6: Not solenoidal. Potential function: phi = x^2 + y^2 + z^2
Frequently Asked Questions
What is the gradient of a scalar field and what does it represent?
The gradient of a scalar field is a vector that points in the direction of the greatest rate of increase of the function at any given point. Its magnitude equals the rate of change in that direction. Mathematically, for a scalar function f(x,y,z), the gradient is the vector (df/dx, df/dy, df/dz). Think of a topographic map where the scalar field represents altitude: the gradient at any point tells you the steepest uphill direction and how steep the slope is. The gradient is always perpendicular to level curves (contour lines) of the function. In physics, the gradient relates forces to potential energy, as the force equals the negative gradient of potential energy.
What does divergence measure in a vector field?
Divergence measures the net outward flux per unit volume at a point in a vector field, essentially quantifying how much the field is spreading out or converging at that location. A positive divergence means the field acts as a source (vectors spread outward), while negative divergence indicates a sink (vectors converge inward). Zero divergence means the field is incompressible or solenoidal. Mathematically, div(F) = dF1/dx + dF2/dy + dF3/dz. In fluid dynamics, divergence of the velocity field tells you whether fluid is being created or destroyed at a point. In electromagnetism, the divergence of the electric field is proportional to the charge density (Gauss law).
What is the curl of a vector field and when is it important?
The curl of a vector field measures the rotational tendency or circulation density at each point. It produces a new vector whose direction is the axis of rotation and whose magnitude indicates the rotation strength. Mathematically, curl(F) = (dF3/dy - dF2/dz, dF1/dz - dF3/dx, dF2/dx - dF1/dy). In fluid mechanics, the curl of the velocity field gives the vorticity, which describes local spinning motions. In electromagnetism, the curl of the electric field equals the negative time derivative of the magnetic field (Faraday law), and the curl of the magnetic field relates to current density (Ampere law). A field with zero curl everywhere is called irrotational or conservative.
What is the Jacobian matrix and why is its determinant significant?
The Jacobian matrix is the matrix of all first-order partial derivatives of a vector-valued function. For a vector field F = (F1, F2, F3), the Jacobian is a 3x3 matrix where element (i,j) equals the partial derivative of the i-th component with respect to the j-th variable. The Jacobian determinant measures how the transformation locally scales volumes: a determinant of 2 means volumes double, while a negative determinant indicates orientation reversal. It is essential in coordinate transformations (like converting between Cartesian and spherical coordinates), computing changes of variables in multiple integrals, and analyzing the local behavior of dynamical systems near equilibrium points.
When is a vector field conservative and how can you test for it?
A vector field is conservative (also called irrotational or a gradient field) when its curl is zero everywhere in a simply connected domain. This means the field can be expressed as the gradient of some scalar potential function. Conservative fields have the important property that line integrals between two points are path-independent, depending only on the endpoints. The work done around any closed loop is zero. To test: compute curl(F) and check if all three components are zero. Equivalently, verify that dF1/dy = dF2/dx, dF1/dz = dF3/dx, and dF2/dz = dF3/dy. Gravitational and electrostatic fields are classic examples of conservative vector fields in physics.
What does it mean for a vector field to be solenoidal?
A solenoidal vector field has zero divergence everywhere, meaning there are no sources or sinks in the field. Field lines in a solenoidal field never begin or end; they either form closed loops or extend to infinity. The magnetic field is always solenoidal (div B = 0), which is one of Maxwell equations and reflects the fact that magnetic monopoles do not exist. An incompressible fluid flow is also solenoidal because fluid is neither created nor destroyed. Solenoidal fields can always be expressed as the curl of another vector field (called the vector potential). The condition div(F) = 0 acts as a constraint that reduces the degrees of freedom in the field.
How do gradient, divergence, and curl relate to Maxwell equations?
Maxwell four equations of electromagnetism are elegantly expressed using these vector calculus operators. Gauss law for electricity states that div(E) = rho/epsilon_0, relating the divergence of the electric field to charge density. Gauss law for magnetism states div(B) = 0, meaning the magnetic field is always solenoidal. Faraday law states curl(E) = -dB/dt, connecting the curl of the electric field to changing magnetic fields. Ampere-Maxwell law states curl(B) = mu_0*J + mu_0*epsilon_0*dE/dt, relating the curl of the magnetic field to current density and changing electric fields. These operators thus form the mathematical foundation of all electromagnetic theory.
What is the relationship between divergence theorem and Stokes theorem?
The divergence theorem (Gauss theorem) and Stokes theorem are both generalizations of the fundamental theorem of calculus to higher dimensions. The divergence theorem converts a volume integral of divergence into a surface integral of flux: the integral of div(F) over a volume V equals the integral of F dot n over the bounding surface S. Stokes theorem converts a surface integral of curl into a line integral: the integral of curl(F) dot dS over surface S equals the line integral of F dot dr around the boundary curve C. Both theorems relate an integral over a region to an integral over its boundary, and both are special cases of the generalized Stokes theorem from differential forms.
How is the Laplacian operator related to gradient and divergence?
The Laplacian operator is the divergence of the gradient, written as div(grad(f)) or nabla-squared f. For a scalar field f(x,y,z), the Laplacian equals the sum of second partial derivatives: d2f/dx2 + d2f/dy2 + d2f/dz2. The Laplacian measures how much the value of f at a point deviates from the average value in its neighborhood. It appears in many fundamental equations of physics: the heat equation (df/dt = k nabla^2 f), the wave equation (d2f/dt2 = c^2 nabla^2 f), and Laplace equation (nabla^2 f = 0) which describes steady-state potential fields. A function satisfying Laplace equation is called harmonic and has no local extrema in its interior.
Can gradient, divergence, and curl be computed in non-Cartesian coordinate systems?
Yes, all three operators can be expressed in any orthogonal coordinate system, though the formulas become more complex due to scale factors. In cylindrical coordinates (r, theta, z), the gradient involves 1/r factors, and divergence includes an extra 1/r term. In spherical coordinates (r, theta, phi), the expressions are even more involved with 1/r and 1/r*sin(theta) scale factors. These coordinate-specific formulas are derived using the metric tensor or by applying chain rule transformations. Choosing the right coordinate system can dramatically simplify calculations: problems with cylindrical symmetry are easiest in cylindrical coordinates, and problems with spherical symmetry are easiest in spherical coordinates.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎGradient Calculator
Calculate gradient with inputs, formulas, and instant results.
๐งฎGradient Field Plotter
Calculate gradient field plotter with inputs, formulas, and instant results.
๐งฎDivergence Calculator
Calculate the divergence of a vector field from its component partial derivatives.
๐งฎCurl Calculator
Calculate the curl of a vector field for rotation analysis in 3D.
๐งฎAnnulus Area Calculator
Calculate annulus area with inputs, formulas, and instant results.
๐งฎArea Calculator
Calculate area with inputs, formulas, and instant results.
๐งฎArea of a Rectangle Calculator
Calculate the area, perimeter, and diagonal of a rectangle. Find missing sides from known area. Convert between metric and imperial area units.
๐งฎArea of Crescent Calculator
Calculate area of crescent with inputs, formulas, and instant results.