Green's Theorem

This notebook describes how to compute line integrals over closed paths using Green's Theorem in Mathematica. 

The function in this notebook is set up to be easily cut-and-pasted so you can easily experiment with them.

TO SEE WHAT THIS NOTEBOOK PROVIDES:
- Select Kernel|Evaluation|Evaluate_Notebook to execute all the cell and produce the graphics.
- Then scroll through reading the commands and associated comments while you look at the commands' results.
- All input cells are set up such that they can be cut-and-pasted in their entirety for easy "re-use".

The material in this notebook was originally developed by Capt Rob Wolverton and was re-formatted into a tutorial by Lt Col Steve Hadfield, both of the USAF Academy, Dept of Mathematical Sciences.	
Filename: greens_theorem.nb

Compute Line Integral over a Closed Path using Green's Theorem

The code below calculates a line integral over a closed path, \(TraditionalForm
      \`∫\_C\%□ F . dR\), by using Green's Theorem to evaluate the equivalent integral, \(TraditionalForm
      \`\(\(∫\_D
          \%□\((∂\_x\ g - ∂\_y\ f)\) 
          dA, \)\ \)\)where D is the region enclosed by the closed path and the vector field F=<f,g>.  Actually, it is more convenient in Mathematica to augment F to a 3D vector field and take the curl of this augmented vector field dot producted with the vector, <0,0,1>, which is equivalent to ((∂_x) g - (∂_y) f).   Here's how the code does it:
Line 1 - Clears any previous symbol definitions to avoid conflicts.
Line 2 - Loads the Calculus`VectorAnalysis` package which is needed for the Curl function.
Line 3 - Defines the vector field.
Line 4 - Computes the Curl of the vector field (in Cartesian coordinates--must specify this).
Line 5 - Calculates the Green's Theorem double integral that is equivalent to the line integral over the closed path.

Clear[F,  CuF, x, y, z]Needs["Calculus`VectorAnalysis`"]F[x_, y_, z_] := {y*Cos[x], -y^3, 0}CuF[x_, y_, z_] := Curl[F[x, y, z], Cartesian[x, y, z]]\(∫\_\(-1\)\%0
        \(∫\_0\%1 CuF[x, y, z] . {0, 0, 1} \[DifferentialD]y 
          \[DifferentialD]x\)
\)