Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Views: 36
Image: ubuntu2204
Kernel: SageMath 10.3

Surface Integrals

Curves and surfaces

Curves in the 2D plane

  • Explicit form: y=f(x)y=f(x)

  • Implicit form: F(x,y)=0F(x,y)=0

  • Parametric vector form: r(t)=f(t)i+g(t)j\vec r(t)=f(t)\vec i+g(t)\vec j, atba\leq t\leq b

Surfaces in the 3D space

  • Explicit form: z=f(x,y)z = f(x, y)

  • Implicit form: F(x,y,z)=0F(x, y, z) = 0.

  • Parametric vector form: ?

Parametrizations of surfaces

Suppose that r(u,v)=f(u,v)i+g(u,v)j+h(u,v)k\vec r(u,v)=f(u,v)\vec i+g(u,v)\vec j+h(u,v)\vec k is a continuous vector function defined on a region RR in the uvuv-plane and one-to-one on the interior of RR.

  • The range of r\vec r is the surface SS defined or traced by r\vec r.

  • The equation, together with the domain RR, constitutes a parametrization of the surface.

  • uu and vv are parameters, and RR is the parameter domain.

Example: Find a parametrization of the cone using (r,θ)(r,\theta) z=x2+y2,0z1.z=\sqrt{x^2+y^2},\quad 0\leq z\leq 1.

Solution: r(r,θ)=(rcosθ)i+(rsinθ)j+rk.0r1,0θ2π. \vec r(r,\theta)=(r\cos\theta)\vec i+(r\sin \theta)\vec j+r\vec k.\quad 0 \leq r \leq 1,\quad 0 \leq \theta \leq 2\pi.

Example: Find a parametrization of the sphere using (ϕ,θ)(\phi,\theta). x2+y2+z2=a2x^2 + y^2 + z^2 = a^2

Solution: r(ϕ,θ)=(asinϕcosθ)i+(asinϕsinθ)j+(acosϕ)k.0ϕπ,0θ2π.\vec r(\phi,\theta)=(a \sin \phi \cos \theta)\vec i + (a \sin \phi \sin \theta)\vec j + (a \cos \phi) \vec k.\quad 0 \leq \phi \leq \pi,\quad 0 \leq \theta \leq 2\pi.

Example: Find a parametrization of the cylinder: x2+(y3)2=9,0z5.x^2+(y-3)^2=9,\qquad 0\leq z\leq 5.

Solution: r(θ,z)=(3sin2θ)i+(6sin2θ)j+(z)k.0θπ,0z5. \vec r(\theta,z)=(3\sin{2\theta})\vec i + (6\sin^2\theta)\vec j + (z) \vec k.\quad 0 \leq \theta \leq \pi,\quad 0 \leq z \leq 5.

Smooth surface

A curved surface SS is expressed as r(u,v)=f(u,v)i+g(u,v)j+h(u,v)k, aub, cvd.\vec r(u, v) = f(u, v)\vec i + g(u, v)\vec j + h(u, v)\vec k,~a \leq u\leq b,~c \leq v \leq d. The partial derivatives are ru=ru=fui+guj+hukrv=rv=fvi+gvj+hvk\begin{align*} \vec r_u={\partial \vec r\over\partial u}={\partial f\over\partial u}\vec i+{\partial g\over\partial u}\vec j+{\partial h\over\partial u}\vec k\\ \vec r_v={\partial \vec r\over\partial v}={\partial f\over\partial v}\vec i+{\partial g\over\partial v}\vec j+{\partial h\over\partial v}\vec k \end{align*}

Definition A parametrized surface r(u,v)=f(u,v)i+g(u,v)j+h(u,v)k\vec r(u, v) =f(u, v)\vec i + g(u, v)\vec j + h(u, v)\vec k is smooth if ru\vec r_u and rv\vec r_v are continuous and ru×rv\vec r_u\times \vec r_v is never zero on the interior of the parameter domain (make sure that a tangent plane exists).

Surface area

Definition The area of the smooth surface r(u,v)=f(u,v)i+g(u,v)j+h(u,v)k, aub, cvd\vec r(u, v) = f(u, v)\vec i + g(u, v)\vec j + h(u, v)\vec k,~a \leq u\leq b,~c \leq v \leq d is A=Rru×rvdA=cdabru×rvdudv=cdabdσ.A=\iint_R|\vec r_u\times \vec r_v|dA=\int_c^d\int_a^b|\vec r_u\times\vec r_v|dudv=\int_c^d\int_a^b{\color{red}d\sigma}.

Example: Find the surface area of the cone

