How this calculation works
For a counterclockwise simple boundary, Green’s theorem replaces circulation along the boundary with an area integral of scalar curl. This tool differentiates supported polynomials and integrates them analytically over the selected region using floating-point arithmetic.
∮(P dx + Q dy) = ∬(∂Q/∂x − ∂P/∂y) dA for positive orientationA worked example
For P = −y and Q = x, scalar curl is 2. The rectangle 0 ≤ x ≤ 2, 0 ≤ y ≤ 1 has area 2, giving counterclockwise integral 4.
Good to know
Only polynomial fields with total degree at most 20 and the listed simple regions are supported. No holes, rotated ellipses, arbitrary boundaries, singular fields, trigonometric functions or general computer algebra.
Reference: Harvard Mathematics: Green’s theorem lecture handout (opens in a new tab) ↗
Why an outline can reveal an area
The vector field calculator shows sampled arrows and local divergence and scalar curl. It does not replace the region integral computed by Green’s theorem.
Choose P = −y/2 and Q = x/2. The scalar curl is 1, so the counterclockwise line integral equals the enclosed area. This is a striking special case: information accumulated around a boundary can measure what is inside.
A planimeter is a mechanical area-measuring instrument that follows an outline. The connection between line integrals and area helps explain its mathematical principle. The Harvard lecture reference discusses that application alongside Green’s theorem.
The area of a rectangle can independently check the integration region in the rectangular case; the line integral still also depends on the entered field and orientation. The vector line integral calculator for parametric curves instead integrates an explicitly entered path with symbolic velocity and Simpson quadrature. The selected path and orientation remain part of that task.
Read more: Harvard Mathematics: Green’s theorem and the planimeter (opens in a new tab) ↗
The direction of travel changes the sign
For a simple region without holes, positive orientation means traversing its boundary counterclockwise, with the interior on your left. Reversing the boundary reverses the circulation integral. It does not make the geometric area negative.
The result panel keeps the region area separate and labels the oriented line integral. Try the same field with both direction selections: the circulation changes sign while the area remains unchanged.
A useful polynomial test you can check by hand
For P = −y and Q = x, differentiating gives ∂Q/∂x = 1 and ∂P/∂y = −1. The difference is 2, so the integral is twice the region’s area for counterclockwise orientation. On a rectangle of width 2 and height 1, the answer is 4.
For an ellipse with semiaxes 2 and 1, the same field gives 4π. A circle is the special case where both semiaxes match. Moving the ellipse does not change this constant-curl example because its area stays the same.
What this solver supports
Enter polynomial expressions in x and y with non-negative integer powers and total degree at most 20. Parentheses, ordinary multiplication, implicit forms such as 2x, and division by nonzero numeric constants are supported. The solver does not execute arbitrary code or accept a general function library.
The listed regions are rectangles and axis-aligned ellipses. Arbitrary curved boundaries, holes and singular vector fields need additional analysis. Polynomial fields are smooth, but that fact does not extend a result to a different nonsmooth field copied into the same problem.
A few questions, answered
Can I enter sin(x), exp(y) or 1/x?
No. This implementation is restricted to polynomials and constant division. Unsupported expressions are rejected explicitly.
Does it numerically sample the boundary?
No. It differentiates the polynomial and uses analytic polynomial area integrals evaluated with floating-point arithmetic.
Can I use a clockwise boundary?
Yes. Select Clockwise; the result negates the corresponding counterclockwise area integral.
How is an ellipse specified?
Enter its centre and positive horizontal and vertical semiaxes. The ellipse is axis-aligned; a rotated ellipse is outside this input model.