Component - Maple Help

Home : Support : Online Help : Physics : Vectors : Component

Physics[Vectors][Component] - the component (first, second, or third) of a vector

 Calling Sequence Component(A, n)

Parameters

 A - an algebraic vector n - a name or one of 1, 2, 3, or an algebraic expression representing these numbers

Description

 • Component(A, n) returns the nth. component of the vector A when A is a projected vector expression, or an unevaluated representation of the nth component when A is a non-projected vector or n is an unresolved name representing one of 1, 2 or 3. If A is not a vector then an error message is returned. Regarding how a vector is identified as such in the context of the Physics/Vectors package, see Identify and type, PhysicsVectors.
 The %Component is the inert form of Component, that is: it represents the same mathematical operation while holding the operation unperformed. To activate the operation use value.
 • When Component returns unevaluated, the display on the screen shows the vectorial expression between parentheses, and indexed (as usual when working by hand). This is done using a print/Component procedure.

Examples

 > $\mathrm{with}\left(\mathrm{Physics}\left[\mathrm{Vectors}\right]\right)$
 $\left[{\mathrm{&x}}{,}{\mathrm{+}}{,}{\mathrm{.}}{,}{\mathrm{ChangeBasis}}{,}{\mathrm{ChangeCoordinates}}{,}{\mathrm{Component}}{,}{\mathrm{Curl}}{,}{\mathrm{DirectionalDiff}}{,}{\mathrm{Divergence}}{,}{\mathrm{Gradient}}{,}{\mathrm{Identify}}{,}{\mathrm{Laplacian}}{,}{\nabla }{,}{\mathrm{Norm}}{,}{\mathrm{Setup}}{,}{\mathrm{diff}}\right]$ (1)
 > $\mathrm{Setup}\left(\mathrm{mathematicalnotation}=\mathrm{true}\right)$
 $\left[{\mathrm{mathematicalnotation}}{=}{\mathrm{true}}\right]$ (2)

An explicit algebraic vector in cartesian coordinates

 > $R≔a\left(x,y,z\right)\mathrm{_i}+b\left(x,y,z\right)\mathrm{_j}+c\left(x,y,z\right)\mathrm{_k}$
 ${R}{≔}{a}{}\left({x}{,}{y}{,}{z}\right){}\stackrel{{\wedge }}{{i}}{+}{b}{}\left({x}{,}{y}{,}{z}\right){}\stackrel{{\wedge }}{{j}}{+}{c}{}\left({x}{,}{y}{,}{z}\right){}\stackrel{{\wedge }}{{k}}$ (3)

The first and third components

 > $\mathrm{Component}\left(R,1\right)$
 ${a}{}\left({x}{,}{y}{,}{z}\right)$ (4)
 > $\mathrm{Component}\left(R,3\right)$
 ${c}{}\left({x}{,}{y}{,}{z}\right)$ (5)

The "nth" component returns unevaluated

 > $\mathrm{Component}\left(R,n\right)$
 ${\mathrm{Component}}{}\left({a}{}\left({x}{,}{y}{,}{z}\right){}{\mathrm{_i}}{+}{b}{}\left({x}{,}{y}{,}{z}\right){}{\mathrm{_j}}{+}{c}{}\left({x}{,}{y}{,}{z}\right){}{\mathrm{_k}}{,}{n}\right)$ (6)

Substituting n by something concrete, the component is obtained

 > $\mathrm{eval}\left(,n=1\right)$
 ${a}{}\left({x}{,}{y}{,}{z}\right)$ (7)

Here A_ is an abstract non-projected vector; by default, in the framework of the Physics[Vectors] package, symbols ending with "_" represent non-projected vectors (to change this postfix see Setup:

 > $\mathrm{type}\left(\mathrm{A_},\mathrm{PhysicsVectors}\right)$
 ${\mathrm{true}}$ (8)

The second component

 > $\mathrm{Component}\left(\mathrm{A_},2\right)$
 ${\mathrm{Component}}{}\left({\mathrm{A_}}{,}{2}\right)$ (9)

When $\mathrm{A_}$ is replaced by a projected vector, the selection of the component is performed

 > $\mathrm{eval}\left(,\mathrm{A_}=R\right)$
 ${b}{}\left({x}{,}{y}{,}{z}\right)$ (10)

It is also possible to work all abstract; this is the "nth" component of a non-projected vector

 > $\mathrm{Component}\left(\mathrm{A_},n\right)$
 ${\mathrm{Component}}{}\left({\mathrm{A_}}{,}{n}\right)$ (11)

Component admits as argument a generic algebraic vectorial expression, for instance

 > $\mathrm{type}\left(\mathrm{A_}+\mathrm{B_},\mathrm{PhysicsVectors}\right)$
 ${\mathrm{true}}$ (12)
 > $\mathrm{Component}\left(\mathrm{A_}+\mathrm{B_},n\right)$
 ${\mathrm{Component}}{}\left({\mathrm{A_}}{+}{\mathrm{B_}}{,}{n}\right)$ (13)

Note however that when the expression passed to Component is not a vector, the computation is interrupted with an error message

 > $\mathrm{type}\left(A,\mathrm{PhysicsVectors}\right)$
 ${\mathrm{false}}$ (14)
 > $\mathrm{Component}\left(A,n\right)$
 >