Overview of the Student Vector Calculus Package - Maple Help

Home : Support : Online Help : Applications and Example Worksheets : Calculus : Overview of the Student Vector Calculus Package

Student[VectorCalculus] Package

The Student[VectorCalculus] package is a collection of commands that perform vector calculus computations, and generate related plots and animations. It includes interactive commands that launch point-and-click interfaces to some of the package functionality.

The Student[VectorCalculus] package can be thought of as a simplified version of the full VectorCalculus package. The principal differences are (1) only a limited number of coordinate systems are supported; and (2) commands in the Student[VectorCalculus] package often try to guess the intended coordinate system, or coordinate variable names, while the main VectorCalculus package is stricter in its requirements about being provided these details.

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{VectorCalculus}\right]\right):$

Basic Objects

The main objects upon which this package operates are the free vector, the PositionVector, the RootedVector, the VectorField, curves, surfaces, and scalar fields.  Lists cannot be used in place of vectors, and scalar fields are ordinary Maple functions and expressions.  Information about vector objects - coordinate systems and names of coordinates - are stored as attributes of the vector objects.  The About, attributes, and GetCoordinates commands can be used to recover this information.

The free vector is created in one of two ways.  The angle-bracket notation creates a free vector in the extant coordinate system.  At this point in this worksheet, that coordinate system is Cartesian.

 > ${v}_{1}:=⟨a,b,c⟩$

The explicit use of the Vector command permits attaching coordinates to the free vector.

 > ${v}_{2}:=\mathrm{Vector}\left(\left[a,b\right],\mathrm{coordinates}=\mathrm{polar}\left[r,\mathrm{θ}\right]\right)$

In each case, the free vector is really a point.  In Cartesian coordinates, the free vector ${\mathbf{v}}_{1}$ is a vector from the origin to the point $\left(a,b,c\right)$, and the identification of the point with the free vector is permissible because the unit basis vectors are everywhere parallel.

By analogy, the free vector ${\mathbf{v}}_{2}$ is a point in a rectangular frame with axes labeled $r$ (horizontal) and $\mathrm{θ}$ (vertical).  In this frame, the point with polar coordinates $\left(r,\mathrm{θ}\right)=\left(a,b\right)$ is connected to the origin with an arrow, and this arrow is ${\mathbf{v}}_{2}$.