z=x2+y2, 0z1.z=\sqrt{x^2+y^2},~0\leq z\leq 1.

Solution: We have r(r,θ)=(rcosθ)i+(rsinθ)j+rk,0r1, 0θ2π.\vec r(r,\theta)=(r\cos\theta)\vec i+(r\sin\theta)\vec j+r\vec k,\quad 0\leq r\leq 1,~0\leq\theta\leq 2\pi.

rr×rθ=(rcosθ)i+(rsinθ)j+rk\vec r_r \times \vec r_{\theta} = (-r \cos \theta)\vec i + (-r \sin \theta)\vec j + r\vec k

Thus rr×rθ=2r.|\vec r_r \times \vec r_{\theta}|=\sqrt{2}r.

Area=02π01rr×rdrdθ=02π012rdrdθ=2πArea = \int_0^{2\pi}\int_0^1|\vec r_r \times \vec r|drd\theta= \int_0^{2\pi}\int_0^1 \sqrt{2}rdrd\theta=\sqrt{2}\pi
reset() var('x, y, z, length, theta') r(length, theta) = vector((length*cos(theta), length*sin(theta), length)) show('r(r,theta) =', r(length, theta), 'for 0 <= theta <= 2*pi, 0<=length<=1') rlength = diff(r, length) rtheta = diff(r, theta) show('The area is ', rlength.cross_product(rtheta).norm().integral(length, 0, 1).integral(theta, 0, 2*pi))

