 # Dragon Notes UNDER CONSTRUCTION
Latest content:
 Apr 05 Deep Learning Mar 19 Anomaly Detection - ML Mar 13 +Data Tables Mar 08 Clustering - Machine Learning Feb 28 Support Vector Machines - ML Feb 20 Regression - Data Science

# Stokes' Theorem  $$\boxed{\oint_{\partial S}{\overrightarrow{\boldsymbol{F}}\mathrm{\cdot }\ d\overrightarrow{\boldsymbol{l}}}=\iint_S {(\boldsymbol{\mathrm{\nabla }}\boldsymbol{\mathrm{\times }}\overrightarrow{\boldsymbol{F}})}\cdot d\overrightarrow{\boldsymbol{S}}}$$

The surface-integral of the normal component of the curl of a vector field over an open surface yields the circulation of the vector field around its bounding contour. Adjacent infinitesimal circulation densities cancel – leaving only the circulation components along the boundary curve, yielding the total circulation around that curve.

• (1) $$\vplup$$How does the surface integral of the curl of a vector field $$\b{F}$$ over a region $$D$$ enclosed by a simple closed curve $$C$$ yield the circulation of $$\b{F}$$ around $$C$$?
• (2) How may Green’s Theorem be applied to determine the area of an enclosed region? For vector fields with what properties is this possible?
• (3) Can Green’s Theorem be applied to determine the area of an enclosed region with holes? How?
• (4) Why does Green’s Theorem only apply to enclosed regions without discontinuities?
• (5) In Stokes’ Theorem, why is the circulation around a simple closed curve $$C$$ independent of the open surface enclosing it?
• (6) For a simple closed surface S and a vector field $$\b{F}$$ continuous over S, what is the value of

$$\ds{\oint_S{(\boldsymbol{\mathrm{\nabla }}\boldsymbol{\mathrm{\times }}\boldsymbol{\mathrm{\overrightarrow{F}}})\ {\cdot }}\ d\boldsymbol{\overrightarrow{S}}?}$$

What would be some of the implications if this value were anything else?
• (7) How is the curl of the vector field $$\bvec{F}=\left[\lfrac{-y}{x^2+y^2 }\right]\boldsymbol{\widehat{i}}+\left[\lfrac{x}{x^2+y^2 }\right]\boldsymbol{\widehat{j}}$$ (shown below), where it is defined, zero everywhere – but its circulation, where it is
defined, around a simple closed curve $$C$$ enclosing a region containing the origin, is not? What about curves not enclosing the origin?$$\hspace{80px}$$  • (8) In determining conservative vector fields in 3D, a hole within the region of interest is not a problem so long as it permits for some surface to be drawn within a region whose boundary is any simple closed curve within the region (but outside the discontinuity). That is, the discontinuity does not range continuously from one point of the enclosing surface to another – because then Stokes’ Theorem can be applied to test for conservativeness. In 2D, a curve can be drawn around a hole that does not range continuously from one point of the enclosing curve to another; why, then, is such a hole a problem in 2D but not in 3D?
• (9) Why must a curve/surface be simple & closed for Green's and Stokes' theorems to apply?

Prior to reading ahead, the following material is recommended as a requisite to understanding relevant content:
  Green's theorem  Curl  Curl components  Curl subtleties  Curl definition of line integral  Stokes' theorem  Conservative vector field  Conservative vector field determination  Conservative vector field, no circulation  Stokes' theorem orientation
Links include visualizations, animations, and intuitive breakdowns of concepts underlying Stokes' theorem and vector fields in general.



Consider the illustration below: Using a circular representation of circulations within the region enclosed by $$C$$, a mutual partial cancellation of oppositely-oriented circulations may be visualized as follows: (Circles separated for visualization purposes; imagine they are tangent at P)

A yet better representation utilizes squares instead of circles: Here, cancellation occurs not only at a point tangent to the two squares – but at all the points lying along the line shared by the two squares. Note that for a sub-region $$R_S$$ enclosed by a sub-curve $$C_S$$, only the boundary circulations will survive cancellation: The above illustration suggests that all of the internal (non-boundary) circulations will cancel – leaving only the boundary circulation components. Indeed, for any simple closed curve a simple closed region, all internal circulation components will cancel, leaving only the boundary circulation components – which sum to the net circulation of the vector field around the curve enclosing the region: Note that for all regions, 1 through 9, circulation arrows have been drawn counterclockwise. This is because from Green’s Theorem, assuming the region lies in the $$xy$$-plane,