Information about ${\mathbf{v}}_{1}$ and ${\mathbf{v}}_{2}$ is obtained as follows.

 > $\mathrm{About}\left({v}_{1}\right)\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}$$\mathrm{About}\left({v}_{2}\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Free Vector}}\\ {\mathrm{Components:}}& \left[{a}{,}{b}{,}{c}\right]\\ {\mathrm{Coordinates:}}& {\mathrm{cartesian}}\end{array}\right]$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Free Vector}}\\ {\mathrm{Components:}}& \left[{a}{,}{b}\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}\end{array}\right]$ (1.1)
 > $\mathrm{GetCoordinates}\left({v}_{1}\right)$$\mathrm{GetCoordinates}\left({v}_{2}\right)$
 ${\mathrm{cartesian}}$
 ${{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}$ (1.2)
 > $\mathrm{attributes}\left({v}_{1}\right)$$\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathrm{attributes}\left({v}_{2}\right)$
 ${\mathrm{coords}}{=}{\mathrm{cartesian}}$
 ${\mathrm{coords}}{=}{{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}$ (1.3)

The VectorField command is used to create a vector field.

 > $F:=\mathrm{VectorField}\left(⟨{x}^{2},1+xy⟩,\mathrm{cartesian}\left[x,y\right]\right)$

The unit basis vectors ${\stackrel{&conjugate0;}{\mathbf{e}}}_{x}$ and ${\stackrel{&conjugate0;}{\mathbf{e}}}_{y}$ are used in place of $\mathbf{i}$ and $\mathbf{j}$, respectively.  The bar denotes that the domain of these basis vectors is the underlying Cartesian space, and that the vectors themselves are position dependent.  Of course, in Cartesian coordinates, these basis vectors are independent of position, but the bar is still used to denote that these are the "moving" basis vectors that are defined at each point in the space supporting the vector field, and that are given in the coordinate system in which the vector field is given.

Alternatively, the vector field

 > $G:=\mathrm{VectorField}\left(⟨{r}^{2}\mathrm{cos}\left(2\mathrm{θ}\right),r+\mathrm{sin}\left(\mathrm{θ}\right)⟩,\mathrm{polar}\left[r,\mathrm{θ}\right]\right)$

defines a field of vectors whose domain is each point (except for the origin) in the Cartesian plane on which the coordinate curves of the polar coordinate system have been "pulled back."  This is the familiar view of polar coordinates superimposed on the Cartesian plane - concentric circles as lines of constant $r$, and radial rays as lines of constant $\mathrm{θ}$.  In this view of the change of coordinates to polar coordinates, the vectors ${\stackrel{&conjugate0;}{\mathbf{e}}}_{r}$ and ${\stackrel{&conjugate0;}{\mathbf{e}}}_{\mathrm{θ}}$ are position dependent.  These "moving" basis vectors change direction from point to point, and are not to be confused with the basis vectors appearing in

 > ${v}_{2}$

If the evalVF command is used to evaluate the vector field G at a point in the Cartesian plane, the result is a RootedVector.  For example, evaluating $\mathbf{G}$ at the Cartesian point whose polar-coordinate description is $\left(r,\mathrm{θ}\right)=\left(a,b\right)$ is effected by

 > $\mathrm{G1}:=\mathrm{evalVF}\left(G,{v}_{2}\right)$
 ${\mathrm{G1}}{≔}\left[\begin{array}{c}{{a}}^{{2}}{\mathrm{cos}}{}\left({2}{b}\right)\\ {a}{+}{\mathrm{sin}}{}\left({b}\right)\end{array}\right]$ (1.4)

because the free vector ${\mathbf{v}}_{2}$ is the Maple representation of the point whose polar coordinates are $\left(a,b\right)$.  Indeed, we have

 > $\mathrm{About}\left(\mathrm{G1}\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Rooted Vector}}\\ {\mathrm{Components:}}& \left[{{a}}^{{2}}{\mathrm{cos}}{}\left({2}{b}\right){,}{a}{+}{\mathrm{sin}}{}\left({b}\right)\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}\\ {\mathrm{Root Point:}}& \left[{a}{,}{b}\right]\end{array}\right]$ (1.5)

The root point is the point of "attachment" for the single vector ${\mathbf{G}}_{1}$, which is actually a "bound" vector, bound to the root point.

A rooted vector can be defined directly with the RootedVector command.

 > ${v}_{3}:=\mathrm{RootedVector}\left(\mathrm{root}=\left[3,\frac{\mathrm{π}}{5}\right],\left[\mathrm{α},\mathrm{β}\right],\mathrm{polar}\left[r,\mathrm{θ}\right]\right)$
 ${{v}}_{{3}}{≔}\left[\begin{array}{c}{\mathrm{\alpha }}\\ {\mathrm{\beta }}\end{array}\right]$ (1.6)

To verify that this is a vector in polar coordinates, rooted at the polar point $\left(r,\mathrm{θ}\right)=\left(3,\frac{\mathrm{π}}{5}\right),$ use

 > $\mathrm{About}\left(v\left[3\right]\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Rooted Vector}}\\ {\mathrm{Components:}}& \left[{\mathrm{\alpha }}{,}{\mathrm{\beta }}\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}\\ {\mathrm{Root Point:}}& \left[{3}{,}\frac{{\mathrm{\pi }}}{{5}}\right]\end{array}\right]$ (1.7)

Information about the rooted vector is actually stored in a module that could be created with the VectorSpace command.

 > $\mathrm{VS}:=\mathrm{VectorSpace}\left(\mathrm{polar}\left[r,\mathrm{θ}\right],\left[3,\frac{\mathrm{π}}{5}\right]\right)$
 ${\mathrm{VS}}{≔}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (1.8)