r(r,theta) =(lengthcos(θ),lengthsin(θ),length)for 0 <= theta <= 2*pi, 0<=length<=1\displaystyle \verb|r(r,theta)|\verb| |\verb|=| \left(\mathit{length} \cos\left(\theta\right),\,\mathit{length} \sin\left(\theta\right),\,\mathit{length}\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|theta|\verb| |\verb|<=|\verb| |\verb|2*pi,|\verb| |\verb|0<=length<=1|

The area is2π\displaystyle \verb|The|\verb| |\verb|area|\verb| |\verb|is| \sqrt{2} \pi

Example: Find the surface area of a sphere of radius aa.

Solution: We have r(ϕ,θ)=(asinϕcosθ)i+(asinϕsinθ)j+(acosϕ)k,0ϕπ, 0θ2π,\vec r(\phi,\theta)=(a\sin\phi\cos\theta)\vec i+(a\sin\phi\sin\theta)\vec j+(a\cos\phi)\vec k,\quad 0\leq \phi\leq \pi,~0\leq \theta\leq 2\pi, and rϕ×rθ=a2sinϕ|\vec r_\phi\times\vec r_\theta|=a^2\sin\phi. Thus Area=02π0πa2sinϕdϕdθ=4πa2Area = \int_0^{2\pi}\int_0^{\pi} a^2\sin \phi d\phi d\theta = 4\pi a^2

reset() var('x, y, z, phi, theta, a') r(phi, theta) = vector((a*sin(phi)*cos(theta), a*sin(phi)*sin(theta), a*cos(phi))) show('r(phi,theta) =', r(phi, theta), 'for 0 <= theta <= 2*pi, 0<=phi<=pi') rlength = diff(r, phi) rtheta = diff(r, theta) show('The area is ', rlength.cross_product(rtheta).norm().integral(phi, 0, pi, algorithm='giac').integral(theta, 0, 2*pi, algorithm='giac')) # The computation is wrong in the sign using the default algorithm, and we need to change to giac.

r(phi,theta) =(acos(θ)sin(ϕ),asin(ϕ)sin(θ),acos(ϕ))for 0 <= theta <= 2*pi, 0<=phi<=pi\displaystyle \verb|r(phi,theta)|\verb| |\verb|=| \left(a \cos\left(\theta\right) \sin\left(\phi\right),\,a \sin\left(\phi\right) \sin\left(\theta\right),\,a \cos\left(\phi\right)\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|theta|\verb| |\verb|<=|\verb| |\verb|2*pi,|\verb| |\verb|0<=phi<=pi|

The area is4πa2\displaystyle \verb|The|\verb| |\verb|area|\verb| |\verb|is| 4 \, \pi a^{2}

Implicit surface

Surfaces are often presented as level sets of a function, described by an equation such as F(x,y,z)=cF(x,y,z)=c for some constant c.

Formula for the Surface Area of an Implicit Surface

The area of the surface F(x,y,z)=cF(x, y, z) = c over a closed and bounded plane region RR is Surface area=RFFpdA\mbox{Surface area} = \iint_R{|\nabla F|\over |\nabla F\cdot \vec p|}dA where p=i\vec p=\vec i, j\vec j, or k\vec k is normal to RR and Fp0\nabla F\cdot \vec p\neq 0.

Example: Find the area of the surface cut from the bottom of the paraboloid x2+y2z=0x^2 + y^2 - z = 0 by the plane z=4z = 4.

Solution:

At any point (x,y,z)(x,y,z) on the surface, we have F=2xi+2yjk\nabla F = 2x \vec i + 2y \vec j - \vec k F=4x2+4y2+1|\nabla F| = \sqrt{4x^2 + 4y^2 + 1} Fp=Fk=1=1.|\nabla F \cdot \vec p| = |\nabla F \cdot \vec k| = |-1| = 1. Thus surface area

=RFFpdA=x2+y244x2+4y2+1dxdy=02π024r2+1rdrdθ=π6(17171)\begin{align*} &= \iint_R{|\nabla F|\over |\nabla F\cdot \vec p|}dA\\ &= \iint_{x^2+y^2 \leq 4}\sqrt{4x^2+4y^2+1}dxdy\\ &= \int_0^{2\pi}\int_0^2\sqrt{4r^2+1}rdrd\theta\\ &= {\pi\over 6}(17\sqrt{17}-1) \end{align*}
reset() var('x, y, z, phi, theta, a') F(x,y,z) = x^2+y^2-z Fdiff = F.diff()(z=4) # We can just let $z=4$ because F.diff does not depends on z. Otherwise, we need to substitue z with x and y. show('The area is ', (Fdiff.norm()/Fdiff[2].norm()).integral(y, -sqrt(4-x^2), sqrt(4-x^2)).integral(x, -2, 2))
Warning, choosing root of [1,0,%%%{8,[4]%%%}+%%%{-166,[2]%%%}+%%%{-42,[0]%%%},0,%%%{16,[8]%%%}+%%%{424,[6]%%%}+%%%{2913,[4]%%%}+%%%{1378,[2]%%%}+%%%{169,[0]%%%}] at parameters values [-89] Warning, choosing root of [1,0,%%%{8,[4]%%%}+%%%{-38,[2]%%%}+%%%{-10,[0]%%%},0,%%%{16,[8]%%%}+%%%{-88,[6]%%%}+%%%{97,[4]%%%}+%%%{66,[2]%%%}+%%%{9,[0]%%%}] at parameters values [1.27755734511]

The area is16π(17171)\displaystyle \verb|The|\verb| |\verb|area|\verb| |\verb|is| \frac{1}{6} \, \pi {\left(17 \, \sqrt{17} - 1\right)}

Surface Integrals

Applications

  • the mass of a surface

  • total electrical charge on a surface

  • flow of a liquid across a curved membrane

Two forms

  • a scalar function over a surface

  • vector fields over a surface (flux)

Surface integral of GG over the surface SS SG(x,y,z)dσ\iint_SG(x,y,z)d\sigma

  • If r(u,v)=f(u,v)i+g(u,v)j+h(u,v)k\vec r(u,v)=f(u,v)\vec i+g(u,v)\vec j+h(u,v)\vec k, (u,v)R(u,v)\in R, we have SG(x,y,z)dσ=RG(f(u,v),g(u,v),h(u,v))ru×rvdudv.\iint_SG(x,y,z)d\sigma=\iint_RG(f(u,v),g(u,v),h(u,v)){\color{red}|\vec r_u\times \vec r_v|}dudv.

  • z=f(x,y)z=f(x,y) SG(x,y,z)dσ=RG(x,y,f(x,y))fx2+fy2+1dxdy.\iint_SG(x,y,z)d\sigma=\iint_RG(x,y,f(x,y)){\color{red}\sqrt{f_x^2+f_y^2+1}}dxdy.

  • Implicitly F(x,y,z)=cF(x,y,z)=c SG(x,y,z)dσ=RG(x,y,z)FFpdA,\iint_SG(x,y,z)d\sigma=\iint_RG(x,y,z){\color{red}|\nabla F|\over |\nabla F\cdot \vec p|}dA, where p\vec p is a unit vector normal to RR and Fp0\nabla F\cdot \vec p\neq 0.

Example: Integrate G(x,y,z)=xyzG(x, y, z) = xyz over the surface of the cube cut from the first octant by the planes x=1x = 1, y=1y = 1, and z=1z = 1

Solution: There are six sides and we compute the surface integral over the six sides one by one.

  • Side A: 0101xydxdy=14\begin{align*} \int_0^1\int_0^1 xydxdy={1\over 4} \end{align*}

  • Side B: 0101yzdydz=14\begin{align*} \int_0^1\int_0^1 yzdydz={1\over 4} \end{align*}

  • Side C: 0101xzdxdz=14\begin{align*} \int_0^1\int_0^1 xzdxdz={1\over 4} \end{align*}

  • The surface integral over the other three sides are all 0, and the total surface integral is only 3/4.

Example: Integrate G(x,y,z)=x2G(x,y,z)=x^2 over the cone z=x2+y2z=\sqrt{x^2+y^2}, 0z10\leq z\leq 1

Solution:

r(r,θ)=(rcosθ)i+(rsinθ)j+rk,0r1, 0θ2π.\vec r(r,\theta)=(r\cos\theta)\vec i+(r\sin\theta)\vec j+r\vec k,\quad 0\leq r\leq 1,~0\leq \theta\leq 2\pi.rr×rθ=2r|\vec r_r\times \vec r_\theta|=\sqrt{2}rSx2dσ=02π01(r2cos2θ)2rdrdθ=02π14cos2θ2dθ=π24\begin{align*} \iint_Sx^2d\sigma =&\int_0^{2\pi}\int_0^1(r^2\cos^2\theta)\sqrt{2}rdrd\theta\\ =&\int_0^{2\pi}{1\over 4}\cos^2\theta\sqrt{2}d\theta\\ =&{\pi\sqrt{2}\over 4} \end{align*}
reset() var('x, y, z, phi, theta, a') G(x,y,z) = x^2 h(x,y) = sqrt(x^2+y^2) show('The area is ', (G(x,y,h(x,y))*sqrt(h.diff().norm()^2+1)).integral(y, -sqrt(1-x^2), sqrt(1-x^2)).integral(x, -1, 1))

The area is142π\displaystyle \verb|The|\verb| |\verb|area|\verb| |\verb|is| \frac{1}{4} \, \sqrt{2} \pi

Example: Integrate G(x,y,z)=1x2y2G(x,y,z)=\sqrt{1-x^2-y^2} over the ''football'' suface SS formed by rotating the curve x=coszx=\cos z, y=0y=0, π/2zπ/2-\pi/2\leq z\leq \pi/2, around the zz-axis

Solution:

r(z,θ)=coszcosθi+coszsinθj+zk,π2zπ2, 0θ2π.\vec r(z,\theta)=\cos z\cos \theta\vec i+\cos z\sin \theta\vec j+z\vec k,\quad{-{\pi\over2}}\leq z\leq {\pi\over 2},\quad~0\leq \theta\leq 2\pi.rz×rθ=cosz1+sin2z|\vec r_z\times \vec r_\theta|=\cos z\sqrt{1+\sin^2z}π/2π/202πsinzcosz1+sin2zdθdz=4π0π/2sinzcosz1+sin2zdz=4π31+sin2z30π/2=4π3(221)\begin{align*} &\int_{-\pi/2}^{\pi/2}\int_0^{2\pi}|\sin z|\cos z\sqrt{1+\sin^2z} d\theta dz\\ =&4\pi\int_{0}^{\pi/2}\sin z\cos z\sqrt{1+\sin^2z} dz\\ =&{4\pi\over 3}\sqrt{1+\sin^2z}^3\Big|_{0}^{\pi/2}\\ =&{4\pi\over3}(2\sqrt{2}-1) \end{align*}
reset() var('x, y, z, theta, a') r(z, theta) = vector((cos(z)*cos(theta), cos(z)*sin(theta), z)) show('r(z,theta) =', r(z, theta), 'for 0 <= theta <= 2*pi, -pi/2<=z<=pi/2') G(x,y,z) = sqrt(1-x^2-y^2) rz = diff(r, z) rtheta = diff(r, theta) show(G(r[0],r[1],r[2])*rz.cross_product(rtheta).norm().full_simplify()) show('The surface integral is ', (G(r[0],r[1],r[2])*rz.cross_product(rtheta).norm()).integral(z, -pi/2, pi/2, algorithm='giac').integral(theta, 0, 2*pi, algorithm='giac')) ## This computation is wrong with the default algorithm and we need to use the algorithm giac

r(z,theta) =(cos(θ)cos(z),cos(z)sin(θ),z)for 0 <= theta <= 2*pi, -pi/2<=z<=pi/2\displaystyle \verb|r(z,theta)|\verb| |\verb|=| \left(\cos\left(\theta\right) \cos\left(z\right),\,\cos\left(z\right) \sin\left(\theta\right),\,z\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|theta|\verb| |\verb|<=|\verb| |\verb|2*pi,|\verb| |\verb|-pi/2<=z<=pi/2|

cos(θ)2cos(z)2cos(z)2sin(θ)2+1sin(z)4+1\displaystyle \sqrt{-\cos\left(\theta\right)^{2} \cos\left(z\right)^{2} - \cos\left(z\right)^{2} \sin\left(\theta\right)^{2} + 1} \sqrt{-\sin\left(z\right)^{4} + 1}

The surface integral is43π(221)\displaystyle \verb|The|\verb| |\verb|surface|\verb| |\verb|integral|\verb| |\verb|is| \frac{4}{3} \, \pi {\left(2 \, \sqrt{2} - 1\right)}

The surface integral is43π(221)\displaystyle \verb|The|\verb| |\verb|surface|\verb| |\verb|integral|\verb| |\verb|is| \frac{4}{3} \, \pi {\left(2 \, \sqrt{2} - 1\right)}

Example: Evaluate Sx(1+2z)dσ\iint_S \sqrt{x(1 + 2z)} d\sigma on the portion of the cylinder z=y2/2z = y^2/2 over the triangular region R:x0, y0, x+y1R: x\geq 0,~y\geq 0,~x + y \leq 1 in the xyxy-plane

Solution:

dσ=y2+1dxdyd\sigma = \sqrt{y^2+1}dxdyRx(1+2z)1+y2dxdy=0101xx(1+y2)dydx=01x(1x+13(1x)3)dx=284945\begin{align*} &\iint_R\sqrt{x(1+2z)}\sqrt{1+y^2}dxdy\\ =&\int_0^1\int_0^{1-x}\sqrt{x}(1+y^2)dydx\\ =&\int_0^1\sqrt{x}\left(1-x+{1\over3}(1-x)^3\right)dx\\ =&{284}\over{945} \end{align*}
reset() var('x, y, z, phi, theta, a') assume(y,'real') assume(1>x>0) G(x,y,z) = sqrt(x*(1+2*z)) h(x, y) = y^2/2 show('The area is ', (G(x,y,h(x,y))*sqrt(h.diff(x)^2+h.diff(y)^2+1)).integral(y, 0, 1-x).integral(x, 0, 1))
Warning, choosing root of [1,0,%%%{-2,[1,2]%%%}+%%%{-2,[1,0]%%%}+%%%{-2,[0,2]%%%}+%%%{-2,[0,0]%%%},0,%%%{1,[2,4]%%%}+%%%{2,[2,2]%%%}+%%%{1,[2,0]%%%}+%%%{-2,[1,4]%%%}+%%%{-4,[1,2]%%%}+%%%{-2,[1,0]%%%}+%%%{1,[0,4]%%%}+%%%{2,[0,2]%%%}+%%%{1,[0,0]%%%}] at parameters values [73.519035968,0] Warning, choosing root of [1,0,%%%{-2,[1,2]%%%}+%%%{-2,[1,0]%%%}+%%%{-2,[0,2]%%%}+%%%{-2,[0,0]%%%},0,%%%{1,[2,4]%%%}+%%%{2,[2,2]%%%}+%%%{1,[2,0]%%%}+%%%{-2,[1,4]%%%}+%%%{-4,[1,2]%%%}+%%%{-2,[1,0]%%%}+%%%{1,[0,4]%%%}+%%%{2,[0,2]%%%}+%%%{1,[0,0]%%%}] at parameters values [62.4600259969,0] Warning, choosing root of [1,0,%%%{-2,[1,2]%%%}+%%%{-2,[1,0]%%%}+%%%{-2,[0,2]%%%}+%%%{-2,[0,0]%%%},0,%%%{1,[2,4]%%%}+%%%{2,[2,2]%%%}+%%%{1,[2,0]%%%}+%%%{-2,[1,4]%%%}+%%%{-4,[1,2]%%%}+%%%{-2,[1,0]%%%}+%%%{1,[0,4]%%%}+%%%{2,[0,2]%%%}+%%%{1,[0,0]%%%}] at parameters values [74.7709350525,0] No checks were made for singular points of antiderivative sqrt(sageVARx)/3*sageVARy^3+sqrt(sageVARx)*sageVARy for definite integration in [0,-sageVARx+1]

The area is284945\displaystyle \verb|The|\verb| |\verb|area|\verb| |\verb|is| \frac{284}{945}

Mass and moment formulas for very thin shells

  • Mass: M=Sδdσ,δ=δ(x,y,z) is the density at (x,y,z)M=\iint_S\delta d\sigma,\quad \delta=\delta(x,y,z)\text{ is the density at }(x,y,z)

  • First moments about the coordinate planes: Myz=Sxδdσ,Mxz=Syδdσ,Mxy=SzδdσM_{yz}=\iint_Sx\delta d\sigma,\quad M_{xz}=\iint_Sy\delta d\sigma,\quad M_{xy}=\iint_Sz\delta d\sigma

  • Coordinates of the center of mass: xˉ=Myz/M,yˉ=Mxz/M,zˉ=Mxy/M\bar x=M_{yz}/M,\quad \bar y=M_{xz}/M,\quad \bar z=M_{xy}/M

  • Moments of inertia about axes and other straight lines Ix=S(y2+z2)δdσ,Iy=S(x2+z2)δdσ,Iz=S(x2+y2)δdσI_x=\iint_S(y^2+z^2)\delta d\sigma,\quad I_y=\iint_S(x^2+z^2)\delta d\sigma,\quad I_z=\iint_S(x^2+y^2)\delta d\sigma IL=Sr2δdσ,r(x,y,z)=distance from the point (x,y,z) to line LI_L=\iint_Sr^2\delta d\sigma,\quad r(x,y,z)=\text{distance from the point }(x,y,z)\text{ to line }L

Example: Find the center of mass of a thin hemispherical shell of radius aa and constant density δ\delta.

Solution:

M=2πa2δM=2\pi a^2\deltaz=a2x2y2dσ=azdASzδdσ=RzδazdA=δπa3\begin{align*} z=&\sqrt{a^2-x^2-y^2}\\ d\sigma=&{a\over z}dA\\ \iint_Sz\delta d\sigma=&\iint_Rz\delta {a\over z}dA=\delta\pi a^3 \end{align*}
reset() var('x, y, z, a') assume(a>0) G(x,y,z) = 1 h(x, y) = sqrt(a^2-x^2-y^2) M = (G(x,y,h(x,y))*sqrt(h.diff(x)^2+h.diff(y)^2+1)) show('The total mass is ', M.integral(y, -sqrt(a^2-x^2), sqrt(a^2-x^2)).integral(x, -a, a)) Center = vector(((M*x).integral(y, -sqrt(a^2-x^2), sqrt(a^2-x^2)).integral(x, -a, a),(M*y).integral(y, -sqrt(a^2-x^2), sqrt(a^2-x^2)).integral(x, -a, a),(M*h(x,y)).integral(y, -sqrt(a^2-x^2), sqrt(a^2-x^2)).integral(x, -a, a)))/M.integral(y, -sqrt(a^2-x^2), sqrt(a^2-x^2)).integral(x, -a, a) print('The center is ', Center)
Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real): Check [abs(sageVARa^2-sageVARx^2-sageVARy^2)] Discontinuities at zeroes of sageVARa^2-sageVARx^2-sageVARy^2 were not checked Warning, need to choose a branch for the root of a polynomial with parameters. This might be wrong. The choice was done assuming [sageVARa,sageVARx]=[-53,-45] No checks were made for singular points of antiderivative abs(sageVARa)*sign(sageVARa^2-sageVARx^2-sageVARy^2)*asin(sageVARy/sqrt(sageVARa^2-sageVARx^2)) for definite integration in [-sqrt(sageVARa^2-sageVARx^2),sqrt(sageVARa^2-sageVARx^2)]

The total mass is2πa2\displaystyle \verb|The|\verb| |\verb|total|\verb| |\verb|mass|\verb| |\verb|is| 2 \, \pi a^{2}

Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real): Check [abs(sageVARa^2-sageVARx^2-sageVARy^2)] Discontinuities at zeroes of sageVARa^2-sageVARx^2-sageVARy^2 were not checked Warning, need to choose a branch for the root of a polynomial with parameters. This might be wrong. The choice was done assuming [sageVARa,sageVARx]=[-42,-63] No checks were made for singular points of antiderivative sageVARx*abs(sageVARa)*sign(sageVARa^2-sageVARx^2-sageVARy^2)*asin(sageVARy/sqrt(sageVARa^2-sageVARx^2)) for definite integration in [-sqrt(sageVARa^2-sageVARx^2),sqrt(sageVARa^2-sageVARx^2)]
The center is (0, 0, 1/2*a)
Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Unable to build a single algebraic extension for simplifying. Trying rational simplification only. This might return a wrong answer if simplifying 0/0! Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real): Check [abs(sageVARa^2-sageVARx^2-sageVARy^2)] Discontinuities at zeroes of sageVARa^2-sageVARx^2-sageVARy^2 were not checked Warning, need to choose a branch for the root of a polynomial with parameters. This might be wrong. The choice was done assuming [sageVARa,sageVARx]=[-53,-33] No checks were made for singular points of antiderivative abs(sageVARa)*sign(sageVARa^2-sageVARx^2-sageVARy^2)*asin(sageVARy/sqrt(sageVARa^2-sageVARx^2)) for definite integration in [-sqrt(sageVARa^2-sageVARx^2),sqrt(sageVARa^2-sageVARx^2)]

