All published worksheets from http://sagenb.org
Image: ubuntu2004
Calculate the surface integral of flux type where is a surface with given orientation.
This is equivalent to the problem: Find the flux of the vector field over .
We will solve the (relatively) simple problem of where S is top side of the triangle x+y+z=1, . Other examples follow.
Formula Sheet From the formula sheet, we see: , where
Surface element is the vector product:
Remember that the depends on whether or not the parametrization is orientation preserving. We will find this by finding the sign of the dot product of the vector: and the vector: .
Integrand is the mixed product:
Preparation for SOLVER: We must parameterize the surface S with 2 parameters, find the intervals and find any vector normal to S and in the positive direction of the given orientation.
Work particular to the given problem:
== We have an explicit function $z=f(x,y)$ for the surface. Namely So we just let $x=u$, $y=v$ and $z=f(u,v)=1-u-v$. Other parametrizations will not be so easy.
== So:
(To get the intervals, we look at the vertices of the triangle in the u0v plane. They are 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 v goes from 0 to the line joining V1 and V2, namely v=-u+1 and then u goes from 0 to 1.)
== By examination, we see: (That is, the vector pointing up from the triangle.)
SOLVER: Our program follows the hand solution method. Everything in red requires something particular to your problem!
- Parameterize S and input as vector function. Requires parametrization - done above.
- Find and input as vector function. Requires normal - done above.
- Input F.
- Find the partials of S.
- Determine by checking orientation preserving (+1 if orientation-preserving, else -1). Requires checking that you get .
- Substitute parameterization in F.
- Find the mixed product
- Find intervals of integration and integrate. Requires intervals of parametrization - done above.
Step 0: The program declares our variables. We are given variables (x,y,z). We need (u,v) as parameters.
Step 1: We define , and . Changes with problem; you must input your parametrization in Sf and your vector in n.
Step 2: The program finds the partial derivatives.
Step 3: The program checks whether our parameterization is "orientation-preserving" or not. Check that we 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.)
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 .
Step 5: Then program finds the mixed product and multiplies it by the orientation from step 3.
Step 6: The program computes the integral (flux). Changes with problem - we must put in our intervals of integration.
So our flux is:
Notice that this last "makes sense" in our particular problem since the integrand is 1 and the area of the projected triangle is 1/2.
Scroll down to the bottom graph 2. It is a visualization of calculating the flux!
Graph 1: We must usually use the parameterization of S that we get to graph the surface. We can do this easily if the intervals for u and v are numbers.
Here: and so not numbers. I don't know if one can graph with intervals with variables, so I just "drew" the triangle a couple of different ways.
Graph 2: Now we want a visual interpretation of what we have done. Remember that with the change of variables from the parametrization, we have:
- Integrand = 1
So the vectors that describe the normalized flux volume (and scaled by vector-scale=) are:
- Starting point:
- End point: + = =
Remember that our surface with respect to u and v has and $v \in [0,-u+1].
To do our programming interation, we substitute "c" for u and "d" for v and run d from [0,-c+1] and c from [0,1]. (Usually start tries with big steps and see how it goes and then reduce step size.)
The FLUX is the VOLUME between the surface S and the surface 'formed' by the endpoints of the arrows (multiplied by the orientation and divided by )!
Here I have added a "blank" triangle so that the box is nice. Probably and easier way to do this...