${}$
Chapter 9: Vector Calculus
${}$
Section 9.1: Student VectorCalculus Package  Overview
${}$

Coordinates


${}$
The Student VectorCalculus package recognizes the five coordinate systems listed in Table 9.1.1.
System

Default Names of Coordinate Variables

cartesian

$x\,y$

cartesian

$x\,y\,z$

polar

$r\,\mathrm{\θ}$

cylindrical

$r\,\mathrm{\θ}\,z$

spherical

$r\,\mathrm{\φ}\,\mathrm{\θ}$

Table 9.1.1 Coordinate systems recognized by the Student VectorCalculus package



${}$
The default system is the Cartesian system (but in Maple, it's spelled all in lower case). In two dimensions, Maple will default to the coordinate names $x$ and $y$, unless these names are overridden with other names. In three dimensions, Maple will default to the coordinate names $x\,y$, and $z$, unless these names are overridden with other names.
The default names in polar, cylindrical, and spherical coordinates are listed in Table 9.1.1. Earlier in this Guide, spherical coordinates were invoked in this package with the coordinate names $\mathrm{\ρ}\,\mathrm{\φ}\,\mathrm{\θ}$. The radial variable will continue to by taken as $\mathrm{\ρ}$, and that will require that both the system name (spherical) and the coordinatevariable names must be stated when using spherical coordinates.
In spherical coordinates, the default name for the angle measured down from the positive $z$axis is $\mathrm{\φ}$. However, no matter what name is given to this angle, it must always be the second of the three coordinate names. It is the position of the angle in the triple of names that determines its meaning, not the specific name given to the variable. (This caution is necessary because the typical mathematical usage is to call this angle $\mathrm{\φ}$, but the typical usage in physics and engineering is to call this angle $\mathrm{\θ}$.) Again, it is not the name that matters in Maple, it is the position in the triple of names that determines meaning.
${}$
Maple sets a default "ambient" coordinate system, the Cartesian system. Individual objects defined in the package can be given a different coordinate system. These objects carry their coordinate system as an attribute. However, default coordinate names acquired by naming a system (without specifying coordinate names) are not "attached" with the same binding that they would be if the coordinate variables had been specifically named.
In many ways, the Student VectorCalculus package is more forgiving with respect to coordinate systems and coordinate names than the VectorCalculus package itself. That is why this Guide uses the Student package. The alternative is a constant setting and changing of coordinate systems that is both tedious and confusing.
Table 9.1.2 lists the two commands relevant to changing the ambient coordinate system. No use will be made of the SetCoordinates command in the whole of Chapter 9. All calculations can be done against the background of an ambient coordinate system that is the default "cartesian." The GetCoordinates command can be used to obtain the ambient system, or the system attached to a particular object.
Command

Usage

SetCoordinates

SetCoordinates(polar) or SetCoordinates(polar[r,t])

GetCoordinates

GetCoordinates() or GetCoordinates(object)

Table 9.1.2 Manipulating coordinate systems





Vector Objects


${}$
Table 9.1.3 lists the four basic vector objects in the Student VectorCalculus package. These are the free Vector, the RootedVector, the PositionVector, and the VectorField.
Object

Usage

Free vector

<a, b>
Vector([a, b])
Vector(<a, b>)
Vector(<a, b>, polar)
Vector(<a, b>, polar[r, t])

Rooted vector

RootedVector(root = [u, v], <a, b>)

Position vector

PositionVector([a, b])
PositionVector([s, s], polar[r, t])
PositionVector([u, v], spherical[$\mathrm{\ρ}\,\mathrm{\φ}\,\mathrm{\θ}$])

Vector field

VectorField(<f(x, y), g(x, y)>)
VectorField(<f(r, t), g(r, t)>, polar[r, t])

Table 9.1.3 Basic vector objects




Details for the Objects in Table 9.1.3



Free Vectors


${}$
If a free vector is defined without a call to the Vector command, then the object acquires the ambient coordinate system and variable names. To override the defaults, the Vector command must be used.${}$
${}$
In Cartesian coordinates, a point $\left(a\,b\right)$ is associated with the vector $a\mathbf{i}plus;b\mathbf{j}$, that is, with the arrow from the origin (the tail of the arrow) to the point (the head of the arrow). Because points and "vectors" can be so identified in Cartesian coordinates, the free vector $\u27e8a\,b\u27e9$ becomes, in Maple, the designation of both the arrow and the point. Unfortunately, in nonCartesian coordinates, the association of a point with an arrow from the origin fails because parallel unit basis vectors do not exist. However, Maple continues to use the free vector notation as the notation for points in nonCartesian coordinates. Table 9.1.4 gives examples of free vectors and their notations.
${}$
•

Tools≻Load Package: Student Vector Calculus


Loading Student:VectorCalculus

Examples of free vectors

$\u27e8a\,b\u27e9$ =
${}$

$\u27e8a\,b\,c\u27e9$ =
${}$

$\mathrm{Vector}\left(\u27e8a\,b\u27e9\,\mathrm{polar}\right)$ =
${}$

$\mathrm{Vector}\left(\u27e8a\,b\,c\u27e9\,\mathrm{cylindrical}\right)$ =
${}$

$\mathrm{Vector}\left(\u27e8a\,b\,c\u27e9\,\mathrm{spherical}\left[\mathrm{\ρ}\,\mathrm{\φ}\,\mathrm{\θ}\right]\right)$ =
${}$

Table 9.1.4 Free vectors



In Cartesian coordinates, the unit basis vectors $\left\{\mathbf{i}\,\mathbf{j}\,\mathbf{k}\right\}$, are replaced by the symbols $\left\{{e}_{x}\,{e}_{y}\,{e}_{z}\right\}$. By analogy, the nonCartesian systems use similar notations for basis vectors that exist, not in the Cartesian plane, but in a rectangular plane with those coordinate names on the coordinate axes. For example, when describing a point in polar coordinates, the system of concentric circles and radial lines superimposed on the Cartesian plane does not contain the basis vectors $\left\{{e}_{r}\,{e}_{\mathrm{\θ}}\right\}$. These vectors exist in a rectangular system, the $r\mathrm{\θ}$plane. As will be seen in the discussion of the vector field, when unit basis vectors are drawn on the concentric circles and radial lines of, say, the polar system, different symbols are used, symbols that denote the dependence of these basis vectors on the point at which they are positioned.
${}$


Rooted Vectors


${}$
In Cartesian coordinates, where the basis vectors $\left\{\mathbf{i}\,\mathbf{j}\,\mathbf{k}\right\}$ are everywhere respectively parallel, a free vector can be translated parallel to itself so that its tail resides on some point other than the origin. For most vector operations, the location of the tail does not matter.
${}$
In nonCartesian coordinates, where the basis vectors are positiondependent, it is useful to have a way for associating a vector with the location of its tail. This is done with the RootedVector construct, and as shown in Table 9.1.3, the location of the tail is the "root point" designated at the "root" for the vector. Such rooted vectors always display as column vectors.
${}$


The Position Vector


${}$
The position vector is the Cartesian construct by which a Cartesian point is associated with an arrow from the origin. If the arrow is parametrized so that its tip moves, then the set of points through which it moves forms a curve. Thus, the PositionVector in Maple is a construct that respectively captures a curve or a surface as the one or twoparameter family of points defined parametrically by a vector whose components are the parametric expressions for the object.
Maple's PositionVector command returns a Cartesian vector displayed as a column vector. The input can be a list of components in a nonCartesian system. Table 9.1.5 illustrates this for a curve in polar coordinates, the surface $z\=f\left(x\,y\right)$ in Cartesian coordinates, and a sphere of radius 1 given in spherical coordinates.
$\mathrm{Student}:\mathrm{VectorCalculus}:\mathrm{PositionVector}\left(\left[{s}^{2}\,{s}^{3}\right]\,\mathrm{polar}\right)$ =
${}$

$\mathrm{Student}:\mathrm{VectorCalculus}:\mathrm{PositionVector}\left(\left[x\,y\,f\left(x\,y\right)\right]\right)$ =
${}$

$\mathrm{Student}:\mathrm{VectorCalculus}:\mathrm{PositionVector}\left(\left[1\,\mathrm{\φ}\,\mathrm{\θ}\right]\,\mathrm{spherical}\right)$ =
${}$

Table 9.1.5 Examples of the PositionVector command



${}$
The polar curve in Table 9.1.5 is described parametrically by the equations $r\left(s\right)\={s}^{2}\,\mathrm{\θ}\left(s\right)\={s}^{3}$. The position vector representation is always in Cartesian coordinates, so the two components of this vector are then $x\left(s\right)\=r\left(s\right)\mathrm{cos}\left(\mathrm{\θ}\left(s\right)\right)$, $y\left(s\right)\=r\left(s\right)\mathrm{sin}\left(\mathrm{\θ}\left(s\right)\right)$.
The Cartesian surface in Table 9.1.5 is described parametrically by the equations $x\=x\,y\=y\,z\=f\left(x\,y\right)$, as per the three components of the position vector.
The sphere in Table 9.1.5 is described parametrically by the equations $\mathrm{\ρ}\=1\,\mathrm{\φ}\=\mathrm{\φ}\,\mathrm{\θ}\=\mathrm{\θ}$. Since the position vector representation is always in Cartesian coordinates, the three components of this vector are then $x\left(\mathrm{\φ}\,\mathrm{\θ}\right)\=\mathrm{sin}\left(\mathrm{\phi}\right)\mathrm{cos}\left(\mathrm{\theta}\right)$, $y\left(\mathrm{\φ}\,\mathrm{\θ}\right)\=\mathrm{sin}\left(\mathrm{\phi}\right)\mathrm{sin}\left(\mathrm{\theta}\right)$, $z\left(\mathrm{\φ}\,\mathrm{\θ}\right)\=\mathrm{cos}\left(\mathrm{\φ}\right)$.
The real benefit of representing curves and surfaces via the PositionVector command is its compatibility with the PlotPositionVector command by means of which various vector fields can be superimposed on the curves and surfaces this command draws. (See the section Visualizations, below.)
${}$


Vector Fields


${}$
Mathematically speaking, a vector field is a function that associates a vector with each point in a domain. The formal mechanism by which this is done in Maple is the VectorField command, illustrated in Table 9.1.3. Each such vector is described in terms of basis vectors that are defined at the point in question. Table 9.1.6 illustrates Maple's representation vector fields defined in different coordinate systems.
$\mathrm{Student}:\mathrm{VectorCalculus}:\mathrm{VectorField}\left(\u27e8x\+y\,xy\u27e9\right)$ =
${}$

$\mathrm{Student}:\mathrm{VectorCalculus}:\mathrm{VectorField}\left(\u27e8u\,v\,w\u27e9\right)$ =
${}$

$\mathrm{Student}:\mathrm{VectorCalculus}:\mathrm{VectorField}\left(\u27e8r\+\mathrm{\θ}\,r\mathrm{\θ}\u27e9\,\mathrm{polar}\right)$ =
${}$

$\mathrm{Student}:\mathrm{VectorCalculus}:\mathrm{VectorField}\left(\u27e8u\,v\,w\u27e9\,\mathrm{cylindrical}\right)$ =
${}$

$\mathrm{Student}:\mathrm{VectorCalculus}:\mathrm{VectorField}\left(\u27e8u\,v\,w\u27e9\,\mathrm{spherical}\right)$ =
${}$

Table 9.1.6 Vector fields with explicit display of "moving basis vectors"



Notice the overbars on each basis vector. These symbols represent basis vectors defined at the point where the arrow is attached. Thus, these symbols are supposed to be positiondependent vectors, but in Maple, they are only symbols. The underlying positiondependence is tracked by other code in the Student VectorCalculus package.
Because of the confusion inherent in the use of both unbarred and barred basis vectors (one for points, the other for vector fields), this Guide will display both free vectors and vector fields as column vectors, and will use the English language to detail basis vectors where necessary.
${}$
When a VectorField is evaluated at a point, a RootedVector results. The root point is the point of evaluation. This operation requires that the "barred" basis vectors be evaluated at the root point. But the barred basis vectors do not actually carry coordinate information. Hence, the evalVF command is used to evaluate a VectorField at a point. This command contains the code for determining the barred basis vectors at the evaluation point. If an ordinary evaluation (or substitution) were made, only the components of the vector would be pointwise evaluated, and the basis vectors would therefore be incorrect, and a rooted vector would not result.
${}$
The VectorField command can also return a graph of the arrows of the field.


${}$
Table 9.1.7 lists other commands relevant for the use of the basic vector objects in Table 9.1.3.
Command

Comments

BasisFormat

•

Changes the display of free vectors and vector fields.

•

The default is to display basis vectors, either unbarred or barred.

•

Executing the command with the argument "false" switches the display to columnvector format.


About

•

Applied to any of the four basic vector objects, this command returns relevant information for that object.


evalVF

•

As noted after Table 9.1.6, this command is used to evaluate a vector field at a point, and results in a rooted vector.


MapToBasis

•

Change coordinates in a free vector or in a vector field.


ConvertVector

•

Converts Cartesian free vector, rooted vector, or position vector to a free, rooted, or position vector.


Table 9.1.7 Commands pertinent to use of the basic vector objects in Table 9.1.3



${}$


Differentiation


${}$
Table 9.1.8 lists the commands in the Student VectorCalculus package that in some way involve differentiation. The differentiation commands relevant to the FrenetSerret formalism appear earlier in Section 2.7.
Command

Comments

diff

•

The toplevel diff command is modified so that it automatically maps onto components of vectors.


Gradient

•

Computes $\nabla f$, the gradient of the scalar $f$, returning a vector field.


Divergence

•

Computes $\nabla \xb7\mathbf{F}$, the divergence of the vector field F.


Curl

•

Computes $\nabla \times \mathbf{F}$, the curl of the vector field F, returning a vector field.


Laplacian

•

Computes ${\nabla}^{2}f$, the Laplacian of the scalar $f$.


DirectionalDiff

•

Computes the directional derivative of the scalar $f$.


TangentLine

•

Returns a representation of the line tangent to a curve.


TangentPlane

•

Returns a representation of the plane tangent to a surface.


Table 9.1.8 Differentiation commands in the Student VectorCalculus package



${}$


Integration


${}$
Table 9.1.9 lists the commands in the Student VectorCalculus package that in some way involve integration.
${}$${}$
Command

Comments

int

•

The toplevel int command is modified to recognize the following predefined domains: Circle, Ellipse, Parallelepiped, Rectangle, Region, Sector, Sphere, Tetrahedron, and Triangle.


PathInt

•

Computes ${\int}_{C}f\mathrm{ds}$, the line integral of the scalar $f$ , taken with respect to arc length $s$ along the curve $C$.

•

The following predefined paths of integration of recognized: Arc, Circle, Ellipse, Line, LineSegments, and Path.


LineInt

•

Computes along the curve $C$, ${\int}_{C}\mathbf{F}\xb7\mathbf{dr}$ = ${\int}_{C}\mathbf{F}\xb7\mathbf{T}\mathrm{ds}$, the line integral of the tangential component of the vector field F, where T is the unit tangent vector along $C$, and $\mathrm{ds}$ is the element of arc length along $C$.

•

The following predefined paths of integration are recognized: Arc, Circle, Circle3D, Ellipse, Line, LineSegments, and Path.

•

A graph of the vector field and the integration path is a possible return for the following predefined paths of integration: Circle, Line, LineSegments, and Path.


SurfaceInt

•

Computes $\int {\int}_{S}fd\mathrm{sigma;}$, the surface integral of the scalar $f$ taken over the surface $S$, with $d\mathrm{\σ}$ being the element of surface area for $S$.

•

The following predefined surfaces are recognized: Box, Sphere, and Surface.

•

Surfaces specified by the Surface option can be defined over the following planar regions: Circle, Ellipse, Rectangle, Region, Sector, and Triangle.


Flux

•

In the plane, computes ${\int}_{C}\mathbf{F}\xb7\mathbf{N}\mathrm{ds}$, the flux of the vector field F through the plane curve $C$, where N is a unit normal field along $C$, and $\mathrm{ds}$ is the element of arc length along $C$.

•

The following predefined curves are recognized: Arc, Circle, Ellipse, Line, LineSegments, and Path. A graph of the vector field and the curve is a possible return for the Circle, Line, LineSegments, and Path options. One or more representative normal vectors are drawn.

•

In space, computes $\int {\int}_{S}\mathbf{F}\xb7\mathbf{N}d\mathrm{sigma;}$, the flux of the vector field F through the surface $S$, where N is a unit normal field on $S$, and $d\mathrm{\σ}$ is the element of surface area for $S$.

•

The following predefined surfaces are recognized: Box, Sphere, and Surface.

•

Surfaces specified by the Surface option can be defined over the following planar regions: Circle, Ellipse, Rectangle, Region, Sector, and Triangle.

•

For the Box, Sphere, and Surface options, a graph of the vector field and surface of integration is a possible return. One or more representative normal vectors are drawn. However, no graphs are drawn for surfaces specified over any of the predefined planar regions.


ScalarPotential

Given a vector field F, returns (if it exists) the scalar $f$ whose gradient $\nabla f$ equals F.

VectorPotential

Given a vector field F, returns (if it exists) a vector A whose curl $\nabla \times \mathbf{A}$ equals F.

Table 9.1.9 Student VectorCalculus commands that involve integration



${}$


Visualization


${}$
Table 9.1.10 lists the commands in the Student VectorCalculus package that do, or can, return graphs.
${}$
Command

Comment

PlotVector

•

Graphs one or more free or rooted vectors.


PlotPositionVector

•

Graphs the curve or surface represented by a PositionVector, and has options for adding vectors from various vector fields defined along the curve or surface.


VectorField

•

This command can create a vectorfield object, or graph its arrows.

•

This graphical functionality can also be accessed through the
tutor.


SpaceCurve

•

This command provides a unified interface for graphing planar and spatial curves.

•

The
tutor provides interactive access to this functionality.


Flux

•

This command forms and evaluates flux integrals, and can also return a graph of the vector field and the curve or surface.


Table 9.1.10 Student VectorCalculus commands that do, or can, return graphs



${}$

${}$
<< Chapter Overview Table of Contents Next Section >>
${}$${}$
© Maplesoft, a division of Waterloo Maple Inc., 2023. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
${}$
For more information on Maplesoft products and services, visit www.maplesoft.com
${}$
${}$
${}$
${}$
${}$
${}$
${}$
