Mathematica Lesson 14: Surface Integrals
Mathematica Lesson 14: Surface Integrals
In the menu at the top, click Make Your Own Copy to work in Mathematica Online, or click Download to use it in Mathematica.
When asked "Do you want to automatically evaluate all the initialization cells in the notebook...?" I recommend "No" so that you can work through each cell one-at-a-time.
In the menu at the top, click Make Your Own Copy to work in Mathematica Online, or click Download to use it in Mathematica.
When asked "Do you want to automatically evaluate all the initialization cells in the notebook...?" I recommend "No" so that you can work through each cell one-at-a-time.
When asked "Do you want to automatically evaluate all the initialization cells in the notebook...?" I recommend "No" so that you can work through each cell one-at-a-time.
Parametrizations
Parametrizations
Question 2
Question 2
You can visualize a parametric surface in Mathematica using ParametricPlot3D. For example, the paraboloid over the disk of radius 4 in the xy-plane is
In[]:=
ParametricPlot3D[{u*Cos[v],u*Sin[v],u^2},{u,0,4},{v,0,2*Pi}]
Below, fill in the command that would visualize the part of the plane x+y+z=10 inside the cylinder x²+y²=9:
ParametricPlot3D[{u*Cos[v],Answer,Answer},{u,0,Answer},{v,0,2*Pi}]
Question 3
Question 3
To create a parametric function in Mathematica, we can do
r[u_,v_]:={ the parametrization... }
Fill in the code below to parametrize the part of the plane 2x+y+z=6 in the first octant.
r[u_,v_]:={ the parametrization... }
Fill in the code below to parametrize the part of the plane 2x+y+z=6 in the first octant.
r[u_,v_]:={u,v,Answer}
(We don't include the domain when we write the parametrization in Mathematica. The domain is used in the bounds of integration.)
Line Integrals
Line Integrals
Question 4
Question 4
Given a parametrization r⃗ (u,v), the differential of surface area is dS=‖ r⃗_u × r⃗_v ‖dA, where the subscripts denote partial derivatives and dA stands for either dudv or dvdu.
Fill in the Mathematica code below that would compute dS for the saddle surface z=xy:
Fill in the Mathematica code below that would compute dS for the saddle surface z=xy:
(* set up the parametrization and integrand components*)r[u_,v_]:={u,v,Answer}ru=D[r[u,v],u]rv=D[r[u,v],Answer]n=Cross[Answer]
(* compute ‖ r⃗_u × r⃗_v ‖ *)dS=Answer[n.n]//FullSimplify
In the Mathematica codes below, we will use dS as shorthand to represent the quantity ‖ r⃗_u × r⃗_v ‖.
Question 5
Question 5
To compute the surface area of a parametric surface r(u,v), (u,v)∈D (the domain for the parameters u and v), we evaluate ∬S 1 dS= ∬D ‖ r⃗_u × r⃗_v ‖dA.
Fill in the Mathematica code below that would compute the surface area of the sphere x²+y²+z²=4 in spherical coordinates.
Fill in the Mathematica code below that would compute the surface area of the sphere x²+y²+z²=4 in spherical coordinates.
(* set up the parametrization and integrand components*)r[u_,v_]:={2*Cos[u]Sin[v],Answer,Answer}ru=D[r[u,v],u]rv=D[r[u,v],Answer]n=Cross[Answer]
(* compute ‖ r⃗_u × r⃗_v ‖ *)dS=Answer[n.n]//FullSimplify
(* now integrate! *)Integrate[Integrate[Answer,{u,Answer,Answer}],{v,Answer,Answer}]
Does this agree with our familiar formula 4πR² (from Archimedes)?
Question 7
Question 7
To compute a scalar surface integral ∬S f dS, we follow these steps from lecture:
◼
Define the parametrization r⃗(u,v) and specificy the domain D for (u,v).
◼
Compute f(r⃗(u,v)).
◼
Compute r⃗_u(u,v), r⃗_v(u,v), and compute the length of ‖ r⃗_u × r⃗_v ‖.
◼
Setup and solve ∬S f dS = ∬D f(r(u,v))‖ r⃗_u × r⃗_v ‖ dA, where dA represents either dudv or dvdu.
Fill in the code to compute this in Mathematica for the function f(x,y,z)=x²y²z over the portion of the cone z=sqrt(x²+y²) that lies between the planes z=1 and z=5:
(* Set up the parametrization and the function *)r[u_,v_]:={u*Cos[v],u*Sin[v],Answer}f[{x_,y_,z_}]:=x^2*y^2*z
(* Compute r⃗_u(u,v), r⃗_v(u,v), and compute the length of ‖ r⃗_u × r⃗_v ‖. *)ru=Answerrv=Answern=Cross[Answer]//FullSimplifydS=Answer[n.n]//FullSimplify(* Set up and integrate ∬D f(r(u,v))‖ r⃗_u × r⃗_v ‖ dA *)Integrate[Integrate[f[r[u,v]]dS,{u,Answer,Answer}],{v,Answer,Answer}]
Compute the answer to the nearest hundredth for Moodle.
Question 8
Question 8
To compute a vecor surface integral (flux integral) ∬S F⃗ ⋅ dS⃗ , we follow these steps from lecture:
◼
Define the parametrization r⃗(u,v) and specificy the domain D for (u,v).
◼
Compute F⃗ (r⃗(u,v)).
◼
Compute r⃗_u(u,v), r⃗_v(u,v), and compute r⃗_u × r⃗_v . Check if this is correctly oriented relative to the surface. (If it isn't, put a minus sign in front of your computation in Step 4.)
◼
Setup and solve ∬S F⃗ ⋅ dS⃗ = ∬D F(r(u,v)) ⋅ ( r⃗_u × r⃗_v ) dA, where dA represents either dudv or dvdu.
Fill in the code to compute the flux of the vector field F⃗(x,y,z)=⟨ y, x, x+z² ⟩ across the paraboloid z=x²+y² over the unit disk, oriented with upward pointing normal vector.
(* Set up the parametrization and the function *)r[u_,v_]:={u*Cos[v],u*Sin[v],Answer}F[{x_,y_,z_}]:={y,x,x+z^2}
(* Compute r⃗_u(u,v), r⃗_v(u,v), and r⃗_u × r⃗_v. *)ru=Answerrv=Answern=Cross[Answer]//FullSimplify
(* Set up and integrate ∬D F(r(u,v)) ⋅ r⃗_u × r⃗_v dA *)Integrate[Integrate[F[r[u,v]].Answer,{u,Answer,Answer}],{v,Answer,Answer}]
Compute the exact answer for Moodle.