$$\ds{\oint_C{\bnvec{F}\mathrm{\cdot }\ d\bvec{r}}=\iint_S {(\boldsymbol{\mathrm{\nabla }}\boldsymbol{\mathrm{\times }}\bnvec{F})\cdot k}\ dA.\ }$$

the circulation of $$\b{F}$$ around $$C$$ is defined to be positive counterclockwise. Note that from the concept of surface integrals, the right-hand integral in Eq.  above sums the products of infinitesimal circulation densities (call them ‘microcirculations’) and infinitesimal region area increments for the entire region $$D.$$ If the circulation arrows were drawn clockwise, each of the products would need to have the opposite sign – and thus the final integral would be opposite in sign as well. Also, for a single integration, the arrow orientations cannot alternate; that is, for integrating over a region $$D$$, if some sub-regions $$D_n$$ had circulation arrows going clockwise while others counterclockwise, the integral would be unable to account for those differences. (Doing so would require that the infinitesimal sums alternate in sign, whereas a single integral may only assume one sign.) With multiple integrals, aside from extra work, this is not a problem.
$$\vplLup$$Thus, all circulation arrows in drawn on curves enclosing sub-regions constituting the region of interest must be oriented in the same direction (for a single integration). For convenience, this orientation is counterclockwise by default (to save a step in taking the negative of the final answer).

Note that any circulation integral determines the net circulation of a vector field around a simple closed curve, rather than the instantaneous flow of the field along some portion of the closed curve.

Lastly, consider a visualization of the enclosed region for the limit as the ‘microcirculation’ approximation areas approach zero: As the ‘microcirculation’ area shrinks, the approximation becomes more accurate; when this area approaches zero, the approximation becomes exact – just as with Riemann sums for rectangles in finding areas under curves. As in Figure 1, all internal circulation components will cancel, leaving only the boundary components, yielding the circulation of the vector field around the closed curve.

In the first microcirculation representation using circles, using a finite approximation representation, circulation only cancels at up to four points per circle; for squares, cancellation occurs over all four sides (for non-boundary squares – three for boundary). Furthermore, non-boundary circles leave unfilled gaps among each other – whereas squares do not. Hence, squares serve better for visualization purposes – although by the line-integral definition of circulation, both can work – since both are simple, closed curves.

In summary,
The surface integral of the curl of a vector field F over a region $$D$$ enclosed by a simple closed curve $$C$$ results in the cancellation of all non-boundary components of infinitesimal circulations inside the region, leaving only those components which are tangent to the curve – thereby yielding the circulation of F around C.



Consider a region $$D_1$$ enclosed by a curve $$C_1$$ placed in a vector field $$\b{F}$$: The counterclockwise circulation around $$C$$ is given by $\oint_C{\bnvec{F}\mathrm{\cdot }d\boldsymbol{r}}=K\iint_D{dA}=KA_D,$ where $$A_D$$ is the area of the region $$D$$. For convenience, let $$K = 1$$. Which $$\b{F}$$ will satisfy this? For $$\bvec{F}=M\uvec{i}+N\uvec{j}+P\uvec{k}$$, it will be the $$\b{F}$$ for which $$\partial N/{\partial x}-\partial M/{\partial y}=1$$. One such $$\b{F}$$ is $$\bvec{F}=y\uvec{i}+2x\uvec{j}$$. Let $$C$$ be described by $$\bvec{r}(t)=[x(t)]\uvec{i}+[y(t)]\uvec{j}$$. Then, $\bnvec{F}\mathrm{\cdot }\ d\bvec{r}=(\bnvec{F}\mathrm{\cdot }\ \bvec{T})d\bvec{s}=F\left(x(t)t,y(t),z(t)\right)\mathrm{\cdot }\frac{[dx(t)dt]\uvec{i}+[dy(t)dt]\uvec{j}}{\left|{[dx(t)dt]\uvec{i}+[dy(t)dt]\uvec{j}}\right|}\left|\frac{dx(t)dt}{dt}\uvec{i}+\frac{dy(t)dt}{dt}\uvec{j}\right|dt$ $=\left(\left[y\right]\uvec{i}+\left[2x\right]\uvec{j}\right)\cdot \left(\left[dx\left(t\right)\right]\uvec{i}+\left[dy\left(t\right)\right]\uvec{j}\right)=ydx\left(t\right)+2xdy\left(t\right)$ Using a shorthand notation for differentials, the simplified expression for the area is $\boxed{A_D=\oint_C{y\ dx+2x\ dy}}$