Example: Find the center of mass of a thin shell of density δ=1/z2\delta=1/z^2 cut from the cone z=x2+y2z=\sqrt{x^2+y^2} by the planes z=1z=1 and z=2z=2

Solution:

r(r,θ)=rcosθi+rsinθj+rk\vec r(r,\theta)=r\cos\theta\vec i+r\sin\theta\vec j+r\vec krr×rθ=2r|\vec r_r\times \vec r_\theta|=\sqrt{2}rM=Sδdσ=02π121r22rdrdθ=2π2ln2Mxy=Szδdσ=02π121r2rdrdθ=2π2\begin{align*} M=&\iint_S\delta d\sigma =\int_0^{2\pi}\int_1^2 {1\over r^2}\sqrt{2}rdrd\theta\\ =&2\pi\sqrt{2}\ln 2\\ M_{xy}=&\iint_Sz\delta d\sigma =\int_0^{2\pi}\int_1^2 {1\over r}\sqrt{2}rdrd\theta\\ =& 2\pi\sqrt{2} \end{align*}
reset() var('x, y, z, length, theta') delta(x,y,z) = 1/z^2 r(length, theta) = vector((length*cos(theta),length*sin(theta), length)) show('The surface is ', r(length,theta), ' for 1<=length<=2, 0<=theta<=2pi') rlength = diff(r, length) rtheta = diff(r, theta) M = delta(r[0],r[1],r[2])*(rlength.cross_product(rtheta)).norm() show('The total mass is ', M.integral(length, 1, 2).integral(theta, 0, 2*pi)) Center = vector(((M*r[0]).integral(length, 1, 2).integral(theta, 0, 2*pi),(M*r[1]).integral(length, 1, 2).integral(theta, 0, 2*pi),(M*r[2]).integral(length, 1, 2).integral(theta, 0, 2*pi)))/M.integral(length, 1, 2).integral(theta, 0, 2*pi) print('The center is ', Center)