The vector space is the set of all vectors of appropriate dimension that have their root point at $\left(r,\mathrm{θ}\right)=\left(3,\frac{\mathrm{π}}{5}\right).$  The basis for this vector space is the vectors $\left\{{\stackrel{&conjugate0;}{\mathbf{e}}}_{r},{\stackrel{&conjugate0;}{\mathbf{e}}}_{\mathrm{θ}}\right\},$the moving basis vectors defined at the root point.  Individual vectors in this space can be created as module exports via the syntax

 > ${v}_{4}≔\mathrm{VS}:-\mathrm{Vector}\left(\left[\mathrm{α},\mathrm{β}\right]\right)$
 ${{v}}_{{4}}{≔}\left[\begin{array}{c}{\mathrm{\alpha }}\\ {\mathrm{\beta }}\end{array}\right]$ (1.9)

That ${\mathbf{v}}_{4}$ is the vector  rooted at the point $\left(r,\mathrm{θ}\right)=\left(3,\frac{\mathrm{π}}{5}\right)$ can be see with

 > $\mathrm{About}\left({v}_{4}\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Rooted Vector}}\\ {\mathrm{Components:}}& \left[{\mathrm{\alpha }}{,}{\mathrm{\beta }}\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}\\ {\mathrm{Root Point:}}& \left[{3}{,}\frac{{\mathrm{\pi }}}{{5}}\right]\end{array}\right]$ (1.10)

Creating rooted vectors via the VectorSpace command works well when many such vectors will have the same root point.  The RootedVector command is most convenient for single rooted vectors.

Finally, there is the PositionVector command that creates the radius-vector form of curves and surfaces.  The vectors

 >
 $\left[\begin{array}{c}{x}{}\left({t}\right)\\ {y}{}\left({y}\right)\\ {z}{}\left({t}\right)\end{array}\right]{,}\left[\begin{array}{c}{x}{}\left({a}{,}{b}\right)\\ {y}{}\left({a}{,}{b}\right)\\ {z}{}\left({a}{,}{b}\right)\end{array}\right]$ (1.11)

are PositionVectors, vectors from the origin of a Cartesian frame to the relevant point in that frame.  Points can be parametrized by up to two parameters;  a one-parameter family of points represents a curve, and a two-parameter family, a surface.  Indeed, we have

 > $\mathrm{About}\left({R}_{1}\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Position Vector}}\\ {\mathrm{Components:}}& \left[{x}{}\left({t}\right){,}{y}{}\left({y}\right){,}{z}{}\left({t}\right)\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}\\ {\mathrm{Root Point:}}& \left[{0}{,}{0}{,}{0}\right]\end{array}\right]$ (1.12)
 > $\mathrm{About}\left({R}_{2}\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Position Vector}}\\ {\mathrm{Components:}}& \left[{x}{}\left({a}{,}{b}\right){,}{y}{}\left({a}{,}{b}\right){,}{z}{}\left({a}{,}{b}\right)\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}\\ {\mathrm{Root Point:}}& \left[{0}{,}{0}{,}{0}\right]\end{array}\right]$ (1.13)

The PositionVector construct applies only in Cartesian coordinates.  The Position Vector

 > ${R}_{3}≔\mathrm{PositionVector}\left(\left[2\mathrm{cos}\left(\mathrm{θ}\right),2\mathrm{sin}\left(\mathrm{θ}\right)\right],\mathrm{cartesian}\left[x,y\right]\right)$
 ${{R}}_{{3}}{≔}\left[\begin{array}{c}{2}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\\ {2}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\end{array}\right]$ (1.14)

describes the origin-centered circle of radius 2 drawn in the Cartesian plane, as we see from

 > $\mathrm{About}\left({R}_{3}\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Position Vector}}\\ {\mathrm{Components:}}& \left[{2}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){,}{2}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{cartesian}}}_{{x}{,}{y}}\\ {\mathrm{Root Point:}}& \left[{0}{,}{0}\right]\end{array}\right]$ (1.15)