Consider a region $$D_1$$ enclosed by a curve $$C_1$$ placed in a vector field $$\b{F}$$ with a hole $$D_2$$ enclosed by a curve $$C_2$$: If $$D$$ is the region $$D_1$$-$$D_2$$, in order to compute the area $$A_D$$, compute $$A_{D_1}-A_{D_2}$$ $\boxed{A_D = \oint_{C_1}{\left(ydx + 2x dy\right)} - \oint_{C_2}{\left(ydx + 2x dy\right)}}$ Graphically, this process is illustrated as follows; start with Fig. 2, region $$D_1$$. Then, consider $$D_2$$: ‘Cutting out’ $$D_2$$ yields From Fig. 1, the remaining circulation is This is sensible, since without cutting anything out, the circulation around every simple closed curve inside $$D_1$$ is zero due to internal cancellation: circulation arrows point both clockwise and counterclockwise for $$C_2$$ equally. When the counterclockwise circulation is subtracted from $$C_2$$’s total circulation, only the clockwise component remains – as seen in Fig. 3.



At the point(s) of discontinuity, the microcirculation is not defined; thus, when the surface integral sums products of infinitesimal area elements and the vector field, it will be unable to account for the circulation contribution of the undefined point(s), and internal microcirculation cancellation will not occur. See answer to Question 7, where curl $$\b{F}$$ is zero yet circulation around a curve enclosing the point of discontinuity is not zero.



Consider Fig. 2 stretched in 3D; no matter how much it is distorted, as long as it remains simple, all of its internal (non-boundary) circulation components will cancel – leaving only those along the boundary curve, which will sum to yield the circulation of $$\b{F}$$ around $$C$$.



In a closed surface, a ‘boundary curve’ does not exist; thus, all circulation components are internal (non-boundary), and cancel – yielding zero. If the result were anything else – that is, if a finite circulation was computed, under the Stokes’ Theorem premise that the circulation around a simple closed curve is independent of the open surface enclosing it, every possible simple closed curve in the entire domain of $$\b{F}$$ would have the same value (by drawing any possible surface) – which is absurd.



