GetComponents - Maple Help

# Online Help

###### All Products    Maple    MapleSim

DifferentialGeometry

 GetComponents
 find the coefficients of a vector, differential form or tensor with respect to a list of vectors, differential forms or tensors

 Calling Sequence GetComponents(T, S, options)

Parameters

 T - a vector, differential form or tensor on a manifold M or a list of such S - a list of vectors, differential form or tensors options : method = "real", trueorfalse = "on"/"off", initialpointlist = [pt1, pt2, ...]

Description

 • If T is a vector, differential form, or tensor and S = [S1, S2, S3, ...] is a list of like objects, then the procedure GetComponents(T, S) will return a list of Maple expressions C = [c1, c2, c3, ...] such that T = c1*S1 + c2*S2 + c3*S3 + ... .  The expressions C are called the coefficients of T with respect to the elements of S.  If the elements of S are linearly independent, then the coefficients C, if they exist, are unique. If the coefficients C cannot be found, that is, if T is linearly independent from the elements of S, then GetComponents(T, S) will return [].
 • If T = [T1, T2, T3, ...] is a list of vectors, differential form or tensors, then GetComponents(T, S) will return a list of lists C = [C1, C2, C3, ...], where the Ci are the coefficients of T with respect to the elements of S.
 • If method = "real", then GetComponents(T, S) will determine if T is a linear combination of the elements of S with real numbers (i.e. constants) as coefficients.
 • If trueorfalse = "on" then GetComponents will simply return true if T is a linear combination of S and false otherwise.
 • Here are the details of how the GetComponents procedure works with the option method = "real".  Let us just consider the question of when a function g(x, y) is a constant linear combination of the functions f1(x, y), f2(x, y), f3(x, y),  ..., that is, g(x, y) = c1*f1(x, y) + c2*f2(x, y) + c3*f3(x, y) + ... (*). The first approach is to use the Maple random number generator to pick many numerical values [xi, yi] for the coordinates [x, y], substitute these values into (*) to obtain a large overdetermined system, and use LinearAlgebra:-LinearSolve to find the c1, c2, c3, ....  This works well when the fi(x, y) are rational functions (except for the remote possibility that a value of [x, y] is chosen to be a singular point for one of the functions).  The second method is to take repeated derivatives of (*) with respect to all the variables and evaluate the results at a few select user specified points pt1, pt2.  This too will generate a large overdetermined system which can then be solved for the c1, c2, c3, ....  If the GetComponents command is called with the initialpointlist = [pt1, pt2 , ..] where pti = [ xi, yi], then the second method is used.  The second approach works better in cases where the functions are transcendental.
 • This command is part of the DifferentialGeometry package, and so can be used in the form GetComponents(...) only after executing the command with(DifferentialGeometry).  It can always be used in the long form DifferentialGeometry:-GetComponents.

Examples

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

Create a 3-dimensional manifold M with coordinates [x, y, z, w].

 > $\mathrm{DGsetup}\left(\left[x,y,z,w\right],M\right):$

Example 1.

Express the vector X as a linear combination of the vectors S1.  Check the result using DGzip.

 > $\mathrm{X1}≔\mathrm{evalDG}\left({x}^{2}\mathrm{D_x}-yz\mathrm{D_y}+{z}^{3}\mathrm{D_w}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{{x}}^{{2}}\right]{,}\left[\left[{2}\right]{,}{-}{z}{}{y}\right]{,}\left[\left[{4}\right]{,}{{z}}^{{3}}\right]\right]\right]\right)$ (1)
 > $\mathrm{S1}≔\mathrm{evalDG}\left(\left[\mathrm{D_x},\mathrm{D_y},\mathrm{D_z},\mathrm{D_w}\right]\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{3}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{4}\right]{,}{1}\right]\right]\right]\right)\right]$ (2)
 > $C≔\mathrm{GetComponents}\left(\mathrm{X1},\mathrm{S1}\right)$
 ${C}{≔}\left[{{x}}^{{2}}{,}{-}{z}{}{y}{,}{0}{,}{{z}}^{{3}}\right]$ (3)
 > $\mathrm{Y1}≔\mathrm{DGzip}\left(C,\mathrm{S1},"plus"\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{{x}}^{{2}}\right]{,}\left[\left[{2}\right]{,}{-}{z}{}{y}\right]{,}\left[\left[{4}\right]{,}{{z}}^{{3}}\right]\right]\right]\right)$ (4)
 > $\mathrm{Y1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&minus\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{X1}$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{0}\right]\right]\right]\right)$ (5)

Example 2.

