 Student/VectorCalculus/PositionVector - Help

Student[VectorCalculus]

 PositionVector
 creates a position vector with specified components and a coordinate system

 Calling Sequence PositionVector(comps) PositionVector(comps, c)

Parameters

 comps - list(algebraic); the components of the Position Vector c - name or name[name, name, ...]; specify the coordinate system possibly indexed by the coordinate names

Description

 • The PositionVector function constructs a position Vector, one of the four principal Vector data structures of the Student[VectorCalculus] package. Note that the Student[VectorCalculus] and the VectorCalculus packages share the same Vector data structures.
 • For details on the differences between the four principal Vector data structures, namely, position Vectors, rooted Vectors, free Vectors, and vector fields, see VectorCalculus,Details.
 • The call PositionVector(comps, c) returns a position Vector in a cartesian enveloping space with components interpreted using the corresponding transformations from c coordinates to cartesian coordinates.
 • If no coordinate system argument is present, the components of the position Vector are interpreted in the current coordinate system (see SetCoordinates).
 • The position Vector is a cartesian Vector rooted at the origin. This has no mathematical meaning in non-cartesian coordinates, so the c parameter only changes the way the components are interpreted. Note that the Student[VectorCalculus] package only supports the cartesian, polar, spherical and cylindrical coordinate systems.
 • If comps has indeterminates representing parameters, the position Vector serves to represent a curve or a surface.
 – To differentiate a curve or a surface specified via a position Vector, use diff.
 – To evaluate a vector field along a curve or a surface given by a position Vector, use evalVF.
 – A curve or surface given by a position Vector can be plotted using PlotPositionVector.
 • The position Vector is displayed in column notation in the same manner as rooted Vectors are, as a position Vector can be interpreted as a Vector that is (always) rooted at the cartesian origin.
 • A position Vector cannot be mapped to a basis different than cartesian coordinates. In order to see how the same position Vector would be described in other coordinate systems, use GetPVDescription.
 • Standard binary operations between position Vectors like +/-, *, Dot Product, and Cross Product are defined.
 • Binary operations between position Vectors and vector fields, free Vectors or rooted Vectors are not defined; however, a position Vector can be converted to a free Vector in cartesian coordinates via ConvertVector.

Examples

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

Position Vectors

 > $\mathrm{pv1}≔\mathrm{PositionVector}\left(\left[1,2,3\right],\mathrm{cartesian}\left[x,y,z\right]\right)$
 ${\mathrm{pv1}}{≔}\left[\begin{array}{c}{1}\\ {2}\\ {3}\end{array}\right]$ (1)
 > $\mathrm{About}\left(\mathrm{pv1}\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Position Vector}}\\ {\mathrm{Components:}}& \left[{1}{,}{2}{,}{3}\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}\\ {\mathrm{Root Point:}}& \left[{0}{,}{0}{,}{0}\right]\end{array}\right]$ (2)
 > $\mathrm{PositionVector}\left(\left[1,\frac{\mathrm{\pi }}{2}\right],\mathrm{polar}\left[r,t\right]\right)$
 $\left[\begin{array}{c}{0}\\ {1}\end{array}\right]$ (3)

Curves

 > $\mathrm{R1}≔\mathrm{PositionVector}\left(\left[p,{p}^{2}\right],\mathrm{cartesian}\left[x,y\right]\right)$
 ${\mathrm{R1}}{≔}\left[\begin{array}{c}{p}\\ {{p}}^{{2}}\end{array}\right]$ (4)
 > $\mathrm{PlotPositionVector}\left(\mathrm{R1},p=1..2\right)$ > $\mathrm{R2}≔\mathrm{PositionVector}\left(\left[v,v\right],\mathrm{polar}\left[r,\mathrm{\theta }\right]\right)$
 ${\mathrm{R2}}{≔}\left[\begin{array}{c}{v}{}{\mathrm{cos}}{}\left({v}\right)\\ {v}{}{\mathrm{sin}}{}\left({v}\right)\end{array}\right]$ (5)
 > $\mathrm{PlotPositionVector}\left(\mathrm{R2},v=0..3\mathrm{\pi }\right)$ > $\mathrm{R3}≔\mathrm{PositionVector}\left(\left[1,\frac{\mathrm{\pi }}{2}+\mathrm{arctan}\left(\frac{1}{2}t\right),t\right],\mathrm{spherical}\right)$
 ${\mathrm{R3}}{≔}\left[\begin{array}{c}\frac{{2}{}{\mathrm{cos}}{}\left({t}\right)}{\sqrt{{{t}}^{{2}}{+}{4}}}\\ \frac{{2}{}{\mathrm{sin}}{}\left({t}\right)}{\sqrt{{{t}}^{{2}}{+}{4}}}\\ {-}\frac{{t}}{\sqrt{{{t}}^{{2}}{+}{4}}}\end{array}\right]$ (6)
 > $\mathrm{PlotPositionVector}\left(\mathrm{R3},t=0..4\mathrm{\pi }\right)$ Surfaces

 > $\mathrm{S1}≔\mathrm{PositionVector}\left(\left[t,\frac{v}{\mathrm{sqrt}\left(1+{t}^{2}\right)},\frac{vt}{\mathrm{sqrt}\left(1+{t}^{2}\right)}\right],\mathrm{cartesian}\left[x,y,z\right]\right)$
 ${\mathrm{S1}}{≔}\left[\begin{array}{c}{t}\\ \frac{{v}}{\sqrt{{{t}}^{{2}}{+}{1}}}\\ \frac{{v}{}{t}}{\sqrt{{{t}}^{{2}}{+}{1}}}\end{array}\right]$ (7)
 > $\mathrm{PlotPositionVector}\left(\mathrm{S1},t=-3..3,v=-3..3\right)$ > $\mathrm{S2}≔\mathrm{PositionVector}\left(\left[1,p,q\right],\mathrm{spherical}\left[r,\mathrm{\phi },\mathrm{\theta }\right]\right)$
 ${\mathrm{S2}}{≔}\left[\begin{array}{c}{\mathrm{sin}}{}\left({p}\right){}{\mathrm{cos}}{}\left({q}\right)\\ {\mathrm{sin}}{}\left({p}\right){}{\mathrm{sin}}{}\left({q}\right)\\ {\mathrm{cos}}{}\left({p}\right)\end{array}\right]$ (8)
 > $\mathrm{PlotPositionVector}\left(\mathrm{S2},p=0..\mathrm{\pi },q=0..2\mathrm{\pi }\right)$ 