The surface is(lengthcos(θ),lengthsin(θ),length) for 1<=length<=2, 0<=theta<=2pi\displaystyle \verb|The|\verb| |\verb|surface|\verb| |\verb|is| \left(\mathit{length} \cos\left(\theta\right),\,\mathit{length} \sin\left(\theta\right),\,\mathit{length}\right) \verb| |\verb|for|\verb| |\verb|1<=length<=2,|\verb| |\verb|0<=theta<=2pi|

The total mass is22πlog(2)\displaystyle \verb|The|\verb| |\verb|total|\verb| |\verb|mass|\verb| |\verb|is| 2 \, \sqrt{2} \pi \log\left(2\right)

The center is (0, 0, 1/log(2))

Vector integral on a surface

The surface is in 3D. How do we generalize the line integral to 3D?

Recall that in 2D, we have the following two integrals.

  • CFTds\int_C\vec{F}\cdot\vec{T}ds

  • CFnds\int_C\vec{F}\cdot\vec{n}ds

Orientation of a surface

A smooth surface SS is orientable (or two-sided) if it is possible to define a field of unit normal vectors n\vec n on SS, which varies continuously with position. By convention, we usually choose n\vec n on a closed surface to point outward.

Once n\vec n has been chosen, we say that we have oriented the surface, and we call it with its normal field an oriented surface. At any point, the vector n\vec n is called the positive direction.

