Compute divergence of 2D/3D vector fields analytically. Step‑by‑step partial derivatives, symbolic results, and interactive visualization.
In vector calculus, the divergence of a vector field F is a scalar measure of the field's tendency to originate from or converge into a point. Physically, it represents the net flux per unit volume.
Mathematical definition (Cartesian):
∇·F = ∂P/∂x + ∂Q/∂y + ∂R/∂z
For 2D fields: ∇·F = ∂P/∂x + ∂Q/∂y
Also known as Gauss's theorem, it relates the flux through a closed surface to the volume integral of divergence:
∮S F·dS = ∭V (∇·F) dV
This calculator: Uses symbolic differentiation (nerdamer) to compute exact partial derivatives. Handles polynomials, trig, exponentials, logarithms, and compositions. Displays step‑by‑step derivatives and the final divergence expression.
sqrt(x^2+y^2+z^2) or r as a variable (if you define r). The symbolic engine can handle expressions like x / sqrt(x^2+y^2+z^2). Example: inverse‑square field (x/r³, y/r³, z/r³) can be entered as x/(x^2+y^2+z^2)^(3/2).
x^2 x²
sin(x), cos(y), tan(z)
exp(x) eˣ
log(x) ln(x)
sqrt(x^2+y^2) distance
abs(x) caution: not differentiable