Flow Across a Surface (Flux)
Recall that the normal vector at a point on a level curve was the gradient vector at that point.
The gradient of a "level surface" will give us the normal now.
Consider g(x,y,z)=z-f(x,y). g=c gives "level surfaces". All we care about is g=0.
The gradient will still give the normal:
The gradient of g(x,y,z) is
-Dxf i -Dyf j + 1 k
or
{-Dxf,-Dyf,1}.
The unit normal is given by
{-Dxf,-Dyf,1}/|| {-Dxf,-Dyf,1} ||
Example
v[x_,y_,z_]:={x,y,z}
f[x_,y_]:=1-x^2-y^2
g[x_,y_,z_]:=z-(1-x^2-y^2)
grad3[g][x,y,z]
n=grad3[g][x,y,z]/norm3[grad3[g][x,y,z]]
Simplify[v[x,y,f[x,y]].n]
Dx=D[f[x,y],x] Dy=D[f[x,y],y]
dA=Sqrt[1+Dx^2+Dy^2]
Simplify[(v[x,y,f[x,y]].n)*dA]
Integrate[1+x^2+y^2,{x,-1,1},
{y,-Sqrt[1-x^2],Sqrt[1-x^2]}]
Something you might have noticed while doing the example was the cancellation of the dA with ||normal vector||.
The unit normal is given by
{-Dxf,-Dyf,1}/|| {-Dxf,-Dyf,1} ||,
while dA is
dA=Sqrt[1+Dxf^2+Dyf^2] dydx
Notice that dA=|| {-Dxf,-Dyf,1} || dydx
So, surface integral v.n dA=double integral v.{-Dxf,-Dyf,1} dydx
or equivalently:
The surface integral v.n dA = double integral (-v1Dxf-v2Dyf+v3) dydx