Surface integrals of vector fields

Definition Let F\vec F be a vector field in three-dimensional space with continuous components defined over a smooth surface SS having a chosen field of normal unit vectors n\vec n orienting SS. Then the surface integral of F\vec F over SS is SFndσ\iint_S\vec F\cdot\vec n d\sigma The surface integral of F\vec F is also called the flux of the vector field across the oriented surface SS.

Example: Find the flux of F=yzi+xjz2k\vec F=yz\vec i+x\vec j-z^2\vec k through the parabolic cylinder y=x2, 0x1, 0z4y = x^2,~0 \leq x \leq 1,~0 \leq z \leq 4, in the direction n\vec n indicated in the figure.

Solution: r(x,z)=xi+x2j+zk, 0x1,0z4rx×rz=2xijn=2xij4x2+1\begin{align*} \vec r(x,z)=&x\vec i+x^2\vec j+z\vec k,~0\leq x\leq1,0\leq z\leq 4\\ \vec r_x\times \vec r_z = & 2x\vec i-\vec j\\ \vec n= &{2x\vec i-\vec j\over\sqrt{4x^2+1}} \end{align*}

SFndσ=04012x3zx4x2+14x2+1dxdz=0116x34xdx=2\begin{align*} \iint_S\vec F\cdot\vec n d\sigma=& \int_0^4\int_0^1 {2x^3z-x\over\sqrt{4x^2+1}}\sqrt{4x^2+1}dxdz\\ =&\int_0^116x^3-4xdx=2 \end{align*}
reset() var('x, y, z') F(x,y,z) = vector((y*z, x, -z^2)) r(x, z) = vector((x, x^2, z)) show('The surface is ', r(x,z), ' for 0<=x<=1, 0<=z<=4.') rx = diff(r, x) rz = diff(r, z) M = F(r[0],r[1],r[2]).dot_product(rx.cross_product(rz)) show('The total flux is ', M.integral(x, 0, 1).integral(z, 0, 4))

