Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168726
Image: ubuntu2004

Calculate the surface integral Sdydzx+dxdzy+dxdyz\iint_S \frac{dydz}{x}+\frac{dxdz}{y}+\frac{dxdy}{z} over the outside of the ellipsoid $\frac{x^2}{a^2}+\frac{y^2}{b^2}+\frac{z^2}{c^2}=1$.

Notice that we cannot use the divergence theorem here since there are points inside the paraboloid where F=<1x,1y,1z>\vec F=\lt \frac{1}{x},\,\frac{1}{y},\,\frac{1}{z}\gt does not exist.


We FIRST found the parametrization of S and ran the SOLVER (below) and then used that information to get the graphs here.

a=2; b=3; c=4; var('u v')
\newcommand{\Bold}[1]{\mathbf{#1}}\left(u, v\right)

Graph 1: We use the parameterization of S that we get below to graph the surface (the intervals are numbers so no problems). 

Sf=vector((a*cos(u)*sin(v),b*sin(u)*sin(v),c*cos(v))) S=parametric_plot(Sf,(u,0,2*pi),(v,0,pi), color='purple', opacity=.5, aspect_ratio=(1,1,1)) var ('t') Ax=parametric_plot(vector((t,0,0)),(t,-2,2), thickness=5) Ay=parametric_plot(vector((0,t,0)),(t,-3,3), thickness=5) Az=parametric_plot(vector((0,0,t)),(t,-4,4), thickness=5) show(S+Ax+Ay+Az)

Graph 2: Our integrand from below is: 16(16sin(u)+9sin(u))sin(u)sin(v)+32sin(v)cos(u)2+6sin(v) \frac{1}{6} \, {\left(\frac{16}{\sin\left(u\right)} + 9 \, \sin\left(u\right)\right)} \sin\left(u\right) \sin\left(v\right) + \frac{3}{2} \, \sin\left(v\right) \cos\left(u\right)^{2} + 6 \, \sin\left(v\right)

We translate this to: 1ab(c2+b2sin2(u)) sin(v)+basin(v)cos(u)2+absin(v) \frac{1}{ab} \, {\left(c^2 + b^2 \, \sin^2\left(u\right)\right)}  \sin\left(v\right) + \frac{b}{a} \, \sin\left(v\right) \cos\left(u\right)^{2} + ab \, \sin\left(v\right)

Click and drag to rotate. Notice that the arrows are not all the same length. We scale the vectors by vs.

As always, to get the arrows, we use the parameterization of S to get the "base point" and then use "base point" plus (n\vec n \cdot Integrand) to get the "end point". 

vs=4 vf=sum([sum([arrow3d((a*cos(e)*sin(d),b*sin(e)*sin(d),c*cos(d)),(a*cos(e)*sin(d)+a*cos(e)*sin(d)*(1.0/(a*b)*(c^2+b^2*(sin(e))^2)*sin(d)+b/a*sin(d)*(cos(e))^2+a*b*sin(d))/vs,b*sin(e)*sin(d)+b*sin(e)*sin(d)*(1.0/(a*b)*(c^2+b^2*(sin(e))^2)*sin(d)+b/a*sin(d)*(cos(e))^2+a*b*sin(d))/vs,c*cos(d)+c*cos(d)*(1.0/(a*b)*(c^2+b^2*(sin(e))^2)*sin(d)+b/a*sin(d)*(cos(e))^2+a*b*sin(d))/vs), color=hue((e+8)/8), width=8) for d in [0..pi,step=pi/4]]) for e in [0..2*pi,step=pi/4]]) show(S+vf, aspect_ratio=(1,1,1))

Here are the details. 

We parameterize the surface with 2 parameters and find a unit vector n\vec n normal pointing out from the ellipsoid.

Work particular to this problem: 

== The equation of the ellipsoid is given above. Remember $x=a\,cos(u)sin(v),, y=b\,sin(u)sin(v)and and z=c\,cos(v)$

== We have set a=2, b=3, and c=4

== So: $\left\{ \begin{array}{l}x=a\,cos(u)sin(v) \\y=b\,sin(u)sin(v) \\z=c\,cos(v) \end{array} \right. \,\,\,\,\, u \in [0, 2 \pi ] \,\,\,\, v \in [0,\pi]$
(These are the standard intervals for a sphere or ellipse.)

== By examination, we see: $\vec n= \lt a\,cos(u)sin(v),\,b\,sin(u)sin(v),\,c\,cos(v) \gt$  
(This too is standard.)



SOLVER: Our program follows the hand solution method. Everything in red requires you change or check something for this problem!

  1. Parameterize S and input as vector function. Done above; input.
  2. Find n\vec n and input as vector function. Done above; input.
  3. Input F.
  4. Find the partials of S. 
  5. Determine ±\pm by checking orientation preserving (+1 if orientation-preserving, else -1). Requires checking that you get ±1\pm 1.
  6. Substitute parameterization in F.
  7. Find the mixed product  FdS=±FdSu×dSvdudv\vec F \,d \vec S = \pm \,\,\,\vec F \cdot d \vec S_u \times d \vec S_v \,\,\, du\, dv
  8. Find and input intervals of integration and integrate. Done above;input.

Step 0: The program defines our variables. We are given variables (x,y,z). We need (u,v) as parameters.

var ('u v'); var('x y z')
\newcommand{\Bold}[1]{\mathbf{#1}}\left(u, v\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(x, y, z\right)

Step 1: We define S\vec S, n\vec n and F\vec F. Changes with problem; you must input your parametrization in Sf and your vector n.

Sf=vector((a*cos(u)*sin(v),b*sin(u)*sin(v),c*cos(v))) n=vector((cos(u)*sin(v),sin(u)*sin(v),cos(v))) F=vector((1/x,1/y,1/z))

Step 2: The program finds the partial derivatives.

Sprime_u=diff(Sf,u) view(Sprime_u)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-2 \, \sin\left(u\right) \sin\left(v\right),\,3 \, \sin\left(v\right) \cos\left(u\right),\,0\right)
Sprime_v=diff(Sf,v) view(Sprime_v)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(2 \, \cos\left(u\right) \cos\left(v\right),\,3 \, \sin\left(u\right) \cos\left(v\right),\,-4 \, \sin\left(v\right)\right)

Step 3: The program checks whether our parameterization is "orientation-preserving" or not. We should get 1 or -1. If we get 0 here, we need to change the point, e.g. (u=2.0,v=2.0). Use "real" values with decimal points. (If we get something other than +1, -1 or 0, we have made an error in step 1.)

npar=Sprime_u.cross_product(Sprime_v) np=sign((n.dot_product(npar))(u=1.0,v=1.0)) view(np)
\newcommand{\Bold}[1]{\mathbf{#1}}-1

Step 4: The program defines a standard sage function for "change of variables" for a 2-variable parametrization (surface).

The program changes the variables of F\vec F.

def changevar(f, eqn, newvar1,newvar2): return f.substitute(eqn)
F=changevar(F,x==Sf[0],u,v) F=changevar(F,y==Sf[1],u,v) F=changevar(F,z==Sf[2],u,v) view(F)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\frac{1}{2 \, \sin\left(v\right) \cos\left(u\right)},\,\frac{1}{3 \, \sin\left(u\right) \sin\left(v\right)},\,\frac{1}{4 \, \cos\left(v\right)}\right)

Step 5: Then program finds the mixed product and multiplies it by the orientation from step 3.

M=matrix(([F[0],F[1],F[2]],[Sprime_u[0],Sprime_u[1],Sprime_u[2]],[Sprime_v[0],Sprime_v[1],Sprime_v[2]])) Int=np*M.determinant() view(Int)
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{1}{6} \, {\left(\frac{16}{\sin\left(u\right)} + 9 \, \sin\left(u\right)\right)} \sin\left(u\right) \sin\left(v\right) + \frac{3}{2} \, \sin\left(v\right) \cos\left(u\right)^{2} + 6 \, \sin\left(v\right)

Step 6: Then program computes the integral (flux). Changes with problem - we must put in our intervals of integration.

integral(integral(Int,(v,0,pi)),(u,0,2*pi))
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{122}{3} \, \pi


So our flux is: SFdS\iint_S \vec F \,d \vec S = -2  (For variable constant a, we have Flux = a48\frac{-a^4}{8}).

check=4*pi/(a*b*c)*(a^2*b^2+a^2*c^2+b^2*c^2) view(check)
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{122}{3} \, \pi