+ - Maple Help

VectorCalculus

 +

 Calling Sequence v1 + v2

Parameters

 v1 - Vector(algebraic); the first Vector to add v2 - Vector(algebraic); the second Vector to add

Description

 • Returns the sum of the two Vectors.
 • The following table describes the interaction between different types of Vector objects in different coordinate systems when the overloaded Plus operator is applied.

 $\mathrm{v1}$ coord($\mathrm{v1}$) $\mathrm{v2}$ coord($\mathrm{v2}$) $\mathrm{v1}+\mathrm{v2}$ coord 1 free Vector cartesian free Vector cartesian free Vector cartesian free Vector curved free Vector any error 2 free Vector cartesian rooted Vector (root2) coord2 rooted Vector (root2) coord2 3 free Vector any vector field any error 4 free Vector cartesian position Vector cartesian free Vector cartesian free Vector curved position Vector cartesian error 5 rooted Vector (root1) coord1 rooted Vector (root1) coord1 rooted Vector coord1 rooted Vector (root1) coord1 rooted Vector (root2) coord1 error rooted Vector (any) coord1 rooted Vector (any) coord2 error 6 rooted Vector (root1) coord1 vector field coord2 $\mathrm{v1}+\mathrm{v2}\left(\mathrm{root1}\right)$ coord2 7 rooted Vector (root1) cartesian position Vector cartesian rooted Vector (root1) cartesian 8 vector field coord1 vector field coord1 vector field coord1 vector field coord1 vector field coord2 error 9 vector field coord1 position Vector cartesian error 10 position Vector cartesian position Vector cartesian position Vector cartesian

Examples

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

Free Vectors can only be added if they are in cartesian coordinates.

 > $⟨1,2,3⟩+⟨1,1,1⟩$

A cartesian free Vector can be added with a rooted Vector

 > $\mathrm{v1}≔\mathrm{RootedVector}\left(\mathrm{root}=\left[1,\mathrm{Pi}\right],\left[1,1\right],{\mathrm{polar}}_{r,t}\right)$
 ${\mathrm{v1}}{≔}\left[\begin{array}{c}{1}\\ {1}\end{array}\right]$ (1)
 > $\mathrm{v1}+⟨1,1⟩$
 $\left[\begin{array}{c}{0}\\ {0}\end{array}\right]$ (2)

Rooted Vectors can be added if they are in the same coordinate system and are rooted at the same point.

 > $\mathrm{v1}≔\mathrm{RootedVector}\left(\mathrm{root}=\left[1,\frac{\mathrm{Pi}}{2}\right],\left[1,2\right],{\mathrm{polar}}_{r,t}\right)$
 ${\mathrm{v1}}{≔}\left[\begin{array}{c}{1}\\ {2}\end{array}\right]$ (3)
 > $\mathrm{v2}≔\mathrm{RootedVector}\left(\mathrm{root}=\left[1,\frac{\mathrm{Pi}}{2}\right],\left[1,0\right],{\mathrm{polar}}_{r,t}\right)$
 ${\mathrm{v2}}{≔}\left[\begin{array}{c}{1}\\ {0}\end{array}\right]$ (4)
 > $\mathrm{v1}+\mathrm{v2}$
 $\left[\begin{array}{c}{2}\\ {2}\end{array}\right]$ (5)
 > $\mathrm{GetRootPoint}\left(\mathrm{v1}+\mathrm{v2}\right)$

When a vector field and a rooted Vector are added, the vector field is evaluated at the root point of the vector and the operation is carried through. The coordinate system of the sum and the vector field are the same.

 > $\mathrm{v3}≔\mathrm{RootedVector}\left(\mathrm{root}=\left[1,\frac{\mathrm{Pi}}{3},\frac{\mathrm{Pi}}{4}\right],\left[0,1,0\right],{\mathrm{spherical}}_{r,p,t}\right)$
 ${\mathrm{v3}}{≔}\left[\begin{array}{c}{0}\\ {1}\\ {0}\end{array}\right]$ (6)
 > $\mathrm{vf}≔\mathrm{VectorField}\left(⟨y,x,z⟩,{\mathrm{cartesian}}_{x,y,z}\right)$
 > $\mathrm{v3}+\mathrm{vf}$
 $\left[\begin{array}{c}\frac{\sqrt{{2}}}{{4}}{+}\frac{\sqrt{{3}}{}\sqrt{{2}}}{{4}}\\ \frac{\sqrt{{2}}}{{4}}{+}\frac{\sqrt{{3}}{}\sqrt{{2}}}{{4}}\\ {-}\frac{\sqrt{{3}}}{{2}}{+}\frac{{1}}{{2}}\end{array}\right]$ (7)
 > $\mathrm{GetRootPoint}\left(\mathrm{v3}+\mathrm{vf}\right)$
 > $\mathrm{GetCoordinates}\left(\mathrm{v3}+\mathrm{vf}\right)$
 ${{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}$ (8)

Vector Fields can be added if they are in the same coordinate system.

 > $\mathrm{vf2}≔\mathrm{VectorField}\left(⟨r,t+\mathrm{Pi}⟩,{\mathrm{polar}}_{r,t}\right)$
 > $\mathrm{vf3}≔\mathrm{VectorField}\left(⟨r,t-\frac{\mathrm{Pi}}{2}⟩,{\mathrm{polar}}_{r,t}\right)$
 > $\mathrm{vf2}+\mathrm{vf3}$

Position Vectors can also be added, the result is a position Vector.

 > $\mathrm{pv1}≔\mathrm{PositionVector}\left(\left[p,p\right],{\mathrm{polar}}_{r,t}\right)$
 ${\mathrm{pv1}}{≔}\left[\begin{array}{c}{p}{}{\mathrm{cos}}{}\left({p}\right)\\ {p}{}{\mathrm{sin}}{}\left({p}\right)\end{array}\right]$ (9)
 > $\mathrm{pv2}≔\mathrm{PositionVector}\left(\left[p,{p}^{2}\right],{\mathrm{cartesian}}_{x,y}\right)$
 ${\mathrm{pv2}}{≔}\left[\begin{array}{c}{p}\\ {{p}}^{{2}}\end{array}\right]$ (10)
 > $\mathrm{pv1}+\mathrm{pv2}$
 $\left[\begin{array}{c}{p}{}{\mathrm{cos}}{}\left({p}\right){+}{p}\\ {p}{}{\mathrm{sin}}{}\left({p}\right){+}{{p}}^{{2}}\end{array}\right]$ (11)