Consequently, in the Cartesian plane the PositionVector, the free vector, and the vector rooted at the origin are essentially the same arrow, but because these are represented in the VectorCalculus package by distinct data structures, they are not necessarily recognized by Maple as being the same.  Thus, the package provides the ConvertVector command for converting one form of the Cartesian vector to another.

 >
 > $\mathrm{ConvertVector}\left({v}_{1},\mathrm{rooted}\right)$
 $\left[\begin{array}{c}{a}\\ {b}\\ {c}\end{array}\right]$ (1.16)
 > $\mathrm{ConvertVector}\left({v}_{1},\mathrm{position}\right)$
 $\left[\begin{array}{c}{a}\\ {b}\\ {c}\end{array}\right]$ (1.17)

A final word about the visual display of vectors and vector fields in the VectorCalculus package.  The default display for free vectors and vector fields is explicitly in terms of basis vectors.  This display can be changed to a column-vector format with the BasisFormat command.  The setting

 > $\mathrm{BasisFormat}\left(\mathrm{false}\right):$

causes the displays to be

 >
 $\left[\begin{array}{c}{a}\\ {b}\\ {c}\end{array}\right]{,}\left[\begin{array}{c}{{x}}^{{2}}\\ {x}{y}{+}{1}\end{array}\right]$ (1.18)

respectively, for a free vector and a vector field.  The PositionVector is always displayed as a column vector.

The MapToBasis command imposes a change of coordinates on a vector or vector field.  For example, to express the Cartesian vector field

 > $F$
 $\left[\begin{array}{c}{{x}}^{{2}}\\ {x}{y}{+}{1}\end{array}\right]$ (1.19)

in polar coordinates, use

 > $\mathrm{simplify}\left(\mathrm{MapToBasis}\left(F,\mathrm{polar}\left[r,\mathrm{θ}\right]\right)\right)$
 $\left[\begin{array}{c}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){+}{{r}}^{{2}}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\\ {\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\end{array}\right]$ (1.20)

This is equivalent to expressing the unit basis vectors $\mathbf{i}$ and $\mathbf{j}$ in terms of the vectors ${\stackrel{&conjugate0;}{\mathbf{e}}}_{r}$ and ${\stackrel{&conjugate0;}{\mathbf{e}}}_{\mathrm{θ}},$then making the substitutions .  This calculation can be carried out from first principles if the following position vector is first defined.

 > $R:=\mathrm{PositionVector}\left(\left[r\mathrm{cos}\left(\mathrm{θ}\right),r\mathrm{sin}\left(\mathrm{θ}\right)\right],\mathrm{cartesian}\left[x,y\right]\right)$
 ${R}{≔}\left[\begin{array}{c}{r}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\\ {r}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\end{array}\right]$ (1.21)

The basis vectors ${\stackrel{&conjugate0;}{\mathbf{e}}}_{r}$ and ${\stackrel{&conjugate0;}{\mathbf{e}}}_{\mathrm{θ}}$ are obtained from R via

 > $\mathrm{Er}≔\mathrm{diff}\left(R,r\right)$
 ${\mathrm{Er}}{≔}\left[\begin{array}{c}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\\ {\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\end{array}\right]$ (1.22)
 >
 ${\mathrm{Et}}{≔}\left[\begin{array}{c}{-}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\\ {\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\end{array}\right]$ (1.23)

Writing these vectors in terms of $\mathbf{i}$ and $\mathbf{j}$ can be done with

 > $\mathrm{eq1}:=\mathrm{Er}.⟨i,j⟩=\mathrm{er}$$\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathrm{eq2}≔\mathrm{Et}.⟨i,j⟩=\mathrm{et}$
 ${\mathrm{eq1}}{≔}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){i}{+}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){j}{=}{\mathrm{er}}$
 ${\mathrm{eq2}}{≔}{-}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){i}{+}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){j}{=}{\mathrm{et}}$ (1.24)

