# What is the curl of a vector field?

Finds the curl and divergence of a vector field, checked numerically.

- Page: https://www.acalculator.org/math/curl-calculator
- JSON spec: https://www.acalculator.org/math/curl-calculator.json
- Version: 6ddb516066dc

## Default answer

Example with the default inputs (P (i component) x^2 z, Q (j component) e^y + x z, R (k component) x y z): The curl of (x^2 z, e^y + x z, x y z) is (x z - x, x^2 - y z, z).

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| p | P (i component) | The P component, a function of x, y and z. |
| q | Q (j component) | The Q component, a function of x, y and z. |
| r | R (k component) | The R component, a function of x, y and z. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| curl | curl F | The curl (R_y − Q_z, P_z − R_x, Q_x − P_y). |
| div | div F | The divergence P_x + Q_y + R_z. |

## Method

curl F = (R_y − Q_z, P_z − R_x, Q_x − P_y), each partial derivative from a CAS, checked.

## Assumptions

- Radians. An answer that fails its check is not shown.

## Worked examples

1. p = x^2 z, q = e^y + x z, r = x y z gives curl = (x z - x, x^2 - y z, z). Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 6.5, Ex. 6.52.
2. p = y z, q = x z, r = x y gives curl = (0, 0, 0), div = 0. Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 6.5, Ex. 6.56.
3. p = e^x, q = y z, r = -y z^2 gives div = -2y z + z + e^x. Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 6.5, Ex. 6.48.

## FAQ

### What is the curl of a vector field?

The curl of F = (P, Q, R) is the vector field ∇ × F = (∂R/∂y − ∂Q/∂z, ∂P/∂z − ∂R/∂x, ∂Q/∂x − ∂P/∂y). It measures how much the field turns around each point: for the flow of a fluid, curl F is twice the angular velocity of a tiny paddle wheel at that point, and its direction is the axis of the spin.

### How do I find the curl of a 2D field?

Type the two components as P and Q and set R to 0. The curl is then (0, 0, ∂Q/∂x − ∂P/∂y), and its third component is the scalar curl used in Green’s theorem. For F = (y, 0) the curl is (0, 0, −1).

### What does a curl of 0 mean?

A field with curl 0 everywhere is irrotational. On a region with no holes (simply connected), such a field is conservative: it is the gradient of a potential function f, and line integrals of F depend only on the end points. F = (yz, xz, xy) has curl 0 and is the gradient of f = xyz.

### What is the divergence?

The divergence div F = ∂P/∂x + ∂Q/∂y + ∂R/∂z is a number at each point: the rate at which the field flows out of a small box around it. The page gives it too, from the same checked partial derivatives.

### How is the answer checked?

Each of the partial derivatives comes from a computer algebra system and must match a numeric difference quotient at 15 test points in x, y and z. Each simplified component must equal the unsimplified difference at the same points. An answer that fails is not shown.

### Why is my divergence not simplified to 0?

The page combines like terms and cancels equal terms, but it does not simplify every expression. For the gravitational field x/(x² + y² + z²)^(3/2) and so on, the divergence is 0 away from the origin, but the page may show it as a sum of fractions that add up to 0. The curl of that field shows as (0, 0, 0).

## Sources

- OpenStax, Calculus Volume 3, section 6.5 Divergence and Curl: https://openstax.org/books/calculus-volume-3/pages/6-5-divergence-and-curl
