Green’s Theorem

Author

Eric W. Weisstein
October 27, 2012

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Calculus/GreensTheorem.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/GreensTheorem.html.

©2012 Wolfram Research, Inc. except for portions noted otherwise

Area in 2D

<<MathWorld`Polyhedra`

Green's function choices

{-y/2,x/2}

With[{PQ={-y/2,x/2}},{Curl[PQ,{x,y}],PQ.{dx,dy}//Simplify}]

{0, x}

With[{PQ={0,x}},{Curl[PQ,{x,y}],PQ.{dx,dy}//Simplify}]

{-y, 0}

With[{PQ={-y,0}},{Curl[PQ,{x,y}],PQ.{dx,dy}//Simplify}]

Curves

Astroid

With[{f=a Cos[t]^3,g=a Sin[t]^3,t0=0,t1=2π},
{
Integrate[f D[g,t]-g D[f,t],{t,t0,t1}]/2,
Integrate[-g D[f,t],{t,t0,t1}],
Integrate[f D[g,t],{t,t0,t1}]
}
]

AreaInertiaTensor[{a Cos[t],a Sin[t]},{t,0,2π}]

Circle

With[{f=a Cos[t],g=a Sin[t],t0=0,t1=2π},
{
Integrate[f D[g,t]-g D[f,t],{t,t0,t1}]/2,
Integrate[-g D[f,t],{t,t0,t1}],
Integrate[f D[g,t],{t,t0,t1}]
}
]

AreaInertiaTensor[{a Cos[t]^3,a Sin[t]^3},{t,0,2π}]

Ellipse

With[{f=a  Cos[t],g=b Sin[t],t0=0,t1=2π},
{
Integrate[f D[g,t]-g D[f,t],{t,t0,t1}]/2,
Integrate[-g D[f,t],{t,t0,t1}],
Integrate[f D[g,t],{t,t0,t1}]
}
]

AreaInertiaTensor[{a Cos[t],b Sin[t]},{t,0,2π}]

Moment in 2D

{-(y^2)/2, 0}

With[{PQ={-(y^2)/2,0}},{Div[PQ,{x,y}],PQ.{dx,dy}//Simplify}]

With[{PQ={-(y^2)/2,0}},{Div[PQ,{x,y}],PQ.{dx,dy}//Simplify}]

With[{PQ={0,(x^2)/2}},{Curl[PQ,{x,y}],PQ.{dx,dy}//Simplify}]

Centroid in 3D

f={a x^2/2+b x y+c x z,0,0};

Div[{x^2/2,0,0},{x,y,z}]

Div[{x y,0,0},{x,y,z}]

Div[{x z,0,0},{x,y,z}]

res=Total[IntegrateOverPolygon[Function[{x,y,z},{a x^2/2+b x y+c x z,0,0}],#]&/@PolyhedronData["Cube","Faces","Polygon"]]

D[res,#]&/@{a,b,c}

res=Total[IntegrateOverPolygon[Function[{x,y,z},{a x^2/2+b x y+c x z,0,0}],#]&/@PolyhedronData["Octahedron","Faces","Polygon"]]

D[res,#]&/@{a,b,c}

res=IntegrateOverPolygon[Function[{x,y,z},{a x^2/2+b x y+c x z,0,0}],Polygon[{{x1,y1,z1},{x2,y2,z2},{x3,y3,z3}}]]

D[res,#]&/@{a,b,c}

Mean cylindrical radius

DSolve[Derivative[1,0,0][F][x,y,z]==(Sqrt[(x^2)+(y^2)]),F[x,y,z],{x,y,z}]

Div[{(1/2) x (Sqrt[(x^2)+(y^2)])-(1/2) (y^2) Log[-x+(Sqrt[(x^2)+(y^2)])],0,0},{x,y,z}]//FullSimplify

Cube

IntegrateOverPolygon by hand

(faces=IntegrateOverPolygon[Function[{x,y,z},{(1/2) x (Sqrt[(x^2)+(y^2)])-(1/2) (y^2) Log[-x+(Sqrt[(x^2)+(y^2)])],0,0}],#]&/@PolyhedronData["Cube","Faces","Polygon"])//Timing

Total[faces]//FullSimplify

PolyhedronData["Cube","MeanCylindricalRadius"]

MeanCylindricalRadius

(rxy=MeanCylindricalRadius[PolyhedronData["Cube","Polyhedron"]])//Timing

(rxy=MeanCylindricalRadius[PolyhedronData["Cube","Polyhedron"],Debug->True])//Timing

Simplify[rxy]

PolyhedronData["Cube","MeanCylindricalRadius"]

Octahedron

(rxy=MeanCylindricalRadius[PolyhedronData["Octahedron","Polyhedron"],Debug->True])//Timing

Simplify[rxy]

PolyhedronData["Octahedron","MeanCylindricalRadius"]

Mean square cylindrical radius

<<MathWorld`Polyhedra`

Div[{x^3/3+y^2x,0,0},{x,y,z}]

data=Monitor[
{
p=#,
PolyhedronData[#,"MeanSquareCylindricalRadius"],
TimeConstrained[N[MeanSquareCylindricalRadius[PolyhedronData[#,"Polyhedron"]],20],60]
}&/@Select[PolyhedronData["AllOrientations"],PolyhedronData[#,"Simple"]&],
p];//Quiet//Timing

Select[data,Not@*FreeQ[$Aborted]]

Select[{#,Abs[#2-#3]}&@@@data,#>1*^-15&]

Mean spherical radius

DSolve[Derivative[1,0,0][F][x,y,z]==(Sqrt[(x^2)+(y^2)+(z^2)]),F[x,y,z],{x,y,z}]

Div[{(1/2) (x (Sqrt[(x^2)+(y^2)+(z^2)])-((y^2)+(z^2)) Log[(Sqrt[(x^2)+(y^2)+(z^2)])-x]),0,0},{x,y,z}]//FullSimplify

(faces=IntegrateOverPolygon[Function[{x,y,z},{(1/2) (x (Sqrt[(x^2)+(y^2)+(z^2)])-((y^2)+(z^2)) Log[(Sqrt[(x^2)+(y^2)+(z^2)])-x]),0,0}],#]&/@PolyhedronData["Cube","Faces","Polygon"])//Timing

Total[faces]//FullSimplify

PolyhedronData["Cube","MeanSphericalRadius"]

Mean square spherical radius

Div[{x^3/3+y^2x+z^2x,0,0},{x,y,z}]

data=Monitor[
{
p=#,
PolyhedronData[#,"MeanSquareSphericalRadius"],
TimeConstrained[N[MeanSquareSphericalRadius[PolyhedronData[#,"Polyhedron"]],20],60]
}&/@Select[PolyhedronData["AllOrientations"],PolyhedronData[#,"Simple"]&],
p];//Quiet//Timing

Select[data,Not@*FreeQ[$Aborted]]

Select[{#,Abs[#2-#3]}&@@@data,#>1*^-15&]

InertiaTensor in 3D

Div[{x^2 y/2,0,0},{x,y,z}]

Div[{y x z,0,0},{x,y,z}]

Div[{x^2 z/2,0,0},{x,y,z}]

Div[{x^3/3,0,0},{x,y,z}]

Div[{y^2 x,0,0},{x,y,z}]

Div[{z^2 x,0,0},{x,y,z}]

Div[{y^2x+z^2x,0,0},{x,y,z}]

Div[{x^3/3+y^2x+z^2x,0,0},{x,y,z}]

<<MathWorld`Polyhedra`

f={(a^2 x^3)/3+a b x^2 y+b^2 x y^2+a c x^2 z+2 b c x y z+c^2 x z^2,0,0};

div=Div[f,{x,y,z}]

Outer[d[g,#1,#2]&,{a,b,c},{a,b,c}]

res=Outer[D[f/2,#1,#2]&,{a,b,c},{a,b,c}]

Factor[IdentityMatrix[3] Tr[res]-res]

D[f,a,b]

Curl[{(a^2 x^3)/3+a b x^2 y+b^2 x y^2+a c x^2 z+2 b c x y z+c^2 x z^2,0,0},{x,y,z}]

IntegrateOverPolygon[Function[{x,y,z},{(a^2 x^3)/3+a b x^2 y+b^2 x y^2+a c x^2 z+2 b c x y z+c^2 x z^2,0,0}],#]&/@PolyhedronData["Cube","Faces","Polygon"]

Total[%]

IntegrateOverPolygon[Function[{x,y,z},{a x^2/2+b x y+c x z,0,0}],Polygon[{{x1,y1,z1},{x2,y2,z2},{x3,y3,z3}}]]

Volume in 3D

Div[{x,0,0},{x,y,z}]

res=IntegrateOverPolygon[Function[{x,y,z},{x,0,0}],#]&/@PolyhedronData["Cube","Faces","Polygon"]

Total[res]

IntegrateOverPolygon[Function[{x,y,z},{x,0,0}],Polygon[{{x1,y1,z1},{x2,y2,z2},{x3,y3,z3}}]]

IntegrateOverPolygon[Function[{x,y,z},{x,y,z}],Polygon[{{x1,y1,z1},{x2,y2,z2},{x3,y3,z3}}]]