Divergence Calculator
Calculate the divergence of any 2D or 3D vector field with step-by-step partial derivatives. Enter the component functions, get the symbolic divergence, evaluate it at a point, identify sources and sinks, and view a heat map.
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by upgrading for ad-free browsing and more daily uses, or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade for ad-free browsing and higher daily limits
About Divergence Calculator
The Divergence Calculator computes the divergence ∇·F of any 2D or 3D vector field with full step-by-step partial derivative computation. Enter your vector field components P, Q (and R for 3D), optionally evaluate at a specific point, and get the symbolic divergence, source/sink classification, and for 2D fields, an interactive visualization with a divergence heat map and animated particle flow.
What Is Divergence?
The divergence of a vector field \(\mathbf{F}\) is a scalar-valued operator that measures the rate at which the field "spreads out" from a point. For a 3D vector field \(\mathbf{F} = \langle P, Q, R \rangle\):
$$\nabla \cdot \mathbf{F} = \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} + \frac{\partial R}{\partial z}$$
For a 2D field \(\mathbf{F} = \langle P, Q \rangle\), the divergence is \(\frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y}\). Divergence is a fundamental concept in vector calculus, fluid dynamics, electromagnetism, and differential equations.
Physical Meaning of Divergence
Divergence Formulas and Coordinate Systems
| Coordinate System | Divergence Formula |
|---|---|
| Cartesian 2D | \(\nabla \cdot \mathbf{F} = \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y}\) |
| Cartesian 3D | \(\nabla \cdot \mathbf{F} = \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} + \frac{\partial R}{\partial z}\) |
| Cylindrical | \(\nabla \cdot \mathbf{F} = \frac{1}{r}\frac{\partial(rF_r)}{\partial r} + \frac{1}{r}\frac{\partial F_\theta}{\partial \theta} + \frac{\partial F_z}{\partial z}\) |
| Spherical | \(\nabla \cdot \mathbf{F} = \frac{1}{r^2}\frac{\partial(r^2 F_r)}{\partial r} + \frac{1}{r\sin\theta}\frac{\partial(\sin\theta\, F_\theta)}{\partial \theta} + \frac{1}{r\sin\theta}\frac{\partial F_\phi}{\partial \phi}\) |
Important Identities Involving Divergence
| Identity | Formula |
|---|---|
| Linearity | \(\nabla \cdot (a\mathbf{F} + b\mathbf{G}) = a(\nabla \cdot \mathbf{F}) + b(\nabla \cdot \mathbf{G})\) |
| Product rule (scalar × vector) | \(\nabla \cdot (f\mathbf{F}) = f(\nabla \cdot \mathbf{F}) + \mathbf{F} \cdot (\nabla f)\) |
| Curl of gradient | \(\nabla \cdot (\nabla \times \mathbf{F}) = 0\) (always) |
| Laplacian | \(\nabla \cdot (\nabla f) = \nabla^2 f\) (divergence of gradient = Laplacian) |
| Divergence theorem | \(\displaystyle\iiint_V (\nabla \cdot \mathbf{F})\,dV = \unicode{x222F}_S \mathbf{F} \cdot d\mathbf{S}\) |
Applications of Divergence
| Field | Application | What Divergence Represents |
|---|---|---|
| Electromagnetism | Gauss's Law | \(\nabla \cdot \mathbf{E} = \rho/\varepsilon_0\) — charge density creates electric field divergence |
| Electromagnetism | Magnetic field | \(\nabla \cdot \mathbf{B} = 0\) — no magnetic monopoles exist |
| Fluid Dynamics | Continuity equation | \(\nabla \cdot \mathbf{v} = 0\) for incompressible flow |
| Heat Transfer | Heat equation | Divergence of heat flux relates to temperature change |
| General Relativity | Einstein field equations | Divergence-free condition on stress-energy tensor |
How to Use the Divergence Calculator
- Choose dimension: Select 2D for fields F = ⟨P, Q⟩ or 3D for F = ⟨P, Q, R⟩ using the toggle buttons.
- Enter component functions: Type each component function (P, Q, and optionally R) using standard notation. Use
^for exponents,*for multiplication, and functions likesin(x),cos(y),exp(x),ln(x),sqrt(x). Implicit multiplication is supported (e.g.,2x=2*x). - Enter an evaluation point (optional): Provide comma-separated coordinates to evaluate the divergence numerically and classify the point as a source, sink, or incompressible.
- Click Compute Divergence: View the symbolic divergence formula, step-by-step partial derivative computation, numerical evaluation, and source/sink classification.
- Explore the visualization: For 2D fields, view the vector field arrows with a color-coded divergence heat map (red = source, blue = sink) and animated particle flow showing the field behavior.
Worked Example
Find the divergence of \(\mathbf{F}(x, y) = \langle x, y \rangle\) at the point \((1, 1)\):
Step 1: Identify components: \(P = x\), \(Q = y\).
Step 2: Compute partial derivatives: \(\frac{\partial P}{\partial x} = 1\), \(\frac{\partial Q}{\partial y} = 1\).
Step 3: Sum them: \(\nabla \cdot \mathbf{F} = 1 + 1 = 2\).
Interpretation: Since \(\nabla \cdot \mathbf{F} = 2 > 0\), every point is a source. The field uniformly expands outward — imagine fluid being pumped out everywhere in the plane.
FAQ
Reference this content, page, or tool as:
"Divergence Calculator" at https://MiniWebtool.com/divergence-calculator/ from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: 2026-04-08
You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.
Calculus:
- Average Rate of Change Calculator New
- Bernoulli ODE Solver New
- Convolution Calculator
- Curl Calculator New
- Curvature Calculator
- Derivative Calculator
- Direction Field / Slope Field Plotter New
- Directional Derivative Calculator
- Divergence Calculator New
- Double Integral Calculator
- Euler's Method Calculator New
- Fast Fourier Transform (FFT) Calculator New
- First-Order ODE Solver New
- Fourier Series Coefficients Calculator
- Gradient Calculator (Multivariable) New
- Implicit Derivative Calculator
- Improper Integral Calculator New
- Infinite Series Sum Calculator New
- Instantaneous Rate of Change Calculator New
- Integral Calculator
- Inverse Laplace Transform Calculator
- L'Hôpital's Rule Calculator New
- Laplace Transform Calculator
- Limit Calculator Popular
- Line Integral Calculator New
- Maclaurin Series Calculator New
- Newton's Method Calculator New
- Numerical Integration Calculator New
- Optimization Calculator (Calculus) New
- Partial Derivative Calculator
- Power Series Calculator New
- Radius of Convergence Calculator
- Related Rates Solver New
- Riemann Sum Calculator New
- Runge-Kutta (RK4) Method Calculator
- Second-Order ODE Solver New
- Series Convergence Test Calculator New
- Simpson's Rule Calculator New
- Single Variable Derivative Calculator
- Surface Integral Calculator New
- Surface of Revolution Calculator New
- System of ODEs Solver New
- Taylor Series Calculator
- Trapezoidal Rule Calculator New
- Triple Integral Calculator
- Volume of Revolution Calculator New
- Wronskian Calculator
- Z-Transform Calculator New