Solving for $\mathbf{i}$ and $\mathbf{j}$ in terms of vectors ${\stackrel{&conjugate0;}{\mathbf{e}}}_{r}$ and ${\stackrel{&conjugate0;}{\mathbf{e}}}_{\mathrm{θ}},$we get

 > $q:=\mathrm{solve}\left(\left\{\mathrm{eq1},\mathrm{eq2}\right\},\left\{i,j\right\}\right)$
 ${q}{≔}\left\{{i}{=}\frac{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){\mathrm{er}}{-}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){\mathrm{et}}}{{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}{+}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}}{,}{j}{=}\frac{{\mathrm{et}}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){+}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){\mathrm{er}}}{{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}{+}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}}\right\}$ (1.25)

Representing the vector field $\mathbf{F}$ in terms of $\mathbf{i}$ and $\mathbf{j}$, then replacing $\mathbf{i}$ and $\mathbf{j}$ with their equivalents in terms of the vectors ${\stackrel{&conjugate0;}{\mathbf{e}}}_{r}$ and ${\stackrel{&conjugate0;}{\mathbf{e}}}_{\mathrm{θ}},$we get

 > $\mathrm{q1}:=\mathrm{simplify}\left(\mathrm{eval}\left(F.\mathrm{VectorField}\left(⟨i,j⟩,\mathrm{cartesian}\left[x,y\right]\right),q\right)\right)$
 ${\mathrm{q1}}{≔}\left({\mathrm{er}}{{x}}^{{2}}{+}{\mathrm{et}}{x}{y}{+}{\mathrm{et}}\right){\mathrm{cos}}{}\left({\mathrm{\theta }}\right){-}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\left({-}{\mathrm{er}}{x}{y}{+}{\mathrm{et}}{{x}}^{{2}}{-}{\mathrm{er}}\right)$ (1.26)

Making the substitutions , we get

 > $\mathrm{q2}:=\mathrm{simplify}\left(\mathrm{eval}\left(\mathrm{q1},\left[x=r\mathrm{cos}\left(\mathrm{θ}\right),y=r\mathrm{sin}\left(\mathrm{θ}\right)\right]\right)\right)$
 ${\mathrm{q2}}{≔}\left({\mathrm{er}}{{r}}^{{2}}{+}{\mathrm{et}}\right){\mathrm{cos}}{}\left({\mathrm{\theta }}\right){+}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){\mathrm{er}}$ (1.27)

A final rearrangement of terms, and an identification of $\mathrm{er}$ and $\mathrm{et}$ with vectors ${\stackrel{&conjugate0;}{\mathbf{e}}}_{r}$ and ${\stackrel{&conjugate0;}{\mathbf{e}}}_{\mathrm{θ}},$respectively, gives

 > $\mathrm{q3}:=\mathrm{collect}\left(\mathrm{q2},\left[\mathrm{er},\mathrm{et}\right]\right)$
 ${\mathrm{q3}}{≔}\left({\mathrm{sin}}{}\left({\mathrm{\theta }}\right){+}{{r}}^{{2}}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\right){\mathrm{er}}{+}{\mathrm{et}}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)$ (1.28)

which compares favorably with

 > $\mathrm{simplify}\left(\mathrm{MapToBasis}\left(F,\mathrm{polar}\left[r,\mathrm{θ}\right]\right)\right)$
 $\left[\begin{array}{c}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){+}{{r}}^{{2}}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\\ {\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\end{array}\right]$ (1.29)

The MapToBasis command can also be used to transform a point in one coordinate system to its representation in another.  Setting

 > $\mathrm{BasisFormat}\left(\mathrm{true}\right):$

will make the result of

 > $\mathrm{MapToBasis}\left(⟨1,2⟩,\mathrm{polar}\left[r,t\right]\right)$

