Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168728
Image: ubuntu2004

Calculate the surface integral (of function type) Sf(x,y,z)dS\iint_S f(x,y,z)\, dS where SS is a surface.

We will solve the (relatively) simple problem: Calculate the surface area of the triangle x+y+z=1, x,y,z0x,\,y,\,z \ge 0.


Formula Sheet From the formula sheet, we find:  Sf(x,y,z)dS\iint_S f(x,y,z)\, dS

Let the surface S be parameterized by S=(x(u,v),y(u,v),z(u,v)). 

Surface element is the magnitude (intensity) of the vector product:  dS=dSu×dSvdudvdS =\left\| {d{{\vec S}_u} \times d{{\vec S}_v}} \right\| \,\, du \, dv

Integrand is the dot product: Sf(x,y,z)dS=Duvf(x(u,v),y(u,v),z(u,v))dSu×dSvdudv\iint_S f(x,y,z)\, dS= \iint_{D_{uv}}\, f(x(u,v),y(u,v),z(u,v)) \cdot \left\| {d{{\vec S}_u} \times d{{\vec S}_v}} \right\| \,\, du\, dv

Preparation for SOLVER: We must parameterize the surface S with 2 parameters and find the intervals.

Work particular to the given problem: 

== Because we want surface area, our function of integration is f(x,y,z)=1f(x,y,z)=1

== We have an explicit function for the surface z=1xyz=1-x-y. So we just let x=ux=u, y=vy=v and substitue into z: z=1uvz=1-u-v. Duv=DxyD_{uv}=D_{xy}, i.e. the projection of the triangle onto the u0v = x0y plane.  

== So: S=S = {x=uy=vz=1uv u [0,1]v[0,u+1]\left\{ \begin{array}{l}x = u \\y = v\\z =1-u-v \end{array} \right.\,\,\,\,\,u \in [0,1 ] \,\,\,\,v \in [0,-u+1]

To get the intervals: We find the vertices of the triangle in the u0v = x0y plane. In this plane z=0. The vertices of the triangle in 3d are the intersection points of the plane with the postive x, y and z axes (we are given x,y,z0x, \, y,\, z \ge 0). So they are (1,0,0), (0,1,0) and (0,0,1). In the u0v plane, we have:  V1(u=1,v=0), V2(u=0,v=1) and V3(u=0,v=0). We draw this region. It is a triangle where u goes from 0 to 1 and v goes from 0 to the line joining V1 and V2. The equation of this line is v=-u+1. 


SOLVER: Our program follows the hand solution method. Everything in red requires something particular to your problem!

  1. Parameterize S and input as vector function. Requires parametrization - done above.
  2. Input f(x,y,z).
  3. Find the partials of S. 
  4. Find the vector product of the partials. Find the magnitude (intensity) of this vector.
  5. Substitute parameterization in f.
  6. Find the integrand.
  7. Find intervals of integration and integrate. Requires intervals of parametrization - done above.
var ('u v'); var('x y z')
(u, v) (x, y, z)

Step 1: We define S\vec S, and f(x,y,z)f(x,y,z). Changes with problem; you must input your parametrization in Sf and your function of f.

Sf=vector((u,v,1-u-v)) f=1

Step 2: The program finds the partial derivatives.

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

Step 3: The program calculates dSu×dSv\left\| {d{{\vec S}_u} \times d{{\vec S}_v}} \right\|

npar=Sprime_u.cross_product(Sprime_v) np=norm(npar) view(np)
\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{3}

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 ff.

def changevar(h, eqn, newvar1,newvar2): return h.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}}1

Step 5: Then program finds the dot product of f and dS (the magnitude from step 3).

integrand=np*f view(integrand)
\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{3}

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

integrand2=integral(integrand,(v,0,-u+1)) view(integrand2)
\newcommand{\Bold}[1]{\mathbf{#1}}-{\left(u - 1\right)} \sqrt{3}
result=integral(integrand2,(u,0,1)) view(result)
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{1}{2} \, \sqrt{3}
n(result)
0.866025403784439


Answer: The surface area of the triangle with vertices (1,0,0), (0,1,0) and (0,0,1) is: $\frac{\sqrt{3}}{2} \approx 0.87$  

The triangle itself is an equilateral triangle with side length a=2a=\sqrt{2} so with area A=34a2=32A=\frac{\sqrt{3}}{4} \cdot a^2=\frac{\sqrt{3}}{2}

So we expect the surface area to be Sf(x,y,z)dS=S1dS=1Area of Triangle=32\iint_S\,{f(x,y,z)}\,dS=\iint_S{1}dS =1 \cdot \text{Area of Triangle}=\frac{\sqrt{3}}{2}