\( \DeclareMathOperator{\abs}{abs} \)

How to use the commands
in the package MATH214.mac

Download
http://people.kzoo.edu/barth/math214/MATH214.zip
and unzip it and put the files
MATH214.mac and math214_testfunctions.mac
in the folder where you save your Calc3 work.
To load this package of special functions we'll be using throughout the course,do the following in wxMaxima
File...Load Package... (or Ctrl-L)
then select math214.mac from the directory where you saved it
You'll need to load MATH214 every time you start a new wxMaxima session if you want to use the special functions described below.
You can test to make sure that the functions are all working correctly in wxMaxima by selecting
File...Batch File...  (or Ctrl-B) then select
math214_testfunctions.wxmx
followed by Cell...Evaluate All Cells (or Ctrl-Shift-R)

(%i1) load("C:/Users/Rick/Documents/Maxima/MATH214.mac")$

define two vectors to test dot, cross, and len

(%i9) u:[1,1,1];v:[1,-2,1];
\[\mathrm{\tt (\%o8) }\quad [1,1,1]\]\[\mathrm{\tt (\%o9) }\quad [1,-2,1]\]
(%i10) dot(u,v);
\[\mathrm{\tt (\%o10) }\quad 0\]
(%i11) cross(u,v);
\[\mathrm{\tt (\%o11) }\quad [3,0,-3]\]
(%i12) len(u);
\[\mathrm{\tt (\%o12) }\quad \sqrt{3}\]
(%i13) len(v);
\[\mathrm{\tt (\%o13) }\quad \sqrt{6}\]

Define a space curve s:R-→R^3 to test curvature, unitT, unitN, unitB

(%i14) s: [cos(t),sin(t),0];
\[\mathrm{\tt (\%o14) }\quad [\mathrm{cos}\left( t\right) ,\mathrm{sin}\left( t\right) ,0]\]
(%i15) curvature(s,t);
\[\mathrm{\tt (\%o15) }\quad 1\]
(%i19) T:unitT(s,t);
\[\mathrm{\tt (\%o19) }\quad [-\mathrm{sin}\left( t\right) ,\mathrm{cos}\left( t\right) ,0]\]

does this make sense?  plug in a value of t we know

(%i17) subst(t=%pi/4,%);
\[\mathrm{\tt (\%o17) }\quad [-\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}},0]\]
(%i20) S:unitN(s,t);
\[\mathrm{\tt (\%o20) }\quad [-\mathrm{cos}\left( t\right) ,-\mathrm{sin}\left( t\right) ,0]\]

Check that T and S are orthogonal, as we expect

(%i21) T.S;
\[\mathrm{\tt (\%o21) }\quad 0\]

For a circle, T and the position vector s should also be orthogonal

(%i22) dot(T,s);
\[\mathrm{\tt (\%o22) }\quad 0\]

notice dot(T,S) is synonymous with the Maxima built-in dot product T.S

(%i23) dot(T,S);
\[\mathrm{\tt (\%o23) }\quad 0\]
(%i24) dot(T,s);
\[\mathrm{\tt (\%o24) }\quad 0\]

Let's check the cross product...it should be the same as unitB

(%i29) cross(T,S);
\[\mathrm{\tt (\%o29) }\quad [0,0,{{\mathrm{sin}\left( t\right) }^{2}}+{{\mathrm{cos}\left( t\right) }^{2}}]\]
--> %notice we needed to simplify using the command trigsimp
(%i30) trigsimp(%);
\[\mathrm{\tt (\%o30) }\quad [0,0,1]\]
(%i28) unitB(s,t);
\[\mathrm{\tt (\%o28) }\quad [0,0,1]\]

Now lets test grad, div and curl define the scalar valued function f

(%i31) f: x^2+y^2+3*z^2;
\[\mathrm{\tt (\%o31) }\quad 3\cdot {{z}^{2}}+{{y}^{2}}+{{x}^{2}}\]
(%i32) grad(f,x,y,z);
\[\mathrm{\tt (\%o32) }\quad [2\cdot x,2\cdot y,6\cdot z]\]

and here's another way we could specify g(x,y,z)

(%i34) g(x,y,z):=z+y+2*x;
\[\mathrm{\tt (\%o34) }\quad \mathrm{g}\left( x,y,z\right) :=z+y+2\cdot x\]
(%i35) grad(g(x,y,z),x,y,z);
\[\mathrm{\tt (\%o35) }\quad [2,1,1]\]

Define a vector valued function of x,y, and z for testing div and curl

(%i36) F:[x^2,x*y,%e^z];
\[\mathrm{\tt (\%o36) }\quad [{{x}^{2}},x\cdot y,{{e}^{z}}]\]
(%i37) div(F,x,y,z);
\[\mathrm{\tt (\%o37) }\quad {{e}^{z}}+3\cdot x\]
(%i38) curl(F,x,y,z);
\[\mathrm{\tt (\%o38) }\quad [0,0,y]\]

define a scalar field for testing path integral

(%i7) g(x,y):=2+x^2*y;
\[\mathrm{\tt (\%o7) }\quad \mathrm{g}\left( x,y\right) :=2+{{x}^{2}}\cdot y\]

integrate over the top half of the unit circle. this is example 1 on page 914

(%i8) integratePaths(g(x,y),[cos(t), sin(t)],t,0,%pi);
\[\mathrm{\tt (\%o8) }\quad 2\cdot \pi +\frac{2}{3}\]

Here's a vector valued function in R^2 for testing path integral of a 2d vector field.  this is example 4 on page 917

(%i12) G:[y^2,x];
\[\mathrm{\tt (\%o12) }\quad [{{y}^{2}},x]\]
(%i13) integratePathv2(G,[5*t-5,5*t-3],t,0,1);
\[\mathrm{\tt (\%o13) }\quad -\frac{5}{6}\]

And finally here's the path integral of a vector field in 3d This is example 8 on page 921

(%i14) integratePathv3([x*y,y*z,z*x],[t,t^2,t^3],t,0,1);
\[\mathrm{\tt (\%o14) }\quad \frac{27}{28}\]
Created with wxMaxima. The source of this maxima session can be downloaded here.