easier to understand.  The Cartesian point $\left(x,y\right)=\left(1,2\right)$, represented as a free vector, has been transformed to $\left(r,\mathrm{θ}\right)=\left(\sqrt{5},\mathrm{arctan}\left(2\right)\right),$also given as a free vector.  This is not a vector transformation.  The MapToBasis command applies the contravariant transformation law to a rooted vector or a vector field.  Applied to a free vector, it transforms just the components.  The basis vectors are not so transformed because the free vector is not a vector; it is really just a representation of a point in curvilinear coordinates.

 > $\mathrm{SetCoordinates}\left(\mathrm{cartesian}\left[x,y,z\right]\right)$
 ${{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}$ (2.1)

The Student[VectorCalculus] package contains Divergence, Gradient, Curl, and Laplacian commands.
The Del and Nabla commands are synonyms for the Gradient command.

 > $g:={x}^{2}+{y}^{2}+{z}^{2};$$G≔\mathrm{Gradient}\left(g\right);$$\mathrm{Del}\left(g\right);$$\mathrm{Nabla}\left(g\right)$
 ${g}{≔}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}$
 > $\mathrm{Divergence}\left(G\right)$
 ${6}$ (2.2)
 > $\mathrm{Curl}\left(G\right)$
 > $\mathrm{Laplacian}\left(g\right)$
 ${6}$ (2.3)