The surface is(x,x2,z) for 0<=x<=1, 0<=z<=4.\displaystyle \verb|The|\verb| |\verb|surface|\verb| |\verb|is| \left(x,\,x^{2},\,z\right) \verb| |\verb|for|\verb| |\verb|0<=x<=1,|\verb| |\verb|0<=z<=4.|

The total flux is2\displaystyle \verb|The|\verb| |\verb|total|\verb| |\verb|flux|\verb| |\verb|is| 2

Simplification for the parametrized case

For the parametrized case dσ=ru×rvdudvd\sigma = |\vec r_u\times \vec r_v|dudvand n=ru×rvru×rv\vec n={\vec r_u\times \vec r_v\over |\vec r_u\times \vec r_v|}

SFndσ=RFru×rvru×rvru×rvdudv=RF(ru×rv)dudv\iint_S\vec F\cdot\vec nd\sigma=\iint_R\vec F\cdot {\vec r_u\times \vec r_v\over |\vec r_u\times \vec r_v|} |\vec r_u\times \vec r_v|dudv=\iint_R\vec F\cdot(\vec r_u \times \vec r_v)dudv

For the level surface g(x,y,z)=cg(x,y,z)=c, we have n=±gg\vec n={\pm}{\nabla g\over |\nabla g|} SFndσ=R(F±gg)ggpdA=RF±ggpdA\iint_S\vec F\cdot\vec n d\sigma=\iint_R(\vec F\cdot {\pm \nabla g\over |\nabla g|}){|\nabla g|\over{|\nabla g \cdot \vec p|}}dA=\iint_R\vec F\cdot{\pm \nabla g \over |\nabla g \cdot \vec p|} dA