The vector field visually suggests that there must be a circulation for simple closed curves – even if they do not enclose the origin. This visual, however, is misleading. Consider an excerpt of the original vector field, broken into its clockwise and counterclockwise circulation components along a square closed curve:  Blue: clockwise component; Green: counterclockwise component. (Green, Blue) [# of pixels] – starting from bottom-left pair, moving around counterclockwise. $$(28, 16);\ (24, 0);\ (21+19, 0);\ (25, 0);\ (29, 17);\ (0, 23);\ (0, 33+31);\ (0, 24)$$ [counted using MS.Paint]. $\sum{\mathrm{Green}}-\sum{\mathrm{Blue}}=2\ \mathrm{pixels}\approx 0$ Considering plotting software and Paint resolution limitations, as well as the facts that curl measures infinitesimal circulation density and the square depicted is only its finite approximation, and that not all of the possible vectors are displayed to be summed continuously along each side (integrated) – this error is trivial. The green vector magnitude distribution has a smaller standard deviation than that of the blue; more of blue vectors are larger than green vectors, but also smaller. In other words, horizontal and vertical components of vectors change less the farther they are from the origin – which is supported analytically with the partial derivatives of the vector field: $\bvec{F}=\left[\mathrm{M}\right]\uvec{i}+\left[\mathrm{N}\right]\mathrm{j}$ $\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}=\frac{y^2-x^2}{{\left(x^2+y^2\right)}^2}$ The denominator grows faster than the numerator away from the origin, so the rate of change of either vector component is less away from the origin.
All of the above suggests that that for any simple closed curve not enclosing the origin, the circulation is indeed zero.
What about simple closed curves that do enclose the origin? Assuming C1 is a circle of radius 4, $\oint_{C_1}{\bnvec{F}\mathrm{\cdot }d\boldsymbol{r}}=\iint_{D_1}{(\boldsymbol{\mathrm{\nabla }}\boldsymbol{\mathrm{\times }}\bnvec{F})}dA$ $C_1\left(t\right)=\left[4{\mathrm{cos} \left(t\right)}\right]\uvec{i}+\left[4{\mathrm{sin} \left(t\right)}\right]\uvec{j},\ \ \ \frac{\pi }{2}\le t\le \pi ;$ $D_1\left(r,\theta \right)=\left[r{\mathrm{cos} \left(\theta \right)}\right]\uvec{i}+\left[r{\mathrm{sin} \left(\theta \right)}\right]\uvec{j},\ 0\le r\le 4,\ 0\le \theta \le 2\pi$ Then, $\iint_{D_1}{(\boldsymbol{\mathrm{\nabla }}\times \bnvec{F})}dA=\int \limits_{0}^{2\pi }\int \limits_{0}^{4}{\frac{r^2{{\mathrm{cos}}^{\mathrm{2}} \left(\theta \right)}- r^2{{\mathrm{sin}}^{\mathrm{2}} \left(\theta \right)}}{{\left(r^2{{\mathrm{sin}}^{\mathrm{2}} \left(\theta \right)}+r^2{{\mathrm{cos}}^2 \left(\theta \right)}\right)}^2}drd\theta }=\int \limits_{0}^{2\pi }\int \limits_{0}^{4}{\frac{{\mathrm{cos} \left(2\theta \right)}}{r^2}drd\theta }=\mathrm{DNC^{1}}$ [1 - Does Not Converge] Thus, Green’s Theorem may not be applied to compute the circulation of $$\b{F}$$ around $$C_1$$ enclosing a region $$D_1$$ containing the origin. The line integral, however, will work just fine in computing it: $\bvec{F}\cdot\bvec{r}=\left[\left(\frac{-4{\mathrm{sin} \left(t\right)}}{4^2{{\mathrm{sin}}^{\mathrm{2}} \left(t\right)}+4^2{{\mathrm{cos}}^2 \left(t\right)}}\right)i+\left(\frac{4{\mathrm{cos} \left(t\right)}}{4^2{{\mathrm{sin}}^{\mathrm{2}} \left(t\right)}+4^2{{\mathrm{cos}}^2 \left(t\right)}}\right)\right]\cdot \left[\left(-4{\mathrm{sin} \left(t\right)}\right)i+\left(4{\mathrm{cos} \left(t\right)}\right)j\right]$ $={{\mathrm{sin}}^{\mathrm{2}} \left(t\right)+{{\mathrm{cos}}^2 \left(t\right)=1}}\Rightarrow$ $\oint_{C_1}{\bnvec{F}\mathrm{\cdot }d\boldsymbol{r}}=\int^{2\pi }_0{dt}=2\pi$ Not only does the line integral converge, but it is finite and non-zero – as expected: $$\b{F}$$ is positively aligned with $$C_1$$ for all points on $$C_1$$ – thus, circulation must be positive. A simulation of the field is shown below:



To apply Stokes’ Theorem, we need to find a surface whose boundary is the curve of interest. In 2D, if the curve of interest encloses a discontinuity, there is no way to draw a different surface that will be enclosed by the same curve; there is only one region for every closed curve in 2D. In 3D, however, infinitely many surfaces may be drawn such that their boundary is the said curve. If the discontinuity of $$\b{F}$$ spans continuously from one point on the boundary of the region of interest to another, however, no surface may be drawn whose boundary is a curve enclosing the discontinuity: Note that any surface whose boundary is $$C$$ would need to exit the blue region. (Also note, in this case, if the discontinuity cylinder is infinitely long, no such surface exists at all in 3D space.) Why does this matter? Because now, knowing that curl is zero alone is not enough to determine the vector field path-independence by establishing that the circulation around all simple closed curves within the region is zero – because Stokes’ Theorem no longer applies.



‘Circulation,’ by definition, is flow around a closed path. Intuitively, it’s senseless to speak of something ‘circulating’ around an open path. ‘Simple’ refers to a curve not crossing itself. If a curve does cross itself, Stokes’ Theorem needs to be modified in order to compute circulation: Applied directly, Stokes’ Theorem will yield an inconsistency in circulation orientation among two curves separated by the point of intersection. To maintain consistency, the region must be broken up into two separate integrations with opposite curl orientations (opposite integral signs). Note that there is no ‘default’ counterclockwise orientation configuration – one will always be oriented clockwise, the other always counterclockwise. Either will work: 