Show that the 2-form omega2 is linearly independent of the 2-forms in S2.

 > $\mathrm{ω2}≔\mathrm{evalDG}\left(\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}+\mathrm{dy}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dw}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{2}\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{1}\right]{,}\left[\left[{2}{,}{4}\right]{,}{1}\right]\right]\right]\right)$ (6)
 > $\mathrm{S2}≔\mathrm{evalDG}\left(\left[\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dz}+\mathrm{dy}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dw},\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dz}+\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dw},\mathrm{dy}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dz}+\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dw},\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dz}+\mathrm{dz}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dw}\right]\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{2}\right]{,}\left[\left[\left[{1}{,}{3}\right]{,}{1}\right]{,}\left[\left[{2}{,}{4}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{2}\right]{,}\left[\left[\left[{1}{,}{3}\right]{,}{1}\right]{,}\left[\left[{1}{,}{4}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{2}\right]{,}\left[\left[\left[{1}{,}{4}\right]{,}{1}\right]{,}\left[\left[{2}{,}{3}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{2}\right]{,}\left[\left[\left[{1}{,}{3}\right]{,}{1}\right]{,}\left[\left[{3}{,}{4}\right]{,}{1}\right]\right]\right]\right)\right]$ (7)
 > $\mathrm{GetComponents}\left(\mathrm{ω2},\mathrm{S2}\right)$
 $\left[\right]$ (8)
 > $\mathrm{GetComponents}\left(\mathrm{ω2},\mathrm{S2},\mathrm{trueorfalse}="on"\right)$
 ${\mathrm{false}}$ (9)

Example 3.

Express the 1-forms in Omega as linear combinations of the 1-forms in S3.

 > $\mathrm{\Omega }≔\mathrm{evalDG}\left(\left[\mathrm{dx}+\mathrm{dy},\mathrm{dy}+\mathrm{dz},\mathrm{dz}+\mathrm{dw},\mathrm{dx}+\mathrm{dy}+\mathrm{dz}+\mathrm{dw}\right]\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]{,}\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{2}\right]{,}{1}\right]{,}\left[\left[{3}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{3}\right]{,}{1}\right]{,}\left[\left[{4}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]{,}\left[\left[{2}\right]{,}{1}\right]{,}\left[\left[{3}\right]{,}{1}\right]{,}\left[\left[{4}\right]{,}{1}\right]\right]\right]\right)\right]$ (10)
 > $\mathrm{S3}≔\mathrm{evalDG}\left(\left[\mathrm{dx},\mathrm{dy},\mathrm{dz},\mathrm{dw}\right]\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{3}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{4}\right]{,}{1}\right]\right]\right]\right)\right]$ (11)
 > $\mathrm{GetComponents}\left(\mathrm{\Omega },\mathrm{S3}\right)$
 $\left[\left[{1}{,}{1}{,}{0}{,}{0}\right]{,}\left[{0}{,}{1}{,}{1}{,}{0}\right]{,}\left[{0}{,}{0}{,}{1}{,}{1}\right]{,}\left[{1}{,}{1}{,}{1}{,}{1}\right]\right]$ (12)

Example 4.

Show that the vector X is a real linear combination of the vectors in S4 but not a real linear combination of the first 3 vectors in S4

 > $\mathrm{X4}≔\mathrm{evalDG}\left(\left(x+3\right)\mathrm{D_x}-\left(y+x+1\right)\mathrm{D_y}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{x}{+}{3}\right]{,}\left[\left[{2}\right]{,}{-}{y}{-}{x}{-}{1}\right]\right]\right]\right)$ (13)
 > $\mathrm{S4}≔\mathrm{evalDG}\left(\left[\mathrm{D_x},\mathrm{D_y},x\mathrm{D_x},y\mathrm{D_x},x\mathrm{D_y},y\mathrm{D_y}\right]\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{x}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{y}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{2}\right]{,}{x}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{2}\right]{,}{y}\right]\right]\right]\right)\right]$ (14)
 > $\mathrm{GetComponents}\left(\mathrm{X4},\mathrm{S4},\mathrm{method}="real"\right)$
 $\left[{3}{,}{-1}{,}{1}{,}{0}{,}{-1}{,}{-1}\right]$ (15)
 > $\mathrm{GetComponents}\left(\mathrm{X4},\mathrm{S4}\left[1..3\right],\mathrm{method}="real"\right)$
 $\left[\right]$ (16)

Example 5.

Show that the 1-form omega is a real linear combination of the 1-forms in S5.

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$
 > $\mathrm{DGsetup}\left(\left[x,y,z,w\right],M\right)$
 ${\mathrm{frame name: M}}$ (17)
 > $\mathrm{\omega }≔\mathrm{evalDG}\left(\mathrm{sin}\left(x\right)\mathrm{dx}+\mathrm{cos}\left(y\right)\mathrm{dy}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{1}\right]{,}{\mathrm{sin}}{}\left({x}\right)\right]{,}\left[\left[{2}\right]{,}{\mathrm{cos}}{}\left({y}\right)\right]\right]\right]\right)$ (18)
 > $\mathrm{S5}≔\mathrm{evalDG}\left(\left[\mathrm{sin}\left(x\right)\mathrm{dx},\mathrm{cos}\left(x\right)\mathrm{dx},\mathrm{sin}\left(y\right)\mathrm{dx},\mathrm{cos}\left(y\right)\mathrm{dx},\mathrm{sin}\left(x\right)\mathrm{dy},\mathrm{cos}\left(x\right)\mathrm{dy},\mathrm{sin}\left(y\right)\mathrm{dy},\mathrm{cos}\left(y\right)\mathrm{dy}\right]\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{1}\right]{,}{\mathrm{sin}}{}\left({x}\right)\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{1}\right]{,}{\mathrm{cos}}{}\left({x}\right)\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{1}\right]{,}{\mathrm{sin}}{}\left({y}\right)\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{1}\right]{,}{\mathrm{cos}}{}\left({y}\right)\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{2}\right]{,}{\mathrm{sin}}{}\left({x}\right)\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{2}\right]{,}{\mathrm{cos}}{}\left({x}\right)\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{2}\right]{,}{\mathrm{sin}}{}\left({y}\right)\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{2}\right]{,}{\mathrm{cos}}{}\left({y}\right)\right]\right]\right]\right)\right]$ (19)
 > $\mathrm{GetComponents}\left(\mathrm{\omega },\mathrm{S5},\mathrm{method}="real",\mathrm{initialpointlist}=\left[\left[x=0,y=0\right],\left[x=0,y=\mathrm{\pi }\right]\right]\right)$
 $\left[{1}{,}{0}{,}{0}{,}{0}{,}{0}{,}{0}{,}{0}{,}{1}\right]$ (20)
 M > 

 See Also