Example: Find the flux of F=yzj+z2k\vec F=yz\vec j+z^2\vec k outward through the surface SS cut from the cylinder y2+z2=1y^2+z^2=1, z0z\geq 0, by the planes x=0x=0 and x=1x=1.

Solution:

n=yj+zkz=1y2dσ=1zdAFn=zSFndσ=RxydA=2\begin{align*} \vec n=& y\vec j+z\vec k\\ z=&\sqrt{1-y^2}\\ d\sigma =& {1\over z}dA\\ \vec F\cdot\vec n=& z\\ \iint_S\vec F\cdot\vec n d\sigma =&\iint_{R_{xy}}dA = 2 \end{align*}
reset() var('x, y, z, length, theta, a') assume(a>0) F(x,y,z) = vector((0, y*z, z^2)) r(x, y) = vector((x, y, sqrt(1-y^2))) show('The surface is ', r(x,z), ' for 0<=x<=1, -1<=y<=1.') rx = diff(r, x) ry = diff(r, y) M = F(r[0],r[1],r[2]).dot_product(rx.cross_product(ry)) show('The total flux is ', M.integral(x, 0, 1).integral(y, -1, 1))

The surface is(x,z,z2+1) for 0<=x<=1, -1<=y<=1.\displaystyle \verb|The|\verb| |\verb|surface|\verb| |\verb|is| \left(x,\,z,\,\sqrt{-z^{2} + 1}\right) \verb| |\verb|for|\verb| |\verb|0<=x<=1,|\verb| |\verb|-1<=y<=1.|

The total flux is2\displaystyle \verb|The|\verb| |\verb|total|\verb| |\verb|flux|\verb| |\verb|is| 2