linear combination of any number of tensor_types
lin_com(c1, T1, c2, T2, ...., cN, TN)
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
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:
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](..).
A ≔ array⁡1..3,1..3,a,0,0,0,a,0,0,0,a:
B ≔ array⁡1..3,1..3,0,b,0,0,0,0,0,b,0:
C ≔ array⁡1..3,1..3,0,0,c,0,0,0,c,0,0:
The following is the direct definitions of the tensor_types T1, T2, T3, without using the function tensor[create].
T1 ≔ table⁡'index_char'=−1,−1,'compts'=op⁡A:
T2 ≔ table⁡'index_char'=−1,−1,'compts'=op⁡B:
T3 ≔ table⁡'index_char'=−1,−1,'compts'=op⁡C:
SUM ≔ lin_com⁡x,T1,T2,z,T3
Form the linear combination of some scalars:
T4 ≔ create⁡,x:T5 ≔ create⁡,y:T6 ≔ create⁡,z:
SUM ≔ lin_com⁡T4,b+c,T5,c⁢a,T6
DifferentialGeometry algebraic operations
Download Help Document