SamplePublisher`GrassmannCalculus`
SolveGrassmannCoordinateForm |
|
| | ||||
Details and Options
Examples
(1)
Basic Examples
(1)
In[1]:=
<<GrassmannCalculus`
In[2]:=
SetCoordinateVectorSpace |
Compose a 3-dimensional equation system and solve it using the Grassmann method.
In[3]:=
GE=
[{{12,-7,-28},{6,-3,-18},{3,-2,-6}},{a,b,c}]GESolutions=
[GE]GE/.GESolutions//Simplify
ComposeGrassmannLinearEquation |
SolveGrassmannCoordinateForm |
Out[3]=
z(-28-18-6)+y(-7-3-2)+x(12+6+3)a+b+c
e
x
e
y
e
z
e
x
e
y
e
z
e
x
e
y
e
z
e
x
e
y
e
z
Out[3]=
x(9a-7b-21c),y3a-2b-8c,z(a-b-2c)
1
3
1
2
Out[3]=
True
The internal solution method proceeds by eliminating all but the last variable, one by one, and saving the intermediate results.
In[4]:=
xStep=
[#⋀c[x]]&/@GEyStep=
[#⋀c[y]]&/@xStep//ExpandAll
FastExteriorExpand |
FastExteriorExpand |
Out[4]=
(-6y+48z)⋀+(3y-12z)⋀+(3y-18z)⋀(6a-12b)⋀+(3a-12c)⋀+(3b-6c)⋀
e
x
e
y
e
x
e
z
e
y
e
z
e
x
e
y
e
x
e
z
e
y
e
z
Out[4]=
-6z⋀⋀-3a⋀⋀+3b⋀⋀+6c⋀⋀
e
x
e
y
e
z
e
x
e
y
e
z
e
x
e
y
e
z
e
x
e
y
e
z
We then use Mathematica Solve with back substitution.
In[5]:=
zSolution=Solve[yStep,z]〚1,1〛ySolution=Solve[xStep/.zSolution,y]〚1,1〛xSolution=Solve[GE/.zSolution/.ySolution,x]〚1,1〛
Out[5]=
z(a-b-2c)
1
2
Out[5]=
y3a-2b-8c
Out[5]=
x(9a-7b-21c)
1
3
In[6]:=
zSolution=Solve[yStep,z]〚1,1〛ySolution=Solve[xStep/.zSolution,y]〚1,1〛xSolution=Solve[GE/.zSolution/.ySolution,x]〚1,1〛
Out[6]=
z(a-b-2c)
1
2
Out[6]=
y3a-2b-8c
Out[6]=
x(9a-7b-21c)
1
3
|
""

