Area of a sheet: Interpreting line integrals with respect to arc length.restart;
with(plots):
with(VectorCalculus):
sheetPlot := proc(f,fDom,r,rDom)
local plotSurface, planeCurve, surfaceCurve, verticalSurface, plotTitle;
plotSurface := plot3d(f(x,y),x=fDom[1],y=fDom[2],scaling=constrained,transparency=0.75);
planeCurve := spacecurve(<r(t).<1,0>,r(t).<0,1>,0>,t=rDom,thickness=3,color=black);
surfaceCurve := spacecurve(<r(t).<1,0>,r(t).<0,1>,f(r(t).<1,0>,r(t).<0,1>)>,t=rDom,thickness=2,color=blue,numpoints=5000);
verticalSurface := plot3d(<r(t).<1,0>,r(t).<0,1>,s*f(r(t).<1,0>,r(t).<0,1>)>,t=rDom,s=0..1,color=green,numpoints=10000);
#plotTitle := cat("Area = ",int(f(r(t).<1,0>,r(t).<0,1>)*Norm(r(t)),t=rDom)," = ",evalf(int(f(r(t).<1,0>,r(t).<0,1>)*Norm(r(t)),t=rDom)));
#display({plotSurface,planeCurve,surfaceCurve,verticalSurface},scaling=constrained,title=plotTitle);
# No plot title.
display({plotSurface,planeCurve,surfaceCurve,verticalSurface},scaling=constrained);
end proc:Example: Let plot and compute the area of the sheet below Ly1JImZHNiI2JEkieEdGJUkieUdGJS1JIitHNiQlKnByb3RlY3RlZEcvSSttb2R1bGVuYW1lR0YlSS9WZWN0b3JDYWxjdWx1c0c2JEYsSShfc3lzbGliR0YlNiQtRio2JCIiJS1JIi1HRis2IyokRiciIiMtRjc2IyokRihGOg== and above the half circle Ly1JIitHNiQlKnByb3RlY3RlZEcvSSttb2R1bGVuYW1lRzYiSS9WZWN0b3JDYWxjdWx1c0c2JEYmSShfc3lzbGliR0YpNiQqJC1GJDYkSSJ4R0YpISIiIiIjKiRJInlHRilGMyIiIg== where LUkjPj1HJSpwcm90ZWN0ZWRHNiRJInlHNiIiIiE=."fDom" specifies the plot domain for the function LUkiZkc2IjYkSSJ4R0YkSSJ5R0Yk. Let's plot the graph of this function when its domain is restricted to the interior of the disk MS1JIitHNiQlKnByb3RlY3RlZEcvSSttb2R1bGVuYW1lRzYiSS9WZWN0b3JDYWxjdWx1c0c2JEYmSShfc3lzbGliR0YpNiQqJEkieEdGKSIiIyokSSJ5R0YpRjAiIio=. In other words, MzEhIiRJInhHNiIxRiUiIiQ= and MzEtSSItRzYkJSpwcm90ZWN0ZWRHL0krbW9kdWxlbmFtZUc2IkkvVmVjdG9yQ2FsY3VsdXNHNiRGJ0koX3N5c2xpYkdGKjYjLUklc3FydEdGLDYjLUkiK0dGJjYkIiIqLUYlNiMqJEkieEdGKiIiI0kieUdGKjFGO0Yv."rDom" specifies the domain for our parameterized curve. In this case we parameterize the circle (using cosine and sine) and get Ly1JInJHNiI2I0kidEdGJS1JJDwsPkc2JCUqcHJvdGVjdGVkRy9JK21vZHVsZW5hbWVHRiVJL1ZlY3RvckNhbGN1bHVzRzYkRitJKF9zeXNsaWJHRiU2JC1JIitHRio2JC1JJGNvc0dGL0YmIiIiLUkkc2luR0YvRiY=.To restrict ourselves to the upper half of this circle we need MzEiIiFJInRHNiIxRiVJI1BpRyUqcHJvdGVjdGVkRw==.f := (x,y) -> 4-x^2-y^2:
'f(x,y)' = f(x,y);
fDom := [-3..3,-sqrt(9-x^2)..sqrt(9-x^2)];
r := t -> <cos(t)+1,sin(t)>:
'r(t)' = r(t);
rDom := 0..Pi;The "Int" command is inert. This is just there to print out a "nice" looking line integral. [Note: \134x20 is the code for a blank space. This makes the upper bound in the integral appear empty.]I added in a yellow xy-plane. Recall that the line integral is computing net area under the curve just like a regular definite integral.Int(f(x,y),s=C..\134x20) = int(f(r(t).<1,0>,r(t).<0,1>)*Norm(diff(r(t),t)),t=rDom);
display(sheetPlot(f,fDom,r,rDom),plot3d(0,x=-3..3,y=-3..3,color=yellow));Example: Plot and find the net area of the sheet above/below Ly1JImZHNiI2JEkieEdGJUkieUdGJS1JIipHNiQlKnByb3RlY3RlZEcvSSttb2R1bGVuYW1lR0YlSS9WZWN0b3JDYWxjdWx1c0c2JEYsSShfc3lzbGliR0YlNiQiIiMtSSRzaW5HRjA2Iy1JIitHRis2JCokRidGM0Yo and the ellipse Ly1JIitHNiQlKnByb3RlY3RlZEcvSSttb2R1bGVuYW1lRzYiSS9WZWN0b3JDYWxjdWx1c0c2JEYmSShfc3lzbGliR0YpNiQtSSIqR0YlNiQqJEkieEdGKSIiIyMiIiIiIiotRi82JCokSSJ5R0YpRjMjRjUiIiVGNQ==.f := (x,y) -> 2*sin(x^2+y):
'f(x,y)' = f(x,y);
fDom := [-Pi..Pi,-Pi..Pi];
r := t -> <3*cos(t),2*sin(t)>:
'r(t)' = r(t);
rDom := 0..2*Pi;Int(f(x,y),s=C..\134x20) = int(f(r(t).<1,0>,r(t).<0,1>)*Norm(diff(r(t),t)),t=rDom);
Int(f(x,y),s=C..\134x20) = evalf(int(f(r(t).<1,0>,r(t).<0,1>)*Norm(diff(r(t),t)),t=rDom));
display(sheetPlot(f,fDom,r,rDom),viewpoint=circleleft);