Space Curves

 > $\mathrm{SetCoordinates}\left(\mathrm{cartesian}\left[x,y,z\right]\right)$
 ${{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}$ (3.1)

The Student[VectorCalculus] package contains space curve commands. Most space curve commands can return a plot or animation.
Consider the following helix.

 > $\mathrm{helix}:=⟨\mathrm{cos}\left(t\right),\mathrm{sin}\left(t\right),t⟩$

To plot the helix, use the SpaceCurve command.
The range of the space curve parameter, in this case 't', must be specified. The axes and scaling options are standard Maple plotting options. For more information about plotting options, see plot/option and plot3d/option.

 > $\mathrm{SpaceCurve}\left(\mathrm{helix},t=0..\mathrm{π},\mathrm{axes}=\mathrm{normal},\mathrm{scaling}=\mathrm{constrained}\right)$

All the space curve plotting commands have the same syntax: command(space curve definition, options). For some commands you must specify the option output = plot or output = animation to generate visual output.

Using the helix example, calculate the tangent vector (TangentVector)

 > $\mathrm{TangentVector}\left(\mathrm{helix}\right)$
 $\left[\begin{array}{c}{-}{\mathrm{sin}}{}\left({t}\right)\\ {\mathrm{cos}}{}\left({t}\right)\\ {1}\end{array}\right]$ (3.2)

Animate the principal normal vector (PrincipalNormal)

 > $\mathrm{PrincipalNormal}\left(\mathrm{helix},\mathrm{output}=\mathrm{animation}\right)$

Plot four binormal vectors (Binormal)

 > $\mathrm{Binormal}\left(\mathrm{helix},\mathrm{output}=\mathrm{plot},\mathrm{vectors}=4\right)$

To plot, animate, or compute the unit tangent, normal, and binormal vectors, use the TNBFrame command.

First, plot the unit tangent, normal, and binormal vectors.

 > $\mathrm{TNBFrame}\left(\mathrm{helix},\mathrm{output}=\mathrm{plot},\mathrm{scaling}=\mathrm{constrained}\right)$

Compute the unit binormal vector.

 > $\mathrm{UnitBinormal}=\mathrm{TNBFrame}\left(\mathrm{helix},\mathrm{binormal}=\mathrm{true}\right)$
 ${\mathrm{UnitBinormal}}{=}\left[\begin{array}{c}\frac{\sqrt{{2}}{\mathrm{sin}}{}\left({t}\right)}{{2}}\\ {-}\frac{\sqrt{{2}}{\mathrm{cos}}{}\left({t}\right)}{{2}}\\ \frac{\sqrt{{2}}}{{2}}\end{array}\right]$ (3.3)

Plot the unit tangent vector.

 > $\mathrm{TNBFrame}\left(\mathrm{helix},\mathrm{output}=\mathrm{plot},\mathrm{tangent}=\mathrm{true}\right)$

Create an animation of the unit tangent and binormal vectors.

 > $\mathrm{TNBFrame}\left(\mathrm{helix},\mathrm{output}=\mathrm{animation},\mathrm{normal}=\mathrm{false}\right)$

To plot the osculating circles of a space curve, use the RadiusOfCurvature command.

 > $\mathrm{RadiusOfCurvature}\left(\mathrm{helix},\mathrm{output}=\mathrm{plot},\mathrm{circles}=1,\mathrm{scaling}=\mathrm{constrained},\mathrm{axes}=\mathrm{normal},\mathrm{range}=0..2\mathrm{π}\right)$

The package includes other space curve commands that return only values, for example, Curvature and Torsion.

 > $\mathrm{Curvature}\left(\mathrm{helix}\right)$
 $\frac{\sqrt{{2}{{\mathrm{sin}}{}\left({t}\right)}^{{2}}{+}{2}{{\mathrm{cos}}{}\left({t}\right)}^{{2}}}\sqrt{{2}}}{{4}}$ (3.4)
 > $\mathrm{Torsion}\left(\mathrm{helix}\right)$
 $\frac{{1}}{{2}}$ (3.5)

All space curve commands that return plots can also plot two-dimensional curves, except the Binormal and RadiusOfCurvature commands.

VectorFields

 > $\mathrm{SetCoordinates}\left(\mathrm{cartesian}\left[x,y\right]\right)$
 ${{\mathrm{cartesian}}}_{{x}{,}{y}}$ (4.1)

In addition to Divergence and Curl, VectorFields have two main associated commands: VectorField and FlowLine.

As previously mentioned, the VectorField command creates VectorFields. You can also use it to plot VectorFields.

 > $\mathrm{VectorField}\left(F,\mathrm{output}=\mathrm{plot},\mathrm{view}=\left[-2..2,-2..2\right],\mathrm{fieldoptions}=\left[\mathrm{grid}=\left[6,6\right]\right]\right)$
 > $\mathrm{VectorField}\left(F,\mathrm{output}=\mathrm{plot},\mathrm{view}=\left[1..6,2..9\right]\right)$

The FlowLine command can plot or animate the flow line emanating from a specified starting point.
You can also create an animation that shows the path of an indicator flowing through the vector field along the flow line.

 > $\mathrm{FlowLine}\left(F,⟨1,2⟩,\mathrm{output}=\mathrm{plot},\mathrm{fieldoptions}=\left[\mathrm{grid}=\left[6,6\right]\right]\right)$
 > $\mathrm{FlowLine}\left(F,⟨0.1,0.1⟩,\mathrm{output}=\mathrm{animation},\mathrm{fieldoptions}=\left[\mathrm{grid}=\left[6,6\right]\right],\mathrm{view}=\left[-18..18,-18..18\right],\mathrm{scaling}=\mathrm{constrained}\right)$

Integration

Using the output = plot option, you can visually represent the integral for a LineInt or Flux command before solving the problem.

The LineInt command computes a line integral, which is also commonly known as a work integral.
The command has four domain types over which it can be integrated: Path, Line, LineSegments, and Circle.
The Circle domain is available only in two dimensions, the others are available in two or three dimensions.

Visually represent a line integral over an ellipse, and compute the integral. Note the direction of the tangent vector.

 > $\mathrm{LineInt}\left(\mathrm{VectorField}\left(⟨y,-x⟩\right),\mathrm{Path}\left(⟨5\mathrm{cos}\left(t\right),3\mathrm{sin}\left(t\right)⟩,t=0..2\mathrm{π}\right),\mathrm{output}=\mathrm{plot}\right);\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}$$\mathrm{LineInt}\left(\mathrm{VectorField}\left(⟨y,-x⟩\right),\mathrm{Path}\left(⟨5\mathrm{cos}\left(t\right),3\mathrm{sin}\left(t\right)⟩,t=0..2\mathrm{π}\right)\right)$
 ${-}{30}{\mathrm{\pi }}$ (5.1)

To reverse the direction of the path (and tangent vector), reverse the endpoints of the parameter range in the Path definition.

 > $\mathrm{LineInt}\left(\mathrm{VectorField}\left(⟨y,-x⟩\right),\mathrm{Path}\left(⟨5\mathrm{cos}\left(t\right),3\mathrm{sin}\left(t\right)⟩,t=2\mathrm{π}..0\right),\mathrm{output}=\mathrm{plot}\right);\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}$$\mathrm{LineInt}\left(\mathrm{VectorField}\left(⟨y,-x⟩\right),\mathrm{Path}\left(⟨5\mathrm{cos}\left(t\right),3\mathrm{sin}\left(t\right)⟩,t=2\mathrm{π}..0\right)\right)$
 ${30}{\mathrm{\pi }}$ (5.2)

You can calculate the flux integral using the Flux command. The domains over which you can integrate are:
(In two dimensions)  Circle, Line, LineSegments, and Path
(In three dimensions)  Box, Sphere, and Surface
You can specify the direction of the normal vector for Circle, Sphere, and Box domains by including the word 'outward' or 'inward' as the last argument of the domain function. The default value is 'outward'.

Visually represent a flux integral over an ellipse, and compute the integral. Note the direction of the tangent vector.

 > $\mathrm{Flux}\left(\mathrm{VectorField}\left(⟨y,-x+y⟩\right),\mathrm{Path}\left(⟨5\mathrm{cos}\left(t\right),3\mathrm{sin}\left(t\right)⟩,t=0..2\mathrm{π}\right),\mathrm{output}=\mathrm{plot}\right);\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}$$\mathrm{Flux}\left(\mathrm{VectorField}\left(⟨y,-x+y⟩\right),\mathrm{Path}\left(⟨5\mathrm{cos}\left(t\right),3\mathrm{sin}\left(t\right)⟩,t=0..2\mathrm{π}\right)\right)$
 ${15}{\mathrm{\pi }}$ (5.3)

To reverse the direction of the path (and tangent vector), reverse the endpoints of the parameter range in the Path definition.

 > $\mathrm{Flux}\left(\mathrm{VectorField}\left(⟨y,-x+y⟩\right),\mathrm{Path}\left(⟨5\mathrm{cos}\left(t\right),3\mathrm{sin}\left(t\right)⟩,t=2\mathrm{π}..0\right),\mathrm{output}=\mathrm{plot}\right);\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}$$\mathrm{Flux}\left(\mathrm{VectorField}\left(⟨y,-x+y⟩\right),\mathrm{Path}\left(⟨5\mathrm{cos}\left(t\right),3\mathrm{sin}\left(t\right)⟩,t=2\mathrm{π}..0\right)\right)$
 ${-}{15}{\mathrm{\pi }}$ (5.4)
 > $\mathrm{SetCoordinates}\left(\mathrm{cartesian}\left[x,y,z\right]\right);$$\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathrm{Flux}\left(\mathrm{VectorField}\left(⟨y,-z,x+z⟩\right),\mathrm{Box}\left(1..4,2..6,1..6\right),\mathrm{output}=\mathrm{plot}\right);$$\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathrm{Flux}\left(\mathrm{VectorField}\left(⟨y,-z,x+z⟩\right),\mathrm{Box}\left(1..4,2..6,1..6,'\mathrm{inward}'\right),\mathrm{output}=\mathrm{plot}\right)$
 ${{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}$

Interactive Commands

There are two interactive commands in the Student[VectorCalculus] package: SpaceCurveTutor and VectorFieldTutor.
The VectorFieldTutor provides a point-and-click interface to the FlowLine command. The SpaceCurveTutor provides a point-and-click interface to the space curve plotting functionality.

 > $\mathrm{VectorFieldTutor}\left(\right)$
 > $\mathrm{SpaceCurveTutor}\left(\right)$