+ - 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⟩$
 $\left({2}\right){{e}}_{{x}}{+}\left({3}\right){{e}}_{{y}}{+}\left({4}\right){{e}}_{{z}}$ (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}\left[r,t\right]\right)$
 ${\mathrm{v1}}{≔}\left[\begin{array}{c}{1}\\ {1}\end{array}\right]$ (2)
 > $\mathrm{v1}+⟨1,1⟩$
 $\left[\begin{array}{c}{0}\\ {0}\end{array}\right]$ (3)

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}\left[r,t\right]\right)$
 ${\mathrm{v1}}{≔}\left[\begin{array}{c}{1}\\ {2}\end{array}\right]$ (4)
 > $\mathrm{v2}≔\mathrm{RootedVector}\left(\mathrm{root}=\left[1,\frac{\mathrm{\pi }}{2}\right],\left[1,0\right],\mathrm{polar}\left[r,t\right]\right)$
 ${\mathrm{v2}}{≔}\left[\begin{array}{c}{1}\\ {0}\end{array}\right]$ (5)
 > $\mathrm{v1}+\mathrm{v2}$
 $\left[\begin{array}{c}{2}\\ {2}\end{array}\right]$ (6)
 > $\mathrm{GetRootPoint}\left(\mathrm{v1}+\mathrm{v2}\right)$
 $\left({1}\right){{e}}_{{r}}{+}\left(\frac{{\mathrm{\pi }}}{{2}}\right){{e}}_{{t}}$ (7)

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}\left[r,p,t\right]\right)$
 ${\mathrm{v3}}{≔}\left[\begin{array}{c}{0}\\ {1}\\ {0}\end{array}\right]$ (8)
 > $\mathrm{vf}≔\mathrm{VectorField}\left(⟨y,x,z⟩,\mathrm{cartesian}\left[x,y,z\right]\right)$
 ${\mathrm{vf}}{≔}\left({y}\right){\stackrel{{_}}{{e}}}_{{x}}{+}\left({x}\right){\stackrel{{_}}{{e}}}_{{y}}{+}\left({z}\right){\stackrel{{_}}{{e}}}_{{z}}$ (9)
 > $\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]$ (10)
 > $\mathrm{GetRootPoint}\left(\mathrm{v3}+\mathrm{vf}\right)$
 $\left(\frac{\sqrt{{3}}{}\sqrt{{2}}}{{4}}\right){{e}}_{{x}}{+}\left(\frac{\sqrt{{3}}{}\sqrt{{2}}}{{4}}\right){{e}}_{{y}}{+}\left(\frac{{1}}{{2}}\right){{e}}_{{z}}$ (11)
 > $\mathrm{GetCoordinates}\left(\mathrm{v3}+\mathrm{vf}\right)$
 ${{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}$ (12)

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

 > $\mathrm{vf2}≔\mathrm{VectorField}\left(⟨r,t+\mathrm{\pi }⟩,\mathrm{polar}\left[r,t\right]\right)$
 ${\mathrm{vf2}}{≔}\left({r}\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left({t}{+}{\mathrm{\pi }}\right){\stackrel{{_}}{{e}}}_{{t}}$ (13)
 > $\mathrm{vf3}≔\mathrm{VectorField}\left(⟨r,t-\frac{\mathrm{\pi }}{2}⟩,\mathrm{polar}\left[r,t\right]\right)$
 ${\mathrm{vf3}}{≔}\left({r}\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left({t}{-}\frac{{\mathrm{\pi }}}{{2}}\right){\stackrel{{_}}{{e}}}_{{t}}$ (14)
 > $\mathrm{vf2}+\mathrm{vf3}$
 $\left({2}{}{r}\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left({2}{}{t}{+}\frac{{\mathrm{\pi }}}{{2}}\right){\stackrel{{_}}{{e}}}_{{t}}$ (15)

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

 > $\mathrm{pv1}≔\mathrm{PositionVector}\left(\left[p,p\right],\mathrm{polar}\left[r,t\right]\right)$
 ${\mathrm{pv1}}{≔}\left[\begin{array}{c}{p}{}{\mathrm{cos}}{}\left({p}\right)\\ {p}{}{\mathrm{sin}}{}\left({p}\right)\end{array}\right]$ (16)
 > $\mathrm{pv2}≔\mathrm{PositionVector}\left(\left[p,{p}^{2}\right],\mathrm{cartesian}\left[x,y\right]\right)$
 ${\mathrm{pv2}}{≔}\left[\begin{array}{c}{p}\\ {{p}}^{{2}}\end{array}\right]$ (17)
 > $\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]$ (18)