Chapter 9: Vector Calculus
Section 9.8: Divergence Theorem
Example 9.8.5
Apply the Divergence theorem to the vector field F=x y3i+y z j+x2⁢z k and R, the region bounded by two spheres centered at the origin, one with radius 1, the other with radius 1/2.
Solution
Mathematical Solution
Figure 9.8.5(a) contains a sketch of the region R and representative outward normals on the two surfaces bounding R.
use plots, VectorCalculus in module() local p1,p2,p3,p4,p5,p6,p7,N1,N2; N1:=RootedVector(root=[.4,-.4,sqrt(.68)],<.4,-.4,sqrt(.68)>); N2:=RootedVector(root=[.2,-.2,sqrt(.17)],<-.2,.2,-sqrt(.17)>); p1:=sphereplot(1,theta=Pi/2..2*Pi, phi=0..Pi,color=red): p2:=sphereplot(1/2,theta=Pi/2..2*Pi, phi=0..Pi,color=cyan): p3:=PlotVector([N1,N2],color=black,width=.1); p4:=plot3d([r,Pi/2,phi],r=1/2..1,phi=0..Pi,coords=spherical,color=black, style=hidden, grid=[5,25]): p5:=plot3d([r,2*Pi,phi],r=1/2..1,phi=0..Pi,coords=spherical,color=black, style=hidden, grid=[5,25]): p6:=display([p1,p2,p3,p4,p5], scaling=constrained, orientation=[45,70],tickmarks=[3,3,3],axes=frame,lightmodel=none): print(p6); end module: end use:
Figure 9.8.5(a) Region R and outward normals
The divergence of F:
∇·F=∂xx y3+∂yy z+∂zx2z=y3+z+x2
Implement the integral of ∇·F over the interior of R in spherical coordinates:
∫02 π∫0π∫1/21ρ sinφsinθ3+ρ cosφ+ρ sinφcosθ2 ρ2sinφ dρ dφ dθ = 31120 π
To compute the flux through R, note that there are two boundaries, the outer and inner spheres. To compute the flux through the outer sphere, note that on that surface
F·N =x y3y zx2z·xyz = x2⁢y3+x2⁢z2+y2⁢z
Anticipating that this will be integrated over the sphere using spherical coordinates, write
Q=sin⁡φ5⁢cos⁡θ2⁢sin⁡θ3+sin⁡φ2⁢cos⁡φ2⁢cos⁡θ2+sin⁡φ2⁢cos⁡φ⁢sin⁡θ2
as the equivalent for F·N on the surface of the outer sphere. If this be integrated over the sphere in spherical coordinates, the result is
∫02 π∫0 πQ sinφ dφ dθ = 415 π
On the inner sphere, N=−2x i+y j+z k, dσ=1/22sinφ dφ dθ, and F·N becomes
q=−116⁢sin⁡φ5⁢cos⁡θ2⁢sin⁡θ3+18⁢sin⁡φ2⁢cos⁡φ2⁢cos⁡θ2+14⁢sin⁡φ2⁢cos⁡φ⁢sin⁡θ2
The flux through the inner sphere is then ∫02 π∫0 πq sinφ/4 dφ dθ = −1120 π, so the total flux through the boundaries of R is then 415−1120π=31120 π.
Maple Solution - Interactive
The Student VectorCalculus package is needed for calculating the divergence, but it then conflicts with any multidimensional integral set from the Calculus palette. Hence, the Student MultivariateCalculus package is installed to gain Context Panel access to the MultiInt command.
Initialize
Tools≻Load Package: Student Vector Calculus
Loading Student:-VectorCalculus
Tools≻Tasks≻Browse: Calculus - Vector≻ Vector Algebra and Settings≻ Display Format for Vectors
Press the Access Settings button and select "Display as Column Vector"
Display Format for Vectors
Define the vector field F
Enter the components of F in a free vector. Context Panel: Evaluate and Display Inline
Context Panel: Student Vector Calculus≻Conversions≻To Vector Field
Context Panel: Assign to a Name≻F
x y3,y z,x2z = →to Vector Field →assign to a nameF
Obtain ∇·F, the divergence of F, and represent it parametrically
Context Panel: Assign name
X=ρ sinφcosθ→assign
Y=ρ sinφsinθ→assign
Z=ρ cosφ→assign
Expression palette: Evaluation template
Common Symbols palette: Del and dot-product operators
Context Panel: Evaluate and Display Inline
Context Panel: Assign to a Name≻divF
∇·Fx=a|f(x)x=X,y=Y,z=Z = ρ3⁢sin⁡φ3⁢sin⁡θ3+ρ2⁢sin⁡φ2⁢cos⁡θ2+ρ⁢cos⁡φ→assign to a namedivF
Use spherical coordinates to obtain the volume integral of the divergence of F
Tools≻Load Package: Student Multivariate Calculus
Loading Student:-MultivariateCalculus
Write the name given to the divergence and press the Enter key.
Context Panel: Student Multivariate Calculus≻Integrate≻Iterated Complete the dialogs as per the figures below.
Context Panel: Evaluate Integral
divF
ρ3⁢sin⁡φ3⁢sin⁡θ3+ρ2⁢sin⁡φ2⁢cos⁡θ2+ρ⁢cos⁡φ
→MultiInt
∫02⁢π∫0π∫121ρ3⁢sin⁡φ3⁢sin⁡θ3+ρ2⁢sin⁡φ2⁢cos⁡θ2+ρ⁢cos⁡φ⁢ρ2⁢sin⁡φⅆρⅆφⅆθ
=
31120⁢π
There are two parts to the boundary of R, the surface of the outer sphere, and the surface of the inner sphere. For the flux through the outer surface surface, use a task template.
Tools≻Tasks≻Browse: Calculus - Vector≻Integration≻Flux≻3-D≻Through a Sphere
Flux through a Sphere
For the Vector Field:
Select Coordinate SystemCartesian [x,y,z]Cartesian - othercylindricalsphericalbipolarcylindricalbisphericalcardioidalcardioidcylindricalcasscylindricalconicalellcylindricalhypercylindricalinvcasscylindricallogcylindricallogcoshcylindricaloblatespheroidalparaboloidalparacylindricalprolatespheroidalrosecylindricalsixspheretangentcylindricaltangentspheretoroidal
On the inner sphere, the normal that is outward on R is inward for this smaller sphere. The same task template can be used to obtain the flux through this smaller sphere.
The total flux through R is then 415−1120 π=31120 π, the same value that is obtained for the volume integral of the divergence in R.
Maple Solution - Coded
Install the Student VectorCalculus package.
withStudent:-VectorCalculus:
Set display of vectors via BasisFormat.
BasisFormatfalse:
Define F via the VectorField command.
F≔VectorFieldx y3,y z,x2z:
Obtain ∇·F, the divergence of F
Invoke the Divergence command.
divF≔DivergenceF
y3+x2+z
Use the int command to integrate the divergence of F over R
intdivF,x,y,z=Sphere0,0,0,1,output=integral−intdivF,x,y,z=Sphere0,0,0,1/2,output=integral
∫01∫0π∫02⁢πr3⁢sin⁡φ⁢sin⁡θ⁢cos⁡θ2⁢cos⁡φ2⁢r2−sin⁡φ⁢sin⁡θ⁢cos⁡θ2⁢r2−sin⁡φ⁢sin⁡θ⁢cos⁡φ2⁢r2−cos⁡θ2⁢cos⁡φ2⁢r+sin⁡φ⁢sin⁡θ⁢r2+cos⁡θ2⁢r+cos⁡φ⁢sin⁡φⅆθⅆφⅆr−∫012∫0π∫02⁢πr3⁢sin⁡φ⁢sin⁡θ⁢cos⁡θ2⁢cos⁡φ2⁢r2−sin⁡φ⁢sin⁡θ⁢cos⁡θ2⁢r2−sin⁡φ⁢sin⁡θ⁢cos⁡φ2⁢r2−cos⁡θ2⁢cos⁡φ2⁢r+sin⁡φ⁢sin⁡θ⁢r2+cos⁡θ2⁢r+cos⁡φ⁢sin⁡φⅆθⅆφⅆr
intdivF,x,y,z=Sphere0,0,0,1−intdivF,x,y,z=Sphere0,0,0,1/2
Use the Flux command to obtain the flux of F through the outer sphere
FluxF,Sphere0,0,0,1,output=integral
∫02⁢π∫0πsin⁡φ3⁢sin⁡φ⁢cos⁡θ4⁢sin⁡θ⁢cos⁡φ2−sin⁡φ⁢cos⁡θ4⁢sin⁡θ−sin⁡φ⁢cos⁡θ2⁢sin⁡θ⁢cos⁡φ2+sin⁡φ⁢cos⁡θ2⁢sin⁡θ+cos⁡θ2⁢cos⁡φ2−cos⁡θ2⁢cos⁡φ+cos⁡φⅆφⅆθ
FluxF,Sphere0,0,0,1 = 415⁢π
Use the Flux command to obtain the flux of F through the inner sphere
FluxF,Sphere0,0,0,1/2,inward,output=integral
−∫02⁢π∫0π164⁢sin⁡φ3⁢sin⁡φ⁢cos⁡θ4⁢sin⁡θ⁢cos⁡φ2−sin⁡φ⁢cos⁡θ4⁢sin⁡θ−sin⁡φ⁢cos⁡θ2⁢sin⁡θ⁢cos⁡φ2+sin⁡φ⁢cos⁡θ2⁢sin⁡θ+2⁢cos⁡θ2⁢cos⁡φ2−4⁢cos⁡θ2⁢cos⁡φ+4⁢cos⁡φⅆφⅆθ
FluxF,Sphere0,0,0,1/2,inward = −1120⁢π
<< Previous Example Section 9.8 Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document