XI Line and Surface Integrals
Usage Overview
Functions | Brief Usage Descriptions and Examples |
---|---|
lit | Evaluate line integrals by "lit;f(x(t),y(t),z(t));r(t);t;a;b;x;y;z", where "f(x(t),y(t),z(t))" is a scalar or vector valued function, "r(t)" a parametrization for a curve, "[a, b]" is the interval for parameter "t", and "x,y,z" are the variables or components of "f(x(t),y(t),z(t))". Examples lit;1;t*2*i+t*j;t;0;1 || lit;x+2*z;t*i+2*t*j-t*k;t;0;1;x;y;z || lit;z*i-x*j;cos(t)*i-sin(t)*j+k;t;0;pi;x;y;z || lit;y*i-x*y*j;cos(t)*i-sin(t)*j;t;0;pi/2;x;y ||. |
sit | Evaluate surface integrals by "sit;f(x(u,v),y(u,v),z(u,v));r(u,v);u;a;b;v;c;d;x;y;z", where "f(x(u,v),y(u,v),z(u,v))" is a scalar or vector valued function, "r(u,v)" a parametrization for a surface, "[a, b]" is the interval for parameter "u" and "[c, d]" the interval for "v", and "x,y,z" are the variables or components of "x(u,v),y(u,v),z(u,v))". Examples sit;z*(x**2+y**2);u*cos(v)*i+ u*sin(v)*j+u*k;u;0;1;v;0;1;x;y;z || sit;i-2*j+y*k;cos(u)*sin(v)*i+sin(u)*sin(v)*j+cos(v)*k;u;0;pi/2;v;0;pi/2;x;y;z ||. |
Table of Contents
1 Scalar Line Integrals
Line and surface integrals extend integrals of functions to vector fields over domains of space curves and surfaces. A single-variable integral \(∫_a^bf(x)dx\) is defined over an interval \([a,b]\), which can be considered as a line segment located on the x-axis from points (\(a\), 0) to (\(b\), 0). Line integrals extend integrals over a curve in space, not just over a line segment on the coordinate axes.
Scalar line integrals: [lit; f(x, y, z); x(t)i + y(t)j + z(t)k; t; a; b; x; y; z], [lit(f(x, y, z), x(t)i + y(t)j + z(t)k, t, a, b, x, y, z)]There are two types of line integrals, scalar and vector line integrals. If \(f\) is continuous on a domain containing curve \(C\) parametrized by r\((t)\) for \(a\le t\le b,\int_cf(x,y,z)ds=\int_a^bf(\) r\((t))||\)r\('(t)||dt=\int_a^bf(x(t),y(t),z(t))\sqrt{x'(t)^2+y'(t)^2+z'(t)^2}dt\) is called scalar line integral, where \(ds=||{\bf r}'(t)||dt\) is called the arc length differential that does not depend on the orientation of curve \(C\), and \(∫_a^b||{\bf r}'(t)||dt=s\) is the arc length of \(C\) from \(t=a\) to \(t=b\).
In particular, if \(f(x,y,z)=1\), then the line integral calculates the arc length of the curve for \(a≤t≤b\). If \(f\) is the mass density function of a thin wire \(C\), the line integral calculates the mass of the wire. If \(f(x, y)\) is a surface (curved wall) over \(C\) in the xy-plane, the line integral finds the signed area of a cylinder (or the cross section of the curved wall).
Use "lit; f(x,y,z); r(t); t; a; b; x; y; z" to evaluate scale line integrals, where "lit" (line integrals) is the operation name, f(x, y, z) the scalar function, r(t) = 〈x(t), y(t), z(t)〉 a vector parametrization of the curve with parameter t, [a, b] the interval for parameter t, and "x; y; z" are the component names of r(t).
Attention It is important to note that the order of the component names "x; y; z" of r(t) should exactly match the parametrization of r(t) = x(t)i + y(t)j + z(t)k. They are not only independent variables of the function f(x, y, z), but also correspond to component functions of the parametric equations x = x(t), y = y(t), z = z(t).
Attention Also use the code pattern "lit(f(x, y, z), r(t), t, a, b, x, y, z)" to get the same results as "lit; f(x, y, z); r(t); t; a; b; x; y; z". For arc length, simply use "lit; 1; x(t)*i + y(t)*j + z(t)*k; t; a; b".
Examples
(1) If f(x, y) = x - y², r(t) = 3ti - 2j, 0 ≤ t ≤ 2. Type lit;x-y**2;3*t*i-2*j;t;0;2;x;y || for the line integral. The parametric equations are x = 3t, y = -2. Inverting the order of "x" and "y", you get a different result by lit;x-y**2;3*t*i-2*j;t;0;2;y;x ||, because the parametric equations become y = 3t, x = -2.
(2) f(x, y, z) = x² + y² + z², r(t) = 〈cos(t), 2t, sin(t)〉, 0 ≤ t ≤ 2. ||
lit;x**2+y**2+z**2;cos(t)*i+2*t*j+sin(t)*k;t;0;2;x;y;z || gives value of the line integral, for x = cos(t), y = 2t and z = sin(t).
Examples
(1) Find the line integral of 1 over the unit circle, which is the circumference 2π. The unit circle can be parametrized by cos(t)i + sin(t)j for 0 ≤ t ≤2π. The line integral can be obtained by lit;1;cos(t)*i+sin(t)*j;t;0;2*pi ||.
(2) The length of a helix from 0 to π can be computed by lit;1;cos(t)*i+sin(t)*j+t*k;t;0;pi ||.
(3) Find the line integral of f(x, y) = x3 along y = x3/3 from 0 to 1. A parametrization for the curve can be ti + x3j/3. So the line integral can be obtained by lit;x**3;t*i+t**3*j/3;t;0;1;x ||.
Examples lit;x;cos(t)*i+sin(t)*j;t;0;2*pi;x || lit;y;cos(t)*i+sin(t)*j;t;0;2*pi;y || lit;x*y;cos(t)*i+sin(t)*j;t;0;2*pi;x;y || lit;x;cos(t)*i+sin(t)*j;t;0;pi/2;x || lit;x+y;cos(t)*i+sin(t)*j;t;0;pi;x;y || lit;y;cos(t)*i+sin(t)*j;t;0;pi/4;y || lit;x;(1+3*cos(t))*i+(2+3*sin(t))*j;t;0;2*pi;x || lit;x*y;2*cos(t)*i+3*sin(t)*j;t;0;pi;x;y || lit;x**2+y**2+z**2;sin(t)*i+cos(t)*j+t*k;t;0;1;x;y;z || lit(x,(1+3*cos(t))*i+(2+3*sin(t))*j,t,0,2*pi,x) ||.
In many cases, it is difficult to evaluate scalar line integrals (and arc length) because of the radical terms involved in integrals, but you can use Simpson's rule to approximate the values by the "nit" module.
Examples Let f(x) = x² and r(t) = 〈et, t, t²〉 for 0 ≤ t ≤ 1 by nit;exp(t**2)*(exp(t**2)+1+4*t**2)**(1/2);t;0;1;50 ||.
Mass, moment, center of mass, moment of inertia for a thin rod or wire If a thin wire has continuous density function
\(\delta(x,y,z)\) along a curve \(C\), calculate the mass, moments, center of moments, and moments of inertia by
Mass \(M=\int_C\delta ds\)
Moments \(M_{yz}=\int_Cx\delta ds \quad M_{xz}=\int_Cy\delta ds \quad M_{xy}=\int_Cz\delta ds\)
Center of mass \(\bar{x}=M_{yz}/M, \bar{y}=M_{xz}/M, \bar{z}=M_{xy}/M\)
Inertia
\(I_x=\int_C(y^2+z^2)\delta ds\quad I_y=\int_C(x^2+z^2)\delta ds\quad I_z=\int_C(x^2+y^2)\delta ds\) and \(I_L=\int_Cr^2\delta ds\), where \(r(x,y,z)\) represents the distance from the point \((x,y,z)\) to a line \(L\).
Examples Find the mass a wire along a curve y = x2 from (0, 0) to (2, 4) with a density δ(x) = x by lit;x;t*i+t**2*j;t;0;2;x || lit(x,t*i+t**2*j,t,0,2,x) ||.
2 Vector Line Integrals
The line integral \(\int_c\)F·dr of a vector field F along a curve \(C\) parametrized by r\((t)\) is the scalar integral of the tangential component F·T over \(C\), where T is the unit tangent vector of r\((t)\) for \(a≤t≤b\). So \(∫_c\)F·dr = \(∫_c\)F·T\(ds\) = \(∫_a^b\)F(r(\(t\))·r\('(t)dt\), where F·T\(ds\) = F·\(\frac{{\bf r}'(t)}{{||\bf r}'(t)||}{{||\bf r}'(t)||}dt\), and \(d\)r = r\('(t)dt\) is called the vector differential that depends on the orientation of \(C\). Reversing the orientation will result in an opposite sign for the line integrals of the field.
If the field F is perpendicular to the curve \(C\) at every point, then F·T = 0 and the line integral of the field is 0. The positive direction of \(C\) usually corresponds to increasing value of \(t\), or r\((t)\) traverses \(C\) in the counterclockwise direction. However, vector line integrals over an oriented curve \(C\) does not depend on how \(C\) is parametrized. So always choose the simplest parametrization.
Vector line intervals can be expressed in differential forms \(\int_cF_1dx+F_2dy+F_3dz\) for F = 〈\(F_1,F_2,F_3\)〉, because \(d\)r = 〈\(dx,dy,dz\)〉 and F·\(d\)r = \(F_1dx+F_2dy+F_3dz\). The notation is tricky, but it is not sum of integrals. To evaluate vector line integrals, express \(x,y,z,dx,dy,dz\) in terms of one chosen parameter and substitute.
Example F = \(⟨x^2y,y^2z,z^2x⟩\) and \(C:{\bf r}(t)=t{\bf i}+t^2{\bf j}+t^3{\bf k}\) for \(0≤t≤1\). Then \(\int_c\)F·dr = \(\int_ct^4dt+2t^8dt+3t^9dt=\int_0^1(t^4+2t^8+3t^9)dt\)
\(=\frac{13}{18}\) by lit;x^2*y*i+y^2*z*j+z^2*x*k;t*i+t^2*j+t^3*k;t;0;1;x;y;z ||.
Use the code pattern "lit; F; r(t); t; a; b; x; y; z" to evaluate vector line integrals, where "F" is a vector field and must be written in a valid vector expression, "r(t)" the path parametrization (vector) with parameter t and also must be written in a valid vector expression, and a ≤ t ≤ b is the integration limits or the interval for t.
Attention Use the code pattern "lit(F, r(t), t, a, b, x, y, z)" to get the same results as "lit; F; r(t); t; a; b; x; y; z".
Examples (1) Evaluate \(\int_cxdx+2ydy=1.5\), where F = 〈x, 2y〉, r(t) = ti + t2j, 0≤ t ≤ 1 by lit;x*i+2*y*j;t*i+t**2*j;t;0;1;x;y ||. (2) F = ⟨x, y⟩ is a radial field, an the curve C is a radius of \(a\) centered at origin. The line integral is 0 because F·T = 0 at each point on C. If F = ⟨-y, x⟩ is a rotation field, then the line integral is \(2πa^2\), because F // T and F·T = ||F|| = \(a\). Thus \(\int_C\)F·T\(ds=\int_C ads=2πa^2\). Check the answer using parametrization \(x=a\cos(t),y=a\sin(t)\) by lit;x*i+y*j;a*cos(t)*i+a*sin(t)*j;t;0;2*pi;x;y || lit;-y*i+x*j;a*cos(t)*i+a*sin(t)*j;t;0;2*pi;x;y ||.
Examples lit;-y*i+x*j;(t-sin(t))*i+(1-cos(t))*j;t;2*pi;0;x;y || lit;-y*i+x*j;(1+2*cos(t))*i+(3+4*sin(t))*j;t;0;2*pi;x;y || lit;x**2*i-x*z*j+(y/z)*k;t**2*i+t**3*j+t*k;t;0;1;x;y;z || lit;y*j+x**2*k;t*i+t**2*j;t;0;1;x;y || lit;(-y*i+x*j)/(x**2+y**2);cos(t)*i+sin(t)*j;t;0;2*pi;x;y || lit((-y*i+x*j)/(x**2+y**2),cos(t)*i+sin(t)*j,t,0,2*pi,x,y) ||.
Examples If F = 〈x2y-1, y2+3x〉 and C is bounded by y = x2 and x = y2, then r(t) = 〈t, t2〉 and r(t) = 〈t2, t〉 for 0 ≤ t ≤ 1 (points of intersection), and the line integral can be evaluated by the sum of the two line integrals by lit;(x**2*y-1)*i+(y**2+3*x)*j; t*i+t**2*j;t;0;1;x;y || lit;(x**2*y-1)*i+(y**2+3*x)*j;t**2*i+t*j;t;1;0;x;y ||. Notice that the curve orientation in the second line integral is set for t from 1 to 0.
In some special cases, if the path is a straight line, evaluating line integrals becomes much simpler.
Examples
(1) To evaluate line integrals of F along a line from points (a, b) to (a, c), set x = a, dx = 0, b ≤ y ≤ c and substitute these values to a differential form to evaluate the integral of a function of y.
(2) If a line is from points (a, b) to (c, b), set y = b, dy = 0, a ≤ x ≤ c.
(3) If F is a 3d vector, to evaluate the line integral of F along a line from (a, b, c) to (a, b, d), set x = a, y = b, dx = dy = 0, and c ≤ z ≤ d.
(4) In general, if the line is from (a, b, c) to (m, n, k), parametrize it by r(t) = 〈a, b, c〉 + t〈m - a, n - b, k - c〉 for 0 ≤ t ≤ 1.
Examples To evaluate \(\int_cydx-zdy+xdz\) along a line segment from (1, 2, -1) to (2, 1, 3), r(t) = 〈1, 2, -1〉 + t〈1, -1, 4〉, for 0 ≤ t≤ 1, and the vector line integral can be obtained by lit;y*i-z*j+x*k;(1+t)*i+(2-t)*j+(-1+4*t)*k;t;0;1;x;y;z ||.
Work and line integral Work = force × distance = F·Δr for small motion Δr. Summing over the work on small distance along the curve \(C\) gives the total work \(W=\int_C\)F·dr = \(\lim\limits_{Δr→0}\sum_i\)F·Δr\(_i\).
Fundamental theorem for line integrals Let F = \(\nabla f\) be defined on a simply connected domain \(D\) and r be a path along a curve \(C\) from points \(P\) to \(Q\) in \(D\). Then \(\int_c\)F·dr = \(\int_c\nabla f\)·dr = \(\int_a^b\nabla f\)(r(\(t\))·r\('(t)dt\) = \(f\)(r(\(b\))) - \(f\)(r(\(a\))) = \(f(Q)-f(P)\), which means the line integral of a conservative field is path-independent. It only depends on the end points, not on the actual trajectory. Clearly, if \(C\) is a closed loop, then \(\int_c\nabla f\)·dr = 0 = \(f(P)-f(P)\).
Conversely, if \(\int_c\)F·dr is path-independent in \(D\), then F is conservative, and F = \(\nabla f=⟨f_x,f_y,f_z⟩\) is also a gradient field. The line integral \(\int_c\)F·dr is path-independent if and only if \(\int_c\)F·dr = 0 for every closed path \(C\) in \(D\). Moreover, \(\int_c\)F·dr = \(\int_Cf_xdx+f_ydy+f_zdz=\int_cdf\), where \(df=f_xdx+f_ydy+f_zdz\) is an exact differential.
Use the theorem to evaluate line integral for a gradient field with a potential. First make sure that F is conservative by checking curl(F) = 0, and then find a potential function \(f\) for F. In physics, gravitational force field has a gravitational potential, and electrical field has a electrical potential (voltage).
Test for gradient fields If F = \(∇f\) is a gradient field then curl(F) = 0. If F = ⟨\(M, N\)⟩ is a 2D-gradient field, \(N_x=M_y\) because \(N_x=f_{yx}=M_y=f_{xy}\). If F = ⟨\(P, Q, R\)⟩ is a 3D-gradient field then \(R_y=Q_z,R_x=P_z,Q_x=P_y\), which arrives from the determinant of ∇ × F = \(\begin{vmatrix}{\bf i}&{\bf j}&{\bf k}\\\frac{∂}{∂x}&\frac{∂}{∂y}&\frac{∂}{∂z}\\P&Q&R\end{vmatrix}=(R_y-Q_z){\bf i}-(R_x-P_z){\bf j}+(Q_x-P_y){\bf k}=⟨0, 0, 0⟩\).
Example F = \(⟨yz,xz,xy⟩\) and \(C_1:{\bf r}(t)=t{\bf i}+t{\bf j}+t{\bf k}, C_2:{\bf r}(t)=t{\bf i}+t^2{\bf j}+t^3{\bf k},C_3:{\bf r}(t)=\sqrt{t}{\bf i}+t^2{\bf j}+t^2{\bf k}\) for \(0≤t≤1\). The three curves start at (0, 0, 0) and end at (1, 1, 1), and F is conservative, so the line integrals of F three \(C_1,C_2,C_3\) are the same and equal 1. Check lit;y*z*i+x*z*j+x*y*k;t*i+t*j+t*k;t;0;1;x;y;z || lit;y*z*i+x*z*j+x*y*k;t*i+t^2*j+t^3*k;t;0;1;x;y;z || lit;y*z*i+x*z*j+x*y*k;t^(1/2)*i+t^2*j+t^2*k;t;0;1;x;y;z ||. If \(C_4\) starts at origin through (1, 0, 0), (1, 1, 0) and ends at (1, 1, 1), the line integral of F over \(C_4\) is \(f(1,1,1)-f(0,0,0)\) = 1 by the fundamental theorem. It is easy to verify that the line integral through the segments at xy-plane is 0 because z = 0, dz = 0. For the last segment, x = y = 1, dx = dy = 0, F·dr = ⟨z, z, 1⟩·⟨0, 0, dz⟩, and \(\int_0^11dz\) = 1.
Verify conservative fields To verify if F is conservative is to check the equality of the cross partials. Use the code pattern "vec;csv(F,x,y,z)" to determine if a field "F" is conservative, where the vector field "F" must be written in a valid vector expression, and be in terms of a linear combination of the standard basis vector names i, j, k. Or also calculate curl(F) directly by the code pattern "vec;cul(F,x,y,z)" to see if it is a 0 vector.
Examples vec;csv(x*i-y*j,x,y) || vec;cul(x*i-y*j,x,y) || vec;csv(x*y*i-(x**2+z**2)*j+y*z*k,x,y,z) || vec;cul(x*y*i-(x**2+z**2)*j+y*z*k,x,y,z) || vec;csv(x*exp(z)*i+y*exp(x)*k+z*exp(y)*k,x,y,z) || vec;cul(x*exp(z)*i+y*exp(x)*k+z*exp(y)*k,x,y,z) ||.
The theorem implies if the path r(t) is simple and closed, the line integral of any conservative field over r(t) is 0. Verify the fact by the examples below.
Examples The integral of a conservative field on an ellipse is 0. Let F = xi + yj. Then vec;csv(x*i+y*j,x,y) ||vec;cul(x*i+y*j,x,y) || show F is conservative. A parametrization of an ellipse is cos(t)i + 2sin(t)j. Check the result from this code pattern lit;x*i+y*j;cos(t)*i+2*sin(t)*j;t;0;2*pi;x;y ||, which is 0. The line integral of F over a circle is also 0. Check lit;x*i+y*j;3*cos(t)*i+3*sin(t)*j;t;0;2*pi;x;y ||.
Examples The vector F = 〈\(e^{xy}(2x+x^2y),x^3e^{xy}+2y\)〉 is conservative by vec;cul((2*x*exp(x*y)+x**2*y*exp(x*y))*i+(x**3*exp(x*y)+2*y)*j,x,y) || vec;csv((2*x*exp(x*y)+x**2*y*exp(x*y))*i+(x**3*exp(x*y)+2*y)*j,x,y) ||, the line integral of F over a unit circle is 0, but to evaluate it directly is formidable. Check lit;(2*x*exp(x*y)+x**2*y*exp(x*y))*i+(x**3*exp(x*y)+2*y)*j; cos(t)*i+sin(t)*j;t;0;2*pi;x;y ||.
Find potential functions To evaluate line integrals by the fundamental theorem, you need to find a potential function for a conservative F, provided that the curve C is not closed. Before finding a potential, verify that F = ⟨\(F_1,F_2,F_3\)⟩ is conservative and F = ⟨\(F_1,F_2,F_3\)⟩ \(=∇f=⟨f_x,f_y,f_z⟩\).
Method Use antiderivative. First integrate \(f_x\) (or \(f_y\) or \(f_z\)) by \(\int f_xdx=\int F_1dx\) and observe \(f\). Then differentiate \(f\) with respect to \(y\) to match \(f_y=F_2\) and update \(f\). Next, differentiate \(f\) with respect to \(z\) to match \(f_z=F_3\) and obtain the final \(f\). Be aware that there are infinitely many potential functions for F, but they only differ by a constant.
Example Let F = ⟨\(f_x,f_y,f_z\)⟩ and \(f_x=2xy,f_y=x^2-4y^3z, f_z=2z-y^4\). First, \(f=\int 2xydx=x^2y+g(y,z)\). Then \(f_y=x^2+g_y=x^2-4y^3z⇒g_y=-4y^3z⇒g(y,z)=\int -4y^3zdy=-y^4z+h(z)⇒f=x^2y-y^4z+h(z)\). Next, \(f_z=-y^4+h'(z)=2z-y^4⇒h'(z)=2z⇒h(z)=z^2+C\). Thus, \(f(x,y,z)=x^2y-y^4z+z^2+C\).
In special cases, if any field is in form of 〈f(x), g(y), h(z)〉, it has a potential function F(x) + G(y) + H(z) such that F'(x) = f(x), G'(y) = g(y) and H'(z) = h(z), assuming f, g, h are continuous.
Examples Let F = 〈cos(x), ey, 1/z〉. Then F is conservative by vec;csv(cos(x)*i+exp(y)*j+k/z,x,y,z) ||. Fx = cos(x) ⇒ f(x, y, z) = sin(x) + g(y, z), Fy = ey ⇒ gy(y, z) = ey + h(z), Fy = 1/z ⇒ h(z) = log(z). Thus, f(x, y, z) = sin(x) + ey + log(z) is a potential function for F. Chekc it by grd;sin(x)+exp(y)+log(z);x;y ||. The line integral of F over a curve joining the points (0, 0, 1) and (π/2, ln(3), e4) is f(π/2, ln(3), e4) - f(0, 0, 1) = 7 by the fundamental theorem for line integrals.
Finding a potential function f for a conservative field F is to solve the partial differential equation F = ∇f for f. Use the code pattern "pde; pdexpr; x; y" to help find a potential function f of two variables "x; y" only, where "pde" (partial derivative) is the operation code, "pdexpr" is the partial differential equation (without the portion "= 0"), and "x; y" are the two independent variables of a possible potential function f. Click the link partial differential equations for more information.
Examples
(1) Let F = 〈2xy-3, x2〉. || vec;cul((2*x*y-3)*i+x**2*j,x,y) || vec;csv((2*x*y-3)*i+x**2*j,x,y) || confirm F is conservative. To find a potential function f for F, it is easy to start with fy(x, y) = x², which is a partial differential equation. Using the code pde;f_y-x**2;x;y ||, you get f(x, y) = x2y + g(x). Since fx = 2xy + g'(x), which implies f(x,y) = x2y - 3x is a potential function for F. Verify it by grd;x**2*y-3*x;x;y ||, and you get F back.
(2) Also start with fx(x, y) = 2xy - 3, and solve it by pde;f_x-2*x*y+3;x;y ||, which gives you f = x²y - 3x +h(-y). Since fy = x², h(-y) is a constant, and f = x²y - 3x is a potential function ||.
Green's theorem If \(C\) is a positively oriented curve enclosing a region \(D\), then \(\oint_C\)F·dr = \(\iint_D\)curl(F)\(dA\), which means \(\oint_CF_1dx+F_2dy=\iint_D(\frac{∂F_2}{∂x}-\frac{∂F_1}{∂y})dA\).
Clearly, if F is conservative, the circulation is equal to 0. Green's theorem relates line integrals to double integrals on the plane, and provides a way to evaluate circulation when a vector is not conservative. Green's theorem holds only if F is defined everywhere on a plane region D enclosed by a curve (its boundary), or D is a simply connected.
For F = ⟨M, N⟩, curl(F) = Nx - My measures the failure of conservativeness of F. If F is differentiable and curl(F) is zero (or Nx = My), then F is conservative and is a gradient field, because \(\oint_c\)F·dr = \(\iint_D\)curl(F)\(dA\) = \(\iint 0dA=0\). For a velocity field, curl equals (twice) angular velocity of the rotation component of the motion. A constant field ⟨a, b⟩ has zero curl (uniform translation and no rotation motion). The field ⟨x, y⟩ has curl zero (expanding motion), and the field ⟨-y, x, 0⟩ has curl ⟨0, 0, 2⟩.
Green's theorem can be used for simplifying the computation of some line integrals, in particular if the component functions of F are complicated but curlk(F) = curl(F)·k becomes a simple expression or constant.
Examples
(1) Let F = 〈y, -x〉, and the curve C be the circle x² + y² = 9. Check vec;cul(y*i-x*j,x,y) ||, and you get 〈0, 0, -2〉. So the circulation is -18π because the area of the circle is 9π. Also check lit;y*i-x*j;3*cos(t)*i+3*sin(t)*j;t;0;2*pi;x;y ||. The circulation is negative because the vector field F appears to circulate in the clockwise direction, tending to point in the opposite direction of the orientation of the circle (counterclockwise).
(2) Let G = 〈-y, x〉, vec;cul(-y*i+x*j,x,y) || gives 〈0, 0, 2〉, and the circulation of G over the circle is 18π by lit;-y*i+x*j;3*cos(t)*i+3*sin(t)*j;t;0;2*pi;x;y ||.
Example The z-component of the curl of F = 〈\(e^{x^2}-y,x+\cos\sqrt{y}\)〉 is 2 by vec;cul((exp(x**2)-y)*i+(x+cos(y**(1/2)))*j,x,y) ||, so the line integral of F over a unit circle is 2π by Green's theorem. However, it is time consuming to directly evaluate this line integral.
Example Similarly, \(\int_cxydx-x^3dy\) over the curve \(C\) that is enclosed by \(0\le x\le 1\) and \(0\le y\le \sqrt{x}\) is equal to \(\int_0^1\int_0^{\sqrt{x}}(3x^2-x)dydx=2\) by Green's theorem. Check vec;cul(x*y*i-x**3*j,x,y) || itg;3*x**2-x;y;0;x**(1/2);x;0;1 ||.
Example If F = 〈xy, x2 + y2〉 and C is a parallelogram with vertices (0, 0), (2, 2), (4, 2), (2, 0) oriented counterclockwise, evaluate the circulation via double integral by Green's theorem by vec;cul(x*y*i+(x**2+y**2)*j,x,y) || itg;x;x;y;y+2;y;0;2 ||.
Computing area by Green's theorem In some special cases, if F = 〈0, x〉, or F = 〈-y, 0〉, or F = 〈-y, x〉, curlk(F) is a constant, and we can use this fact to calculate the area enclosed by the curve by Green's theorem. For example \(\oint_cxdy=\iint_R1dA\), which is the area of \(R\) enclosed by \(C\).
Examples
(1) For F = 〈-y, x〉, curlk(F) = 2 by vec;cul(-y*i+x*j,x,y) ||, \(\int_c-ydx+xdy\) = 2 area(\(D\)) enclosed by the curve C, or \(\int_c-ydx=\int_cxdy\) = 2area(\(D\)).
(2) Type lit;x*j;2*cos(t)*i+2*sin(t)*j;t;0;2*pi;x || for the area of the circle of radius 2 centered at the origin.
(3) Type lit;-y*i;2*cos(t)*i+3*sin(t)*j;t;0;2*pi;y || for the area of the ellipse.
(4) Type lit;0.5*(-y*i+x*j);2*cos(t)*i+3*sin(t)*j;t;0;2*pi;x;y || for the area 12π of an ellipse with equation \(\frac{x^2}{4}+\frac{y^2}{9}=1\).
Line integrals of normal components If the unit tangential vector T in \(∫_c\)F⋅T\(ds\) is replaced with the unit normal vector n, the integral \(∫_c\)F⋅n\(ds\) is called the flux across \(C\). Let \(C\) be a plane curve parametrized by r\((t)=〈x(t),y(t)〉\) for \(a≤t≤b\). Then N\((t)=〈y'(t),-x'(t)\), the magnitude ||N(t)|| = ||r'(t)||, and \(∫_c\)F·n\(ds\) = \(∫_a^b\)F(r(\(t\))·\(\frac{{\bf N}(t)}{||{\bf N}(t)||}\)||r'(t)||\(dt\) = \(∫_a^b\)F(r(\(t\))⋅N\((t)dt\). This is because T and n are perpendicular to each other and n can be obtained by rotating T 90° clockwise.
The flux \(\int_c\)F·n\(ds\) = \(\int_a^b\)F(r\((t)\))·N\((t)dt\) = \(\int_cF_1dy-F_2dx\) ≡ \(\int_c\)G·T\(ds\) for N(t) = 〈y'(t), -x'(t)〉, r'(t) = 〈x'(t), y'(t)〉. This implies G = 〈-F2, F1〉, F·N = G·r', and F·n\(ds\) = G·T\(ds\).
Flux across plane curve The flux of a vector field F across a plane curve \(C\) is \(\int_C\)F·n\(ds\), where n is the unit normal vector to \(C\), rotated 90° clockwise from the unit tangent vector T to \(C\). Divide \(C\) into small pieces of length \(Δs\), the flux is the limit of \(\sum_i\)F·n\(Δs_i\) as \(Δs→0\). Within a small portion of \(C\), view F locally as a constant. What passes through the portion of \(C\) in unit time is contents of a parallelogram with side \(Δs\) and F. The area of the parallelogram is \(Δs\)(F·n). Sum these contributions along all of \(C\) to get the total flow through \(C\) per unit time, \(\int_C\)F·n\(ds\). Count flow towards the right of \(C\) positive flux, towards the left of \(C\) negative, as seen from the point of view of a point traveling through \(C\). If F is a velocity field (flow of a fluid), flux measures how much matter passes through \(C\) per unit time.
Example If \(C\) is a circle of radius \(a\) counterclockwise, the flux of F = xi + yj along \(C\) is \(\int_C\)F·n\(ds\) = \(\int_C ads=2\pi a^2\), because F // n and F·n = ||F|| = \(a\). The flux of F = -yi + xj along \(C\) is 0, because F ⊥ n and F·n = 0.
Example Find the flux of F = 〈x2, y〉 across the curve C: y = x2 from points (0, 0) to (2, 4). Parametrize C by r(t) = ti + t2j for 0 ≤ t ≤ 2. The flux can be obtained by lit;-y*i+x**2*j;t*i+t**2*j;t;0;2;x;y ||.
There are two types of vector line integrals, work, \(\int_C\)F·T\(ds\) sums the tangential component F·T of F in the direction of \(C\) along the curve. Flux, \(\int_C\)F·n\(ds\) sums the normal component of F to \(C\) along the curve.
If F = \(P(x,y)\)i + \(Q(x,y)\)j, then \(\int_C\)F·n\(ds=\int_C ⟨P,Q⟩·⟨dy,-dx⟩=\int_C-Qdx+Pdy\). This is because \(d{\bf r}=\) T\(ds=⟨dx,dy⟩\), and n is T rotated 90° clockwise, that is n\(ds=⟨dy,-dx⟩\). Thus, to evaluate flux, use the usual method by expressing \(x,y,dx,dy\) in terms of one parameter and reduces it to a single variable integral.
Green's theorem for flux If \(C\) encloses \(D\) counterclockwise and F = \(P(x,y)\)i + \(Q(x,y)\)j, then \(\int_C\)F·n\(ds=\iint_D\)div(F)\(dA\), where div(F) = \(P_x+Q_y\) is the divergence of F. Counterclockwise orientation of \(C\) counts flux of F out of the region \(D\) through \(C\).
To see this result, \(\oint_C\)F·n\(ds=\oint_C-Qdx+Pdy=\iint_D [P_x-(-Q_y)]dA=\iint_D P_x+Q_ydA=\iint_D\)div(F)\(dA\). In the second step, apply Green's theorem for circulation (work) to flux, and curl⟨\(-Q,P\)⟩ = div⟨\(P,Q\)⟩ = \(P_x+Q_y\).
In an incompressible fluid flow, divergence measures how much fluid is being added to the system per unit area and per unit time (also called source.sink density or rate).
Examples
(1) The flux of F = 〈x, y〉 across a unit circle is 2π, because div(F) = 2 and area(D) = π.
(2) Since the divergence of F = 〈-y, x〉 is 0, the flux of F across a circle of radius b is 0.
(3) div;x**2*y*i+(x+y**2)*j;x;y || itg;2*y+2*x*y;x;0;2;y;1;5 || give the flux of F = 〈x2y, x + y2〉 across the rectangle 0 ≤ x ≤ 2 and 1 ≤ y ≤ 5 ||.
Summary Several ways to evaluate vector line integrals: (1) Use usual method to express \(x,y,dx,dy\) in terms of one parameter and evaluate a single variable integral. (2) For a gradient field, use the fundamental theorem for line integrals by finding a potential for the field. (3) If \(C\) encloses a region \(D\) counterclockwise, use double integrals to evaluate line integrals by Green's theorem, \(\oint_C\)F·T\(ds=\iint_D\)curl(F)\(dA,\oint_C\)F·n\(ds=\iint_D\)div(F)\(dA\), where curl(F) = \(Q_x-P_y\) and div(F) = \(P_x+Q_y\). For Green's theorem to hold, F must be defined and differentiable on the region \(D\) enclosed by \(C\), or the region \(D\) is simply connected, which means for any closed curve in \(D\), its interior region is entirely contained in \(D\).
3 Scalar Surface Integrals
There are two types of surfaces integrals, scalar and vector surface integrals. Note that parametrizing a space curve involves only one parameter, but parametrizing a surface in \(R^3\) requires two parameters because surfaces are 2-dimensional.
If a surface is explicitly defined by a function z = f(x, y), it can be parametrized by r(x, y) = 〈x, y, f(x, y)〉. In a similar fashion, we can parametrize surfaces defined by f(x, z) and f(y, z).
If a level surface is defined implicitly in an equation f(x, y, z) = c, we can parametrize it by r(u, v) = 〈u, v, z(u, v)〉 by viewing the surface is defined by z = g(x, y) in a domain in the xy-plane. Similarly, we can parametrize implicit level surfaces in other coordinate planes like r(u, v) = 〈u, y(u, v), v〉 or r(u, v) = 〈x(u, v), u, v〉.
A plane determined by two non-parallel vector a and b can be parametrized by r(u, v) = ua + vb. If the plane also contains a point r0, it can be parametrized by r(u, v) = r0 + ua + vb.
Refer to the chapter of parametric equations to review parametrizations for quadratic surfaces such as spheres, cylinders, ellipsoid, cones, hyperboloids, and paraboloids.
Use "grd; x(u, v)i + y(u, v)j + z(u, v)k; u; v" to calculate the tangent vectors with respect to surface parameters u, v, and use "vec" module to compute their cross product for the normal vector at the point (x(u, v), y(u, v), z(u, v)).
Examples Let r(u, v) = 〈u + v, 2u + 3v, u - v〉 parametrize a surface S.
(1) Show the surface S is a plane. Since x = u + v, y = 2u + 3v,
z = u - v, x + z = 2u, u = (x + z)/2, and v = (x - z)/2. Substituting u, v int y = 2u + 3v, you get z = 5x - 2y, which is a plane.
(2) Find ru and rv by grd;(u+v)*i+(2*u+3*v)*j+(u-v)*k;u;v ||, N(u, v) = ru ×
rv = ⟨−5, 2, 1⟩, and ||N(u, v)|| = \(\sqrt{30}\) by vec;(i+2*j+k)**(i+3*j-k) ||.
(3) If the domain of r(u, v) is
0 ≤ u ≤ 3 and 1 ≤ v ≤ 5, the area(S) = \(12\sqrt{30}\).
Examples Let r(s, t) = ⟨2cos(t)sin(s), 2sin(t)sin(s), 2cos(s)⟩ for 0 ≤ s ≤ π and 0 ≤ t ≤ 2π.
(1) Find rt =
⟨-2sin(t)sin(s), 2cos(t)sin(s), 0⟩ and rs = ⟨2cos(t)cos(s), 2sin(t)cos(s), -2sin(s)⟩ by grd;2*cos(t)*sin(s)*i+2*sin(t)*sin(s)*j+2*cos(s)*k;t;s ||,
N(s, t) = rt × rs = ⟨-4sin²(s)cos(t), -4sin²(s)sin(t), -4sin(s)cos(s)⟩ by
vec;u**v;u;-2*sin(t)*sin(s)*i+2*cos(t)*sin(s)*j;v;2*cos(t)*cos(s)*i+2*sin(t)*cos(s)*j-2*sin(s)*k ||, and ||N(s, t)|| = 4sin(s).
(2) If t = π/2 and s = π/4, r(π/6, π/2) = ⟨0, 1, \(\sqrt{3}\)⟩, N(π/6, π/2) = ⟨0, -1, -\(\sqrt{3}\)⟩, and
||N(π/6, π/2)|| = 2.
(3) The outward-pointing unit normal to the sphere at the point s = π/6, t = π/2 is
n(π/6, π/2) = ⟨0, -1/2, -\(\sqrt{3}\)/2⟩.
(4) The tangent plane through the point at s = π/6, t = π/2 is
⟨0, -1, -\(\sqrt{3}\)⟩ · ⟨x, y - 1, z - \(\sqrt{3}\)⟩ = 0 by vec;(-j-3**(1/2)*k)*(x*i+(y-1)*j+(z-3**(1/2))*k) ||, which is 4 - y - \(\sqrt{3}\)z = 0.
Graph parametric surfaces: [ps3; x(u, v); y(u, v); z(u, v)]
Graph parametric surfaces by the module "ps3" (parametric surface 3d) along with the components of r(u, v).
Examples A cone can be graphed by ps3;u*cos(v);u*sin(v);u ||, a cylinder by ps3;2*cos(t);2*sin(t);z ||, a ball by ps3;sin(s)*cos(t);sin(s)*sin(t);cos(s);0;6.3;0;3.2 ||, and an ellipsoid by ps3;sin(s)*cos(t);2*sin(s)*sin(t);3*cos(s) ||. For an explicit function z = x2 - y2, parametrize it as (x, y, x2 - y2) graph it by ps3;x;y;x**2-y**2 ||.
Examples ps3;u;v;u*v || ps3;u;v;u*v || ps3;u+v;u;v || ps3;u**2;u;v || ps3;u;u-v;v || ps3;2*u;2*v;v**3 || ps3;cos(u);sin(u);v || ps3;cos(u)*sin(v);cos(u)*cos(v);sin(u) || ps3;2*cos(u)*sin(v);3*cos(u)*cos(v);2*sin(u) ||.
Graph parametric curves Graph plane and space curves by the "pc2" and "pc3" modules.
Examples pc2;cos(t);sin(t) || pc2;t**2;t || pc2;sec(x);tan(x);itv=(0,1.56) || pc3;t;t**2;t**3 || pc3;cos(t);sin(t);t || pc3;1+t;exp(t);1/(1+t**2) ||.
Let \({\bf r}(u,v)\) be a parametrization of a surface \(S\) with parameter domain \(D\). Assume r is continuously differentiable, one-to-one, and regular (except possibly at the boundary of \(D\)). Then the surface integral of \(f(x,y,z)\) over \(S\) is \(\iint_sf(x,y,z)dS=\iint_Df({\bf r}(u,v))|| \)N\((u,v)||dudv\), where \(dS=||\)N\((u,v)||dudv\) is called the surface differential. Scalar surface integrals do not depend on the orientation of the surface.
The vector N(\(u,v)\) = \({\bf r}_u\times {\bf r}_v\) is normal to the surface \(S\) at point r\((u,v)\), and \(\iint_D||\)N\((u,v) ||dudv\) = area(\(S\)). The size of ||N(\(u,v\))|| can be considered as an area distortion factor that tells how much the area of a small rectangle is altered under the map r(\(u,v\)) at a point on the surface \(S\). In particular, if ||N(\(u,v\))|| is a constant, we can compute the the surface area of \(S\) by \(\iint_D||\)N\((u,v)||dudv\) = ||N(\(u,v\))||·area(\(D\)) = area(\(S\)).
If \(f=1\), the surface integral gives the area of the surface \(S\). If \(z=f(x,y)\) is an explicit function, parametrize it by \({\bf r}(x,y)=(x,y,f(x,y))⇒{\bf r}_x=〈1,0,f_x〉, {\bf r}_y=〈0,1,f_y〉\) and ||N(\(x,y\))|| = \(\sqrt{1+f_x^2+f_y^2}\), and the surface integral is \(\iint_sg(x,y,z)dS=\iint_Dg(x,y,f(x,y))\sqrt{1+f_x^2+f_y^2}dxdy\).
If \(S\) is a level surface implicitly defined by \(g(x,y,z)=k\) for some constant \(k\), and assume \(z=h(x,y)\), then a parametrization of \(S\) is r\((u, v)=ui+vj+h(u,v)k\), r\(_u\) = 〈\(1, 0, -\frac{g_x}{g_z}\)〉, r\(_v\) = 〈\(0, 1, -\frac{g_y}{g_z}\)〉 and ||N(\(u, v\))|| = \(\frac{||\nabla g||}{|\nabla g·{\bf k}|}\).
Use the code pattern "sit; f(x,y,z); r(u,v); u; a; b; v; c; d; x; y; z" to find surface integrals, where "f(x, y, z)" is the scalar function, "r(u,v)" a surface parametrization, "u" and "v" are parameters of r and "u" in the interval [a, b] and "v" in [c, d]. It is important to write the component function names "x; y; z" in order at the end, because they are not only independent variables of f(x, y, z), but also define the parametric equations x = x(u, v), y = y(u, v), z = z(u, v) for the surface S.
Attention Also use the code pattern "sit(f(x,y,z), r(u,v), u, a, b, v, c, d, x, y, z)" to get the same results as "sit; f(x,y,z); r(u,v); u; a; b; v; c; d; x; y; z"
Example If f(x, y, z) = x + 2y - 3z, r(u, v) = cos(u)i + sin(u)j + vk, 0 ≤ u ≤ 2π, 0 ≤ v ≤ 4, the surface integral can be found by sit;x+2*y-3*z;cos(u)*i+sin(u)*j+v*k;u;0;2*pi;v;0;4;x;y;z ||. The component functions x = cos(u), y = sin(u), z = v.
Examples
(1) A sphere of radius 1 has surface area 4π by sit;1;sin(s)*cos(t)*i+sin(s)*sin(t)*j+cos(s)*k;s;0;pi;t;0;2*pi ||.
(2) The surface integral over the cylinder (side) x2 + y2 = 16 from z = 0 to z = 3 can be got by
sit;1;4*cos(t)*i+4*sin(t)*j+z*k;t;0;2*pi;z;0;3 || sit(1,4*cos(t)*i+4*sin(t)*j+z*k,t,0,2*pi,z,0,3) ||.
(3) sit;x*y;u**(1/2)*cos(v)*i+u**(1/2)*sin(v)*j+v*k;v;0;2*pi;u;0;4;x;y || gives \(\iint_sxydS\) for \(S\) a side surface of \(z=x^2+y^2\) from z = 0 to z = 4 ||.
Normal vectors on parametric surfaces Computing surface integrals involves the normal vector N(u, v) at a point on a parametric surface r(u, v). Use the "tnv" module to find the normal vector N = Tu × Tv at a point (u, v).
Examples Find the normal vector of r(u, v) = 〈cos(u), 2sin(u), v〉 at a point (u, v). ru by vec;tnv(cos(u)*i+2*sin(u)*j+v*k,u) ||, rv by vec;tnv(cos(u)*i+2*sin(u)*j+v*k,v) ||, and normal vector N = ru × rv by vec;u**v;u;-sin(u)*i+2*cos(u)*j;v;k ||, which is N = 2cos(u)i + sin(u)j.
Mass, moment, center of mass, moment of inertia for a thin shell Suppose \(\delta(x,y,z)\) is the mass density for each point on a smooth surface \(S\).
The mass can be calculated by \(M=\iint_S\delta dS\).
The moments by \(M_{yz}=\iint_Sx\delta dS\), \(M_{xz}=\iint_Sy\delta dS, M_{xy}=\iint_Sz\delta dS\).
The center of mass by \(\bar{x}=M_{yz}/M,\bar{y}=M_{xz}/M,\bar{z}=M_{xy}/M\).
The moments of inertia by \(I_x=\iint_S(y^2+z^2)\delta dS, I_y=\iint_S(x^2+z^2)\delta dS, I_z=\iint_S(x^2+y^2)\delta dS\), \(I_L=\iint_Sr^2\delta dS\), where \(r(x,y,z)\) is the distance from the point
(\(x,y,z\)) to a line \(L\).
4 Vector Surface Integrals
The surface integral of a vector field F, \(\iint_s\)F·\(d\)S = \(\iint_s\)(F·n)\(dS = \iint_D\)F\(({\bf r}(u,v))\)·N\((u,v)dudv\), is defined as F over an oriented surface \(S\) on its domain \(D\), where n is a unit normal vector, and \(d\)S = N\((u,v)dudv\) is called the vector surface differential. So \(\iint_s\)F·\(d\)S is actually a scalar surface integral of the normal component (F·n) of F over \(S\), because F·N\((u,v)dudv\) = F·\(\frac{{\bf N}(u,v)}{||{\bf N}(u,v)||}\)·||N(\(u,v\))||\(dudv\) = (F·n)\(dS\), and \(dS\) = ||N(\(u,v\))||\(dudv\) is the scalar surface differential. If the field F is tangent to the surface \(S\) at every point, then the surface integral of F is 0. If F = n at every point, then the surface integral of F is the area of \(S\).
Vector surface integrals represent flux or rates of flow through a surface in the studies of fluid flow. Just as vector line integrals depend on curve orientation, vector surface integrals depend on surface orientation, which is determined by the outward pointing normal vector at each point on the surface. A different orientation gives an opposite sign.
Use the code pattern "sit; F; r(u, v); u; a; b; v; c; d; x; y; z" to evaluate vector surface integrals, where "sit" (surface integral) is the operation name, "F" represents the vector field F, "r(u,v)" the a surface parametrization for r, "u, v" are the parameters for u in the interval [a, b] and v in [c, d], the limits of "u; v" in their domain D, and "x; y; z" component function names of the parametrizations.
Attention Also use the code pattern "sit(F, r(u,v), u, a, b, v, c, d, x, y, z)" to get the same results as "sit; F; r(u,v); u; a; b; v; c; d; x; y; z".
Note that (1) the order of "u; a; b; v; c; d" intervals correspond to positive surface orientation, and "v; c; d; u; a; b" to negative surface orientation. Inverting surface orientation will result in opposite signs for surface integrals. (2) The order of component function names "x;y;z" are not only independent variables of the vector field F, but also correspond to parametric equations for the surface.
In case a surface \(S\) is in the xy-plane oriented with normal in the positive z-axis direction, the normal component of F is F·k, and \(\iint_s\)F·\(d\)S can be simplified or done by hand.
Examples Let S be the disk x² + y² ≤ 9 in the xy-plane with normal in the positive z-axis direction.
(1) If F =
〈1, 0, 0〉, the surface integral of F is 0 by sit;i;r*cos(t)*i+r*sin(t)*j;r;0;3;t;0;pi*2 ||.
(2) If F =
〈0, 2, 0〉, the surface integral of F is 0 by sit;2*j;r*cos(t)*i+r*sin(t)*j;r;0;3;t;0;pi*2 ||.
(3) If F =
〈0, 0, 1〉, the surface integral of F is 9π by sit;k;r*cos(t)*i+r*sin(t)*j;r;0;3;t;0;pi*2 ||.
(4) If F =
〈2, 3, 4〉, the surface integral of F is 16π by sit;2*i+3*j+4*k;r*cos(t)*i+r*sin(t)*j;r;0;3;t;0;pi*2 ||.
Examples
(1) If F = 〈1, 2, 3〉 over a rectangle 0 ≤ x ≤ 2 and 1 ≤ y ≤ 3, \(\iint_s\)F·\(d\)S = 12 by sit;i+2*j+3*k;x*i+y*j;x;0;2;y;1;3 ||.
(2) If F = 〈z, -y, x〉 over the unit circle, \(\iint_s\)F·\(d\)S = 0 by sit;z*i-y*j+x*k;r*cos(t)*i+r*sin(t)*j;r;0;1;t;0;2*pi;x;y;z ||.
(3) If F = 〈x, y, 3〉 over 9x2 + 4y2 = 36 is \(\iint_s\)F·\(d\)S = 18π by sit;x*i+y*j+3*k;2*r*cos(t)*i+3*r*sin(t)*j;r;0;1;t;0;2*pi;x;y;z ||.
(4) sit;x*i+z*j+y*k;x*i+y*j+(6-2*x+3*y)*k;x;0;3+3*y/2;y;0;2;x;y;z || for \(\iint\limits_s〈x,z,y〉\)·\(d\)S over a plane z = 6 - 2x + 3y.
(5) The codes sit;x**2*i+y**2*j+z**2*k;x*i+y*j+x*y*k;x;0;1;y;0;1;x;y;z || for \(\iint_s〈x^2,y^2,z^2〉\)·\(d\)S over the surface z = xy.
(6) sit;x*i+y**2*j+z**3*k;cos(s)*i+sin(s)*j+t*k;s;0;2*pi;t;0;2;x;y;z || for \(\iint\limits_s〈x,y^2,z^3〉\)·\(d\)S over a cylinder x2 + y2 = 1 between z = 0 and z = 2 (excluding the top and base).
(7) sit;z*i-y*k;(u**2-v)*i+v*j+(v**2+1)*k;u;0;2;v;-2;1;x;y;z || sit(z*i-y*k,(u**2-v)*i+v*j+(v**2+1)*k,u,0,2,v,-2,1,x,y,z) ||.
Flux through space surface In 2D plane, flux of F across a curve \(C\) is \(\int_C\)F·n\(ds\). In 3D, flux of F through a surface \(S\) (not a curve) is \(\iint_S\)F·n\(dS\) = \(\iint_S\)F·dS. The surface differential dS is usually easier to computer than n and \(dS\). For a velocity field of a fluid flow, flux measures the amount of flow across the surface \(S\) per unit time.
Divide \(S\) in small pieces \(ΔS\). In unit time, what passes through \(ΔS\) is the contents of a parallelepiped with base \(ΔS\) and the third side F·n, so the volume is (F·n)\(ΔS\).
Example The flux of F = \(x{\bf i}+y{\bf j}+z{\bf k}\) through a sphere of radius \(a\) is \(4πa^3\), because F//n (points out) and F·n = \(a\). Thus, \(\iint_SadS=4πa^3\). If F = \(x{\bf i}\), F·n = \(\frac{x^2}{a}\) and \(\iint_S\)F·n\(dS=\iint_S\frac{x^2}{a}dS=\int_0^{2π}\int_0^π\frac{a^2\sin^2ϕ\cos^2θ}{a}a^2\sinϕdϕdθ=\frac{4πa^3}{3}\) by itg;a^3*sin(s)^3*cos(t)^2;s;0;pi;t;0;2*pi ||.
Computing flux through surfaces Evaluating flux depends on the types of surfaces described by two parameters. (1) If the surface \(S\) is a plane z = a parallel to the xy-plane, n = ±k and \(dS=dxdy\). Use a similar method for planes // xz or yz-planes. (2) If \(S\) is sphere of radius \(a\) centered at origin, use \(ϕ,θ\) and substitute \(ρ=a\), n = \(\frac{1}{a}⟨x,y,z⟩,dS=a^2\sinϕdϕdθ\). (3) If \(S\) is a cylinder of radius \(a\) centered on z-axis, use \(z,θ\) and substitute \(r=a\), n = \(\frac{1}{a}⟨x,y,z⟩\) (points out horizontally away from z-axis), and \(dS=adzdθ\). A portion on the surface of a cylinder looks like a "rectangle" with area \(ΔS≈Δz(aΔθ)\). (4) If \(S\) is a graph of \(z=f(x,y)\), use \(x,y\) and substitute \(z=f(x,y)\), and n\(dS=⟨-f_x,-f_y,1⟩dxdy\). Use a similar method for graphs of \(x=g(y,z)\) and \(y=h(x,z)\). (5) If \(S\) is described by parametric equations \(x=x(u,v),y=y(u,v),z=z(u,v)\) or \({\bf r}(u,v)\), use parameters \(u,v\) and \(d{\bf S}=±({\bf r}_u×{\bf r}_v)dudv\). (6) If the normal vector \({\bf N}\) of the surface \(S\) is given or can be obtained, n\(dS=±\frac{\bf N}{\bf N·k}dxdy\).
If \(S\) is the graph of \(z=f(x,y)\) over a region \(R\) on the xy-plane, consider a small portion of \(S\) (parallelogram) lying above a small rectangle \(ΔxΔy\) in xy-plane. The vertices of the parallelogram is \((x,y,f(x,y)),(x+Δx,y,f(x+Δx,y)),(x,y+Δy,f(x,y+Δy))\). By linear approximation, \(f(x+Δx,y)=f(x,y)+f_xΔx,f(x,y+Δy)=f(x,y)+f_yΔy\), and \(⟨Δx,0,f_xΔx⟩×⟨0,Δy,f_yΔy⟩=⟨-f_x,-f_y,1⟩ΔxΔy=Δ{\bf S}\). Thus, n\(dS=d{\bf S}=⟨-f_x,-f_y,1⟩dxdy\), and surface differential is \(dS=\sqrt{f_x^2+f_y^2+1}dxdy\).
For parametric surface \(S\), consider a small portion \(ΔuΔv\) (parallelogram) of surface, \({\bf r}(u+Δu,v)≈{\bf r}(u,v)+{\bf r}_uΔu\),
\({\bf r}(u,v+Δv)≈{\bf r}(u,v)+{\bf r}_vΔv\), and \(Δ{\bf S}=±{\bf r}Δv×{\bf r}_vΔv\). Thus, \(d{\bf S}=±({\bf r}_u×{\bf r}_v)dudv\).
If \(S\) is an implicitly defined level surface \(g(x,y,z)=c,{\bf N}=∇g,{\bf n}=±\frac{\bf N}{||\bf N||}\), the surface element \(ΔS\) and its projection \(ΔA\) onto the xy-plane is related by \(ΔA=ΔS\cosα=ΔS\frac{\bf N·k}{||\bf N||}\), where \(α\) is an angle between the slant surface element and horizontal. Thus, \(ΔS=\frac{||\bf N||}{\bf N·k}ΔA\) and \(dS=±\frac{||\bf N||}{\bf N·k}dA,{\bf n}dS=±\frac{||\bf N||n}{\bf N·k}dxdy=±\frac{\bf N}{\bf N·k}dxdy\). Use similar method to project surface element onto xz or yz-plane. In particular, if \(S\) is a graph, \(g(x,y,z)=z-f(x,y)=0,{\bf N}=⟨-f_x,-f_y,1⟩,{\bf N·k}=1\) and \({\bf n}dS=⟨-f_x,-f_y,1⟩dxdy\) as expected.
Example The flux of F = \(x{\bf i}+y{\bf j}+z{\bf k}\) through the paraboloid \(z=x^2+y^2\). The surface \(S\) is a graph of \(z=x^2+y^2\), so n\(dS=⟨-2x,-2y,1⟩dxdy\) (points up into the paraboloid), and \(\iint_S\)F·dS = \(\iint_S-(x^2+y^2)dxdy=\int_0^{2π}\int_0^1-r^2rdrdθ=-\frac{π}{2}\).
Curl For F = ⟨\(P, Q, R\)⟩, curl(F) is the determinant of ∇ × F = \(\begin{vmatrix}{\bf i}&{\bf j}&{\bf k}\\\frac{∂}{∂x}&\frac{∂}{∂y}&\frac{∂}{∂z}\\P&Q&R\end{vmatrix}=(R_y-Q_z){\bf i}-(R_x-P_z){\bf j}+(Q_x-P_y){\bf k}\). Curls tells how much F fails to be conservative. For velocity fields, curl measures angular velocity. For a general complicated motion, curl measures the rotation component of the motion.
Stoke's theorem If \(C\) is a closed curve and \(S\) is any surface enclosed by \(C\), then \(\oint_C{\bf F}·d{\bf r}= \iint_S\text{curl}({\bf F})·d{\bf S}=\iint_S(∇×{\bf F})·{\bf n}dS\).
The orientation of \(C\) and \(S\) should be compatible. Changing orientation reverses the sign of the integral. One rule is that if you walk along \(C\) in positive direction with \(S\) on your left side, then n is pointing up.
If F is a gradient, then curl(F) = 0. Conversely, if curl(F) = 0 in a simply connected region, then F is conservative, so \(\oint_C{\bf F}·d{\bf r}\) is path-independent. To see this, consider two curves \(C_1,C_2\) with the same end points. Then \(C=C_1-C_2\) forms a closed curve enclosing region \(S\), and by Stoke's theorem \(\oint_C{\bf F}·d{\bf r}=\iint_S(∇×{\bf F})·{\bf n}dS=0=\oint_{C_1}{\bf F}·d{\bf r}=\oint_{C_2}{\bf F}·d{\bf r}\). If \(S\) is closed, its boundary \(C\) is empty, and the surface integral \(\iint_S\)curl(F)·dS = 0, which implies the flux of curl(F) through every closed and oriented surface is 0.
Green's theorem relates circulations of planar vectors over boundaries of plane surfaces to double integrals. Stoke's theorem extends Green's theorem to 3D vectors and relates circulation around boundaries of general space surfaces to surface integrals (flux) of curl vectors. If \(S\) is a surface on the xy-plane bounded by a curve \(C,\oint_C{\bf F}·d{\bf r}= \int_CPdx+Qdy=\iint_S(Q_x-P_y)dxdy=\iint_S(∇×{\bf F})·{\bf k}dxdy=\iint_S(∇×{\bf F})·{\bf n}dS\), where \({\bf F}=⟨P,Q⟩\) and \(C\) is oriented counterclockwise. In this case, Green's theorem and Stoke's theorem say the same thing.
If \(C\) and \(S\) are in an arbitrary plane, use Green's theorem for the line integral. Green's theorem and Stoke's theorem work in any plane because of geometric invariance of work, curl and flux under rotations of space. In general, divide \(S\) into small pieces with each piece nearly flat (slanted plane). Apply Green's theorem on each small piece. When adding the line integrals over the inner boundaries, they cancel each other and end up with the line integral over \(C\), which is the surface integral through \(S\).
Example \({\bf F}=z{\bf i}+x{\bf j}+y{\bf k}\) and \(C\) is a unit circle on the xy-plane counterclockwise. Directly calculate the circulation \(\oint_C{\bf F}·d{\bf r}=\int_Czdx+xdy+ydz=\int_0^{2π}xdy\int_0^{2π}\cos^2θdθ=π\) for \(z=0,dz=0\) or by lit;z*i+x*j+y*k;cos(t)*i+sin(t)*j;t;0;2*pi;x;y;z ||. If \(S\) is \(z=1-x^2-y^2\) enclosed by \(C\), by Stoke's theorem, curl\(({\bf F})=⟨1,1,1⟩,{\bf n}dS=⟨2x,2y,1⟩dxdy,\iint_S(∇×{\bf F})d{\bf S}=\iint(2x+2y+1)dxdy\)
\(=\iint1dxdy=π\), which is the area of unit circle.
Surface independence Rewrite Stoke's theorem, \(\int_C\)F·dr = \(\iint_{S_1}\)curl(F)·dS = \(\iint_{S_2}\)curl(F)·dS for any two surfaces \(S_1\) and \(S_2\) bounded by the same curve \(C\), which implies the surface integral of F depends only on \(C\) not on the surface, provided it has a well-defined normal vector. This surface independence of surface integrals for curl vector fields is analogous to path-independence of line integrals for conservative fields.
To see surface independence, choose any two surfaces \(S_1,S_2\) bounded by \(C\), change their orientation and form a closed surface \(S=S_1-S_2\) that encloses region \(W\). By divergence theorem, \(\iint_S(∇×{\bf F})·{\bf n}dS=\iiint_W∇·(∇×{\bf F})dV=0=\iint_{S_1}(∇×{\bf F})·{\bf n}dS=\iint_{S_2}(∇×{\bf F})·{\bf n}dS\). Note that \(∇·(∇×{\bf F})=\text{div}(\text{curl}({\bf F}))=0\) is always true, much like the triple scalar product \({\bf u}·({\bf u}×{\bf v})=0\) for vectors.
Examples Use "lit" and "sit" modules to verify Stoke's theorem. Given F = 〈xy, 3x, y+z〉 and an oriented surface z = 1 - x2 - y2 for x2 + y2 ≤ 1. The boundary is a circle oriented in counterclockwise direction in the xy-plane. Get the circulation over the boundary by lit;x*y*i+3*x*j+(y+z)*k;cos(t)*i+sin(t)*j;t;0;2*pi;x;y;z ||, the curl vector by vec;cul(x*y*i+3*x*j+(y+z)*k,x,y,z) ||, and the flux through the surface by sit;i+(3-x)*k;r*cos(t)*i+r*sin(t)*j+(1-r**2)*k;r;0;1;t;0;2*pi;x || sit(i+(3-x)*k,r*cos(t)*i+r*sin(t)*j+(1-r**2)*k,r,0,1,t,0,2*pi,x) ||.
Examples If F = 〈x, yz, x+z〉 and an oriented surface is the triangle of vertices (1, 0, 0), (0, 2, 0) and (0, 0, 3), then the circulation over the boundary (the three sizes) is the sum equal to -3.5 by lit;x*i+y*z*j+(x+z)*k;(1-t)*i+2*t*j;t;0;1;x;y;z || lit;x*i+y*z*j+(x+z)*k;(2-2*t)*j+3*t*k;t;0;1;x;y;z || lit;x*i+y*z*j+(x+z)*k;t*i+(3-3*t)*k;t;0;1;x;y;z ||. The curl vector can be obtained by vec;cul(x*i+y*z*j+(x+z)*k,x,y,z) ||. A parametrization of the surface is 〈u, v, 1-3u-1.5v〉, and the normal vector can be got by vec;(i-3*k)**(j-1.5*k) ||, the dot product vec;(-y*i-j)*(3*i+1.5*j+k) ||, and the surface integral evaluated by the double integral of curl(F(r\((u,v)\))·N(\(u,v)\) over the region \(D\) is -3.5 by itg;-1.5-3*v;v;0;-2*u+2;u;0;1 ||.
Examples If F = 〈x2y, xz,yz〉, and an oriented surface is a cylinder of radius 3 and the central axis at z-axis from 1 to 5 (exclude to bases). The curl vector is obtained by vec;cul(x*y**2*i+x*z*j+y*z*k,x,y,z) ||, the surface integral is -36π, which can be got by sit;(z-x)*i+(z-2*x*y)*k;3*cos(t)*i+3*sin(t)*j+s*k;t;0;2*pi;s;1;5;x;y;z ||, and the circulation is the sum of two integrals by lit;x*y**2*i+x*z*j+y*z*k;3*cos(t)*i+3*sin(t)*j+k;t;0;2*pi;x;y;z || lit;x*y**2*i+x*z*j+y*z*k;3*cos(t)*i+3*sin(t)*j +5*k;t;2*pi;0;x;y;z || over the two bases, which is 9π - 45π.
Divergence: [ vec; dvg(vexpr, x, y, z)]The divergence of a vector is defined by div(F) = ∇·F = \(\frac{∂F_1}{∂x}+\frac{∂F_2}{∂y}+\frac{∂F_3}{∂z}\), which is a scalar. Use the code pattern "vec; dvg(vexpr, x, y, z)" to find the divergence of a vector, where "vexpr" is the expression of the vector field, "x;y;z" are the variables involved in the field.
Examples
(1) Find div(〈2x, ey, z〉) by vec;dvg(2*x*i-exp(y)*j+z**2*k,x,y,z) || dvg(2*x*i-exp(y)*j+z**2*k,x,y,z) ||.
(2) Find div(F) by vec;dvg((2*y*z*i-x*z*j-x*y*k)/(x**2+y**2+z**2),x,y,z) || for F = 〈2yz/r, -xz/r, -xy/r〉 and r = x2 + y2 + z2.
Divergence theorem (3D analogue of Green's theorem for flux) Suppose \(S\) is a closed surface that encloses a region \(W\) in R3. Assume that \(S\) is oriented with normal vectors pointing to the outside of \(W\), and that F = \(⟨P,Q,R⟩\) is defined and differentiable on \(W\). Then \(\iint_s\)F·\(d\)S = \(\iiint_w\)div(F)\(dV\) is the flux of F through \(S\) for div(F) = \(P_x+Q_y+R_z\).
The theorem says the flux outwards through \(S\) (net amount leaving \(W\) per unit time) is equal to the total amount of sources (minus sinks) in \(W\). On the right-hand side, div(F) is the source rate that measures flux generated per unit volume.
The flux of F = \(z{\bf k}\) through a sphere of radius \(a\) is \(\iiint_W1dV=\frac{4πa^3}{3}\) because div(F) = 1. If F = \(x{\bf i}+y{\bf j}+z{\bf k}\), the flux is \(4πa^3\) because div(F) = 3.
If div(F) = 1, then the surface integral through a closed surface is equal to the enclosed volume. By the divergence and Stoke's theorems, the surface integral of a curl vector curl(F) through all closed surfaces is 0 because div(curl(F)) = 0, or the boundary of a closed surface is empty.
Computing volume In particular, if F = 〈x, y, z〉, then the volume of the enclosed region W in R3 is the surface integral \(\frac{1}{3}\iint_s\)F·\(d\)S = \(\iiint_W\)div(F)dV because div(F) = 3.
Examples
(1) If the region W is a unit cube on the first octant, so 0 ≤ x ≤ 1, 0 ≤ y ≤ 1, 0 ≤ z ≤ 1, and the surface integral of F over the cube is 3. But computing the surface integral \(\iint_s\)F·\(d\)S involves 6 faces, which is time consuming and tedious.
(2) If F = 〈x, 0, 0〉 and the surface is the unit sphere centered at the origin, the flux is just the volume of the sphere 4π/3 by sit;x*i;sin(s)*cos(t)*i+sin(s)*sin(t)*j+cos(s)*k;s;0;pi;t;0;2*pi;x ||.
Examples If F = yj, and the region W is enclosed by z = 4 - x2 - y2 for 0 ≤ z ≤ 2, then r(r, t)=〈rcos(t), rsin(t), 4 - r2〉 be a parametrization of the region. Then sit;y*j;r*cos(t)*i+r*sin(t)*j+(4-r**2)*k;r;0;2;t;0;2*pi;y || gives the surface integral, and itg;r;z;0;4-r**2;r;0;2;t;0;2*pi || gives the same result.
Examples If F = xi and the region W is enclosed by z = x2 + y2 for z = 0 and 9, find the surface integral by the sum by sit;x*i;r**(1/2)*cos(t)*i+r**(1/2)*sin(t)*j+r*k;t;0;2*pi;r;0;9;x || sit;x*i;r*cos(t)*i+r*sin(t)*j+3*k;r;0;3;t;0;2*pi;x ||, and the volume by itg;r;z;0;r**2;r;0;3;t;0;2*pi ||.
Examples Use the divergence theorem to evaluate flux through a closed surface. If F = 〈yex, zy, xz-3〉 and the region is enclosed by 0 ≤ x ≤ 3, 0 ≤ y ≤ 4, 1 ≤ z ≤ 5. The flux through the box by the divergence theorem is given by vec;dvg(y*exp(x)*i+z*y**2*j+x*z**(-3)*k,x,y,z) || itg;y*exp(x)+2*y*z-3*x/z**(4);x;0;3;y;0;4;z;1;5 ||.
Examples If F = 〈x2, xz, z 〉 and S is the boundary of the region contained in the cylinder x2 + y2 = 1 for x ≤ z ≤ 4. Then div(F) = 2x + 1. So the flux is \(\iint_D\int_x^4(2x+1)dzdA\)\(=\iint_D(2x+1)(4-x)dA\). Convert the double integral to polar coordinates and run the codes itg;(2*r*cos(t)+1)*(4-r*cos(t));r;0;1;t;0;2*pi ||.
If F is a velocity field of a fluid flow, the flux through a closed surface is the flow rate (in volume per unit time) across the surface, and the divergence at a point can be interpreted as flow rate per unit volume, or as flux density. So surface integrals over a small closed surface can be approximated by multiplying the divergence to the enclosed volume. If div(F) = 0, F has no flux through the surface of any region contained in its boundary surface.
Summary While various vector line and surface integrals are different in terms of interpretation and evaluation, Green's, Stoke's, and divergence theorems bridge them. (1) Work (circulation), \(\oint_C{\bf F}·d{\bf r}=\iint_R\text{curl}({\bf F})dA\) (Green 2D), and \(\oint_C{\bf F}·d{\bf r}=\iint_S\text{curl}({\bf F})·{\bf n}dS\) (Stoke 3D and surface-independence). (2) Flux, \(\oint_C{\bf F}·{\bf n}ds=\iint_R\text{div}({\bf F})dA\) (Green 2D), and \(\iint_S{\bf F}·{\bf n}dS=\iiint_D\text{div}({\bf F})dV\) (divergence 3D). (3) \(\int_C∇f·d{\bf r}=f(Q)-f(P)\) (fundamental theorem for line integral).