tensor(deprecated)/lin_com - Maple Help

tensor

 lin_com
 linear combination of any number of tensor_types

 Calling Sequence lin_com(c1, T1, c2, T2, ...., cN, TN)

Parameters

 c1, c2, c3, ..., cN - algebraic coefficients in the linear combination to be formed T1, T2, T3, ..., TN - tensor_types of identical characters and sharing the same space dimension

Description

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.  See DifferentialGeometry algebraic operations and Physics[*].

 • This function forms the following linear combination of tensors:

$\mathrm{c1}\mathrm{T1}+\mathrm{c2}\mathrm{T2}+\mathrm{c3}\mathrm{T3}+\mathrm{....}+\mathrm{cN}\mathrm{TN}.$

 Each * represents a scalar multiplication and each + represents naturally a tensor addition.
 • There is no limit on how many tensors to be summed; that is, N can be any positive integer.
 • Any of the algebraic c's can be omitted, in which case it is by default substituted by 1.
 • Simplification:  This routine uses the tensor/lin_com/simp routine for simplification purposes.  The simplification routine is applied to each component of result after it is computed.  By default, tensor/lin_com/simp is initialized to the tensor/simp routine.  It is recommended that the tensor/lin_com/simp routine be customized to suit the needs of the particular problem.  It should be noted that tensor/lin_com/simp is used frequently as a simplifier by other routines.  See ?tensor[simp] for a list of simplifiers used by each routine of the package.
 • This function is part of the tensor package, and so can be used in the form lin_com(..) only after performing the command with(tensor) or with(tensor, lin_com).  The function can always be accessed in the long form tensor[lin_com](..).

Examples

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.  See DifferentialGeometry algebraic operations and Physics[*].

 > $\mathrm{with}\left(\mathrm{tensor}\right):$
 > $A≔\mathrm{array}\left(1..3,1..3,\left[\left[a,0,0\right],\left[0,a,0\right],\left[0,0,a\right]\right]\right):$
 > $B≔\mathrm{array}\left(1..3,1..3,\left[\left[0,b,0\right],\left[0,0,0\right],\left[0,b,0\right]\right]\right):$
 > $C≔\mathrm{array}\left(1..3,1..3,\left[\left[0,0,c\right],\left[0,0,0\right],\left[c,0,0\right]\right]\right):$

The following is the direct definitions of the tensor_types T1, T2, T3, without using the function tensor[create].

 > $\mathrm{T1}≔\mathrm{table}\left(\left['\mathrm{index_char}'=\left[-1,-1\right],'\mathrm{compts}'=\mathrm{op}\left(A\right)\right]\right):$
 > $\mathrm{T2}≔\mathrm{table}\left(\left['\mathrm{index_char}'=\left[-1,-1\right],'\mathrm{compts}'=\mathrm{op}\left(B\right)\right]\right):$
 > $\mathrm{T3}≔\mathrm{table}\left(\left['\mathrm{index_char}'=\left[-1,-1\right],'\mathrm{compts}'=\mathrm{op}\left(C\right)\right]\right):$
 > $\mathrm{SUM}≔\mathrm{lin_com}\left(x,\mathrm{T1},\mathrm{T2},z,\mathrm{T3}\right)$
 ${\mathrm{SUM}}{≔}{table}{}\left(\left[{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]{,}{\mathrm{compts}}{=}\left[\begin{array}{ccc}{a}{}{x}& {b}& {c}{}{z}\\ {0}& {a}{}{x}& {0}\\ {c}{}{z}& {b}& {a}{}{x}\end{array}\right]\right]\right)$ (1)

Form the linear combination of some scalars:

 > $\mathrm{T4}≔\mathrm{create}\left(\left[\right],x\right):$$\mathrm{T5}≔\mathrm{create}\left(\left[\right],y\right):$$\mathrm{T6}≔\mathrm{create}\left(\left[\right],z\right):$
 > $\mathrm{SUM}≔\mathrm{lin_com}\left(\mathrm{T4},b+c,\mathrm{T5},ca,\mathrm{T6}\right)$
 ${\mathrm{SUM}}{≔}{table}{}\left(\left[{\mathrm{index_char}}{=}\left[\right]{,}{\mathrm{compts}}{=}{c}{}{a}{}{z}{+}{y}{}{b}{+}{y}{}{c}{+}{x}\right]\right)$ (2)