Example: Exercise 11, Section 16.8 (Stokes' Theorem)We want to use Maple to verify Stokes' Theorem, and also to do some graphical work.#Define the vector field:with(VectorCalculus): with(Student[VectorCalculus]):F:=VectorField(<x^2*z, x*y^2, z^2>);#Define the surface:S:=<u*cos(v),u*sin(v), 1-u*cos(v)-u*sin(v)>; # u is between 0 and 3, v is 0 to 2*PiC:=<3*cos(t), 3*sin(t), 1-3*cos(t)-3*sin(t)>;#First, the line integral:LineInt(F, Path(C, t=0..2*Pi));# The line integral by hand:Integrand:=simplify(DotProduct(subs({x=C[1],y=C[2],z=C[3]},F),diff(C,t)));int(Integrand,t=0..2*Pi);# Now the surface integral using Stokes' Theorem:G:=Curl(F);N:=CrossProduct(diff(S,u),diff(S,v));Integrand:=DotProduct(subs({x=S[1],y=S[2],z=S[3]},G),N);int(int(Integrand,u=0..3),v=0..2*Pi);#Graph the surface and the curve C:with(plots):A:=spacecurve(C,t=0..2*Pi,color=red,thickness=3);B:=plot3d(S,u=0..3,v=0..2*Pi);BB:=fieldplot3d(F,x=-3..3,y=-3..3,z=-3..5,fieldstrength=fixed,color=black);display3d(A,B,BB,scaling=constrained);