Brain Gains (Rapid Recall, Jivin' Generation)

  1. The top half of the surface $S$ of a donut (a torus) can be parametrized by $\vec r(u,v) = ((5 - 3 \cos u) \cos v, (5 - 3 \cos u) \sin v, 3 \sin u)$ for $0\leq u\leq \pi$ and $0\leq v\leq 2\pi$. Imagine that someone puts icing on the top of this donut (so creates a surface), but the thickness of the icing is more on the top of the donut than on the sides. While not a perfect way to model this situation, we could use $\delta = kz$ for some constant $k$ as a way to model the surface with varying density. Set up an integral to compute the $z$-coordinate of the center-of-mass of the surface $S$ with density function $\delta = kz$. Note that after quite a bit of computation, we can obtain $|\vec r_u\times \vec r_v| = 3 \sqrt{(5-3 \cos u)^2}$.

Solution

We compute $$\bar z = \frac{\iint_S z \delta dS}{\iint_S \delta dS} = \frac{\int_{0}^{\pi}\int_{0}^{2\pi} (3 \sin u) (k 3 \sin u)3 \sqrt{(5-3 \cos u)^2}dvdu}{\int_{0}^{\pi}\int_{0}^{2\pi} (k 3 \sin u) 3 \sqrt{(5-3 \cos u)^2}dvdu} .$$ The following Mathematica code will compute all related quantities.

ClearAll[r, u, v, uB, vB, n]
r = {(5 - 3 Cos[u]) Cos[v], (5 - 3 Cos[u]) Sin[v], 3 Sin[u]};
uB = {u, 0, Pi};
vB = {v, 0, 2 Pi};
n = Cross[D[r, u], D[r, v]];
Norm[n] // ComplexExpand // TrigReduce // FullSimplify
ParametricPlot3D[r, uB, vB]
Integrate[(z k z Norm[n]) /. z -> (3 Sin[u]), uB, vB]/
 Integrate[(k z Norm[n]) /. z -> (3 Sin[u]), uB, vB]
Divergence Theorem

Given a solid domain $D$ with piecewise smooth boundary $\partial D$, where each portion of the boundary is a surface oriented pointing outwards away from $D$, then the integral of the divergence of $\vec F=(M,N,P)$ along $D$ is equal to the outward flux of $\vec F$ across the boundary $\partial D$, which we can write as $$\iiint_D \vec \nabla \cdot \vec F dV = \iint_{\partial D}\vec F\cdot\hat n dS.$$

  • Note that $\partial D$ might consist of multiple surfaces. Sum $\iint_{S}\vec F\cdot\hat n dS$ for each surface $S$ that is part of the boundary to compute $\iint_{\partial D}\vec F\cdot\hat n dS$.
  • For every surface $S$ that is part of the boundary, remember to make sure $\hat n$ is the outward pointing unit vector, pointing away from the solid domain $D$.
  1. Consider the vector field $\vec F = (x,x-z,y+z)$, the solid domain $D$ that lies inside the sphere $x^2+y^2+z^2=25$, and the surface $S$ parametrized by $\vec r(u,v)=(5\sin v\cos u, 5 \sin v \sin u, 5 \cos v)$ for $0\leq u\leq 2\pi$ and $0\leq v\leq \pi$.
    1. Draw the surface $S$ and domain $D$. How are these two objects related?
    2. We can compute $\vec N = \vec r_u\times \vec r_v = (-25 \cos u \sin ^2 v,-25 \sin u \sin ^2 v,-25 \sin v \cos v)$. Determine if $\vec N$ points inward toward the domain $D$ or outwards away from the domain $D$.
    3. Set up $\ds \iint_S \vec F\cdot \hat n dS$ for $\hat n$ pointing outwards, away from the solid inside $S$. This computes the outward flux of $\vec F$ across $S$.
    4. Set up and compute $\ds \iiint_D \vec \nabla \cdot \vec F dV$, the triple integral of the divergence of $\vec F$ over the domain $D$.

Solution

We are on a sphere. As such, at the point $(x,y,z)$ one option for a normal vector is $(x,y,z)$ (point straight out from where you are at), while another is $(-x,-y,-z)$ (point straight back towards the origin). Note that on the surface, we have $x = 5\sin v\cos u$ while the $x$-component of $\vec N$ is $-25 \cos u \sin ^2 v =-5x\sin v$. Because $x$ and $-5x\sin v$ will always have opposite sign, this means that $\vec N$ points inwards. To compute outwards flux, we must multiply $\vec N$ by a negative.

The code below computes the normal vector n, and computes both the flux and triple integral of the divergence.

F = {x^2, 2 y, x + y + z};
r = {5 Cos [u] Sin[v], 5 Sin[u] Sin[v], 5 Cos[v]};
uB = {u, 0, 2 Pi};
vB = {v, 0, Pi};
ParametricPlot3D[r, uB, vB]

n = Cross[D[r, u], D[r, v]] // Simplify

Integrate[F . (-n) /. {x -> r[[1]], y -> r[[2]], z -> r[[3]]}, uB, vB]

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

(*For spherical coordinates, remember we need the Jacobian.*)
Integrate[(3 + 2 rho Cos[theta] Sin[phi]) rho^2 Sin[phi], {rho, 0, 5}, {theta, 0, 2 Pi}, {phi, 0, Pi}]

This chunk of code shows the vector field at points along the surface, so we can visually see that the outward flux is positive.

surface = ParametricRegion[r, Evaluate[{uB, vB}]];
SliceVectorPlot3D[F, surface, {x, -5, 5}, {y, -5, 5}, {z, -5, 5}]
SliceVectorPlot3D[F, surface, {x, -5, 5}, {y, -5, 5}, {z, -5, 5}, VectorScaling -> Automatic, VectorSizes -> Automatic]

Group Problems

  1. For the cone $\vec r(u,v) = (u, u\cos v, u\sin v)$ for $0\leq u\leq 5$ and $0\leq v\leq 2\pi$, set up the integrals needed to compute the center-of-mass of the cone if density at points in the cone is given by $\delta = (x+z+10)$.
  2. Set up an integral to compute the flux of $\vec F = (2x+3y, -3x+4z, 4y+z^2)$ across the surface of the cone from above, using the outward (away from $x$-axis) orientation.