WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

A Discrete Green's Theorem

J
K
L
M
N
O
P
Q
R
Generally speaking, Green's theorem states the connection between the line integral of two vector fields on an edge of a domain and the double integral of a linear combination of the vector fields' partial derivatives over the interior of the domain. The discrete Green's theorem resembles Green's theorem in the sense that it also states the connection between (discrete) summation of values of a function over a domain's edge, and the double integral of a linear combination of the function's derivative over the interior of the domain. The theorem allows us to efficiently calculate a function's double integral in a "generalized rectangular domain", that is, a domain that consists of a union of rectangles with sides parallel to the axes. The formulation of the theorem is as follows: let
f
be an integrable function, and suppose that its local antiderivative,
F(x,y)
y
v0
x
u0
f(u,v)dudv
, was pre-calculated. Then in order to calculate the function's double integral over a generalized rectangular domain
D
, only a few arithmetical operations are required:
D
fdxdy
(x,y)
α
D
(x,y)F(x,y)
,
where the summation
(x,y)C(D)
is over the domain's corners and
α
D
{±1,±2}
is a parameter that is determined according to the corner's type (see the Details section).
In the above graph, we are given an arbitrary integrable function
f
and a domain
D
over which it is defined, for which the discrete Green's theorem states that
D
fdxdyF(J)-2F(K)+F(L)-F(M)+F(N)-F(O)+F(P)+F(Q)-F(R)
.
In this Demonstration, you can choose any of the vertices
J
,
K
,
L
,
M
,
N
,
O
,
P
,
Q
,
R
for the linear combination; this will help to give an intuitive understanding of the formula. The darker the color of a region (green or red), the more times it is being covered by the linear combination's matching double integrals.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.