login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBoxCS224 revision 1 of 2

1 2
Editor:
Time: 2007/11/18 17:51:50 GMT-8
Note: more calculations

changed:
-
\begin{axiom}
[1/2, 3/4, 2/3]
\end{axiom}

\begin{axiom}
matA := matrix [[0,0,80],[250,0,-40],[250,-250,80]]
invmatA := inverse matA
vecA := [300,300,0]
invmatA * vecA

matB := matrix [[0,0,l * 72],[250,0,l * -36],[250,-250,l * 72]]
invmatB := inverse matB
vecB := [300,300,0]
invmatB * vecB

matC := matrix [[l1 * 0,l1 * 0,l1 * 80],[l2 * 250,l2 * 0,l2 * -40],[l3 * 250,l3 * -250,l3 *80]]
invmatC := inverse matC
vecC := [l1 * 300,l2 * 300,0]
invmatC * vecC

matPastaA := matrix [[0,0,80,0,-300],[250,0,-40,0,-300],[250,-250,80,0,0],[250,0,100,-250,0],[0,c1,-200,c2,0]]
matPastaATimeShift := diagonalMatrix [l1,l2,l3,l4,l5]
matPastaATimeShift * matPastaA
eqPastaA := determinant (matPastaATimeShift * matPastaA)
solve(eqPastaA,c1)

matPastaB := matrix [[0,0,80,0],[250,0,-40,0],[250,-250,80,0],[250,0,100,-250]]
invmatPastaB := inverse matPastaB
vecPastaB := [300,300,0,0]
invmatPastaB * vecPastaB

fmatPasta := matrix [[1,-1,0,0,0],[0,-1,1,1,0],[0,0,250,0,-c1],[0,0,0,250,-c2],[0,0,0,0,200]]
invfmatPasta := inverse fmatPasta
fvecPasta := [0,0,0,0,W]
invfmatPasta * fvecPasta

fmatPastaB := matrix [[1,-1,0,0,0],[0,-1,1,1,0],[0,0,250,0,-c1],[0,0,0,250,-c2],[80,40,80,100,0]]
invfmatPastaB := inverse fmatPastaB
invfmatPastaB * fvecPasta

detmatFoodClothes := matrix [[0,0,80,0,0,-300],[250,0,-40,0,0,-300],[250,-250,80,0,0,0],[0,0,-200,100000,0,0],[0,0,200,50000,-20,0],[0,167 * c1,-200,0,2 * c2,0]]
eqFoodClothes := determinant detmatFoodClothes
solve(eqFoodClothes,c1)


matFoodClothes := matrix [[0,0,80,0,0],[250,0,-40,0,0],[250,-250,80,0,0],[0,0,-200,100000,0],[0,0,200,50000,-20]]
invmatFoodClothes := inverse matFoodClothes
vecFoodClothes := [300,300,0,0,0]
invmatFoodClothes * vecFoodClothes

\end{axiom}



fricas
[1/2, 3/4, 2/3]

\label{eq1}\left[{1 \over 2}, \:{3 \over 4}, \:{2 \over 3}\right](1)
Type: List(Fraction(Integer))

fricas
matA := matrix [[0,0,80],[250,0,-40],[250,-250,80]]

\label{eq2}\left[ 
\begin{array}{ccc}
0 & 0 &{80}
\
{250}& 0 & -{40}
\
{250}& -{250}&{80}
(2)
Type: Matrix(Integer)
fricas
invmatA := inverse matA

\label{eq3}\left[ 
\begin{array}{ccc}
{1 \over{500}}&{1 \over{250}}& 0 
\
{3 \over{500}}&{1 \over{250}}& -{1 \over{250}}
\
{1 \over{80}}& 0 & 0 
(3)
Type: Union(Matrix(Fraction(Integer)),...)
fricas
vecA := [300,300,0]

\label{eq4}\left[{300}, \:{300}, \: 0 \right](4)
Type: List(NonNegativeInteger?)
fricas
invmatA * vecA

\label{eq5}\left[{9 \over 5}, \: 3, \:{{15}\over 4}\right](5)
Type: Vector(Fraction(Integer))
fricas
matB := matrix [[0,0,l * 72],[250,0,l * -36],[250,-250,l * 72]]

\label{eq6}\left[ 
\begin{array}{ccc}
0 & 0 &{{72}\  l}
\
{250}& 0 & -{{36}\  l}
\
{250}& -{250}&{{72}\  l}
(6)
Type: Matrix(Polynomial(Integer))
fricas
invmatB := inverse matB

\label{eq7}\left[ 
\begin{array}{ccc}
{1 \over{500}}&{1 \over{250}}& 0 
\
{3 \over{500}}&{1 \over{250}}& -{1 \over{250}}
\
{1 \over{{72}\  l}}& 0 & 0 
(7)
Type: Union(Matrix(Fraction(Polynomial(Integer))),...)
fricas
vecB := [300,300,0]

\label{eq8}\left[{300}, \:{300}, \: 0 \right](8)
Type: List(NonNegativeInteger?)
fricas
invmatB * vecB

\label{eq9}\left[{9 \over 5}, \: 3, \:{{25}\over{6 \  l}}\right](9)
Type: Vector(Fraction(Polynomial(Integer)))
fricas
matC := matrix [[l1 * 0,l1 * 0,l1 * 80],[l2 * 250,l2 * 0,l2 * -40],[l3 * 250,l3 * -250,l3 *80]]

\label{eq10}\left[ 
\begin{array}{ccc}
0 & 0 &{{80}\  l 1}
\
{{250}\  l 2}& 0 & -{{40}\  l 2}
\
{{250}\  l 3}& -{{250}\  l 3}&{{80}\  l 3}
(10)
Type: Matrix(Polynomial(Integer))
fricas
invmatC := inverse matC

\label{eq11}\left[ 
\begin{array}{ccc}
{1 \over{{500}\  l 1}}&{1 \over{{250}\  l 2}}& 0 
\
{3 \over{{500}\  l 1}}&{1 \over{{250}\  l 2}}& -{1 \over{{250}\  l 3}}
\
{1 \over{{80}\  l 1}}& 0 & 0 
(11)
Type: Union(Matrix(Fraction(Polynomial(Integer))),...)
fricas
vecC := [l1 * 300,l2 * 300,0]

\label{eq12}\left[{{300}\  l 1}, \:{{300}\  l 2}, \: 0 \right](12)
Type: List(Polynomial(Integer))
fricas
invmatC * vecC

\label{eq13}\left[{9 \over 5}, \: 3, \:{{15}\over 4}\right](13)
Type: Vector(Fraction(Polynomial(Integer)))
fricas
matPastaA := matrix [[0,0,80,0,-300],[250,0,-40,0,-300],[250,-250,80,0,0],[250,0,100,-250,0],[0,c1,-200,c2,0]]

\label{eq14}\left[ 
\begin{array}{ccccc}
0 & 0 &{80}& 0 & -{300}
\
{250}& 0 & -{40}& 0 & -{300}
\
{250}& -{250}&{80}& 0 & 0 
\
{250}& 0 &{100}& -{250}& 0 
\
0 & c 1 & -{200}& c 2 & 0 
(14)
Type: Matrix(Polynomial(Integer))
fricas
matPastaATimeShift := diagonalMatrix [l1,l2,l3,l4,l5]

\label{eq15}\left[ 
\begin{array}{ccccc}
l 1 & 0 & 0 & 0 & 0 
\
0 & l 2 & 0 & 0 & 0 
\
0 & 0 & l 3 & 0 & 0 
\
0 & 0 & 0 & l 4 & 0 
\
0 & 0 & 0 & 0 & l 5 
(15)
Type: Matrix(Polynomial(Integer))
fricas
matPastaATimeShift * matPastaA

\label{eq16}\left[ 
\begin{array}{ccccc}
0 & 0 &{{80}\  l 1}& 0 & -{{300}\  l 1}
\
{{250}\  l 2}& 0 & -{{40}\  l 2}& 0 & -{{300}\  l 2}
\
{{250}\  l 3}& -{{250}\  l 3}&{{80}\  l 3}& 0 & 0 
\
{{250}\  l 4}& 0 &{{100}\  l 4}& -{{250}\  l 4}& 0 
\
0 &{c 1 \  l 5}& -{{200}\  l 5}&{c 2 \  l 5}& 0 
(16)
Type: Matrix(Polynomial(Integer))
fricas
eqPastaA := determinant (matPastaATimeShift * matPastaA)

\label{eq17}{\left({{4125000000}\  c 2}+{{3750000000}\  c 1}-{93750000000
0}\right)}\  l 1 \  l 2 \  l 3 \  l 4 \  l 5(17)
Type: Polynomial(Integer)
fricas
solve(eqPastaA,c1)

\label{eq18}\left[{c 1 ={{-{{11}\  c 2}+{2500}}\over{10}}}\right](18)
Type: List(Equation(Fraction(Polynomial(Integer))))
fricas
matPastaB := matrix [[0,0,80,0],[250,0,-40,0],[250,-250,80,0],[250,0,100,-250]]

\label{eq19}\left[ 
\begin{array}{cccc}
0 & 0 &{80}& 0 
\
{250}& 0 & -{40}& 0 
\
{250}& -{250}&{80}& 0 
\
{250}& 0 &{100}& -{250}
(19)
Type: Matrix(Integer)
fricas
invmatPastaB := inverse matPastaB

\label{eq20}\left[ 
\begin{array}{cccc}
{1 \over{500}}&{1 \over{250}}& 0 & 0 
\
{3 \over{500}}&{1 \over{250}}& -{1 \over{250}}& 0 
\
{1 \over{80}}& 0 & 0 & 0 
\
{7 \over{1000}}&{1 \over{250}}& 0 & -{1 \over{250}}
(20)
Type: Union(Matrix(Fraction(Integer)),...)
fricas
vecPastaB := [300,300,0,0]

\label{eq21}\left[{300}, \:{300}, \: 0, \: 0 \right](21)
Type: List(NonNegativeInteger?)
fricas
invmatPastaB * vecPastaB

\label{eq22}\left[{9 \over 5}, \: 3, \:{{15}\over 4}, \:{{33}\over{10}}\right](22)
Type: Vector(Fraction(Integer))
fricas
fmatPasta := matrix [[1,-1,0,0,0],[0,-1,1,1,0],[0,0,250,0,-c1],[0,0,0,250,-c2],[0,0,0,0,200]]

\label{eq23}\left[ 
\begin{array}{ccccc}
1 & - 1 & 0 & 0 & 0 
\
0 & - 1 & 1 & 1 & 0 
\
0 & 0 &{250}& 0 & - c 1 
\
0 & 0 & 0 &{250}& - c 2 
\
0 & 0 & 0 & 0 &{200}
(23)
Type: Matrix(Polynomial(Integer))
fricas
invfmatPasta := inverse fmatPasta

\label{eq24}\left[ 
\begin{array}{ccccc}
1 & - 1 &{1 \over{250}}&{1 \over{250}}&{{c 2 + c 1}\over{5000
0}}
\
0 & - 1 &{1 \over{250}}&{1 \over{250}}&{{c 2 + c 1}\over{5000
0}}
\
0 & 0 &{1 \over{250}}& 0 &{c 1 \over{50000}}
\
0 & 0 & 0 &{1 \over{250}}&{c 2 \over{50000}}
\
0 & 0 & 0 & 0 &{1 \over{200}}
(24)
Type: Union(Matrix(Fraction(Polynomial(Integer))),...)
fricas
fvecPasta := [0,0,0,0,W]

\label{eq25}\left[ 0, \: 0, \: 0, \: 0, \: W \right](25)
Type: List(Polynomial(Integer))
fricas
invfmatPasta * fvecPasta

\label{eq26}\left[{{{W \  c 2}+{W \  c 1}}\over{50000}}, \:{{{W \  c 2}+{W \  c 1}}\over{50000}}, \:{{W \  c 1}\over{50000}}, \:{{W \  c 2}\over{50000}}, \:{W \over{200}}\right](26)
Type: Vector(Fraction(Polynomial(Integer)))
fricas
fmatPastaB := matrix [[1,-1,0,0,0],[0,-1,1,1,0],[0,0,250,0,-c1],[0,0,0,250,-c2],[80,40,80,100,0]]

\label{eq27}\left[ 
\begin{array}{ccccc}
1 & - 1 & 0 & 0 & 0 
\
0 & - 1 & 1 & 1 & 0 
\
0 & 0 &{250}& 0 & - c 1 
\
0 & 0 & 0 &{250}& - c 2 
\
{80}&{40}&{80}&{100}& 0 
(27)
Type: Matrix(Polynomial(Integer))
fricas
invfmatPastaB := inverse fmatPastaB

\label{eq28}\left[ 
\begin{array}{ccccc}
{{{7 \  c 2}+{6 \  c 1}}\over{{{11}\  c 2}+{{10}\  c 1}}}&{{-{5 \  c 2}-{4 \  c 1}}\over{{{11}\  c 2}+{{10}\  c 1}}}&{c 2 \over{{{2750}\  c 2}+{{2500}\  c 1}}}& -{c 1 \over{{{2750}\  c 2}+{{2500}\  c 1}}}&{{c 2 + c 1}\over{{{220}\  c 2}+{{200}\  c 1}}}
\
{{-{4 \  c 2}-{4 \  c 1}}\over{{{11}\  c 2}+{{10}\  c 1}}}&{{-{5 \  c 2}-{4 \  c 1}}\over{{{11}\  c 2}+{{10}\  c 1}}}&{c 2 \over{{{2750}\  c 2}+{{2500}\  c 1}}}& -{c 1 \over{{{2750}\  c 2}+{{2500}\  c 1}}}&{{c 2 + c 1}\over{{{220}\  c 2}+{{200}\  c 1}}}
\
-{{4 \  c 1}\over{{{11}\  c 2}+{{10}\  c 1}}}&{{6 \  c 1}\over{{{1
1}\  c 2}+{{10}\  c 1}}}&{{{11}\  c 2}\over{{{2750}\  c 2}+{{2
500}\  c 1}}}& -{{{11}\  c 1}\over{{{2750}\  c 2}+{{2500}\  c 1}}}&{c 1 \over{{{220}\  c 2}+{{200}\  c 1}}}
\
-{{4 \  c 2}\over{{{11}\  c 2}+{{10}\  c 1}}}&{{6 \  c 2}\over{{{1
1}\  c 2}+{{10}\  c 1}}}& -{c 2 \over{{{275}\  c 2}+{{250}\  c 1}}}&{c 1 \over{{{275}\  c 2}+{{250}\  c 1}}}&{c 2 \over{{{2
20}\  c 2}+{{200}\  c 1}}}
\
-{{1000}\over{{{11}\  c 2}+{{10}\  c 1}}}&{{1500}\over{{{11}\  c 2}+{{10}\  c 1}}}& -{{10}\over{{{11}\  c 2}+{{10}\  c 1}}}& -{{11}\over{{{11}\  c 2}+{{10}\  c 1}}}&{{25}\over{{{22}\  c 2}+{{20}\  c 1}}}
(28)
Type: Union(Matrix(Fraction(Polynomial(Integer))),...)
fricas
invfmatPastaB * fvecPasta

\label{eq29}\begin{array}{@{}l}
\displaystyle
\left[{{{W \  c 2}+{W \  c 1}}\over{{{220}\  c 2}+{{200}\  c 1}}}, \:{{{W \  c 2}+{W \  c 1}}\over{{{220}\  c 2}+{{200}\  c 1}}}, \:{{W \  c 1}\over{{{220}\  c 2}+{{200}\  c 1}}}, \: \right.
\
\
\displaystyle
\left.{{W \  c 2}\over{{{220}\  c 2}+{{200}\  c 1}}}, \:{{{25}\  W}\over{{{22}\  c 2}+{{20}\  c 1}}}\right] 
(29)
Type: Vector(Fraction(Polynomial(Integer)))
fricas
detmatFoodClothes := matrix [[0,0,80,0,0,-300],[250,0,-40,0,0,-300],[250,-250,80,0,0,0],[0,0,-200,100000,0,0],[0,0,200,50000,-20,0],[0,167 * c1,-200,0,2 * c2,0]]

\label{eq30}\left[ 
\begin{array}{cccccc}
0 & 0 &{80}& 0 & 0 & -{300}
\
{250}& 0 & -{40}& 0 & 0 & -{300}
\
{250}& -{250}&{80}& 0 & 0 & 0 
\
0 & 0 & -{200}&{100000}& 0 & 0 
\
0 & 0 &{200}&{50000}& -{20}& 0 
\
0 &{{167}\  c 1}& -{200}& 0 &{2 \  c 2}& 0 
(30)
Type: Matrix(Polynomial(Integer))
fricas
eqFoodClothes := determinant detmatFoodClothes

\label{eq31}\begin{array}{@{}l}
\displaystyle
{{1125000000000000}\  c 2}+{{5010000000000000}\  c 1}- 
\
\
\displaystyle
{7500000000000000}
(31)
Type: Polynomial(Integer)
fricas
solve(eqFoodClothes,c1)

\label{eq32}\left[{c 1 ={{-{{75}\  c 2}+{500}}\over{334}}}\right](32)
Type: List(Equation(Fraction(Polynomial(Integer))))
fricas
matFoodClothes := matrix [[0,0,80,0,0],[250,0,-40,0,0],[250,-250,80,0,0],[0,0,-200,100000,0],[0,0,200,50000,-20]]

\label{eq33}\left[ 
\begin{array}{ccccc}
0 & 0 &{80}& 0 & 0 
\
{250}& 0 & -{40}& 0 & 0 
\
{250}& -{250}&{80}& 0 & 0 
\
0 & 0 & -{200}&{100000}& 0 
\
0 & 0 &{200}&{50000}& -{20}
(33)
Type: Matrix(Integer)
fricas
invmatFoodClothes := inverse matFoodClothes

\label{eq34}\left[ 
\begin{array}{ccccc}
{1 \over{500}}&{1 \over{250}}& 0 & 0 & 0 
\
{3 \over{500}}&{1 \over{250}}& -{1 \over{250}}& 0 & 0 
\
{1 \over{80}}& 0 & 0 & 0 & 0 
\
{1 \over{40000}}& 0 & 0 &{1 \over{100000}}& 0 
\
{3 \over{16}}& 0 & 0 &{1 \over{40}}& -{1 \over{20}}
(34)
Type: Union(Matrix(Fraction(Integer)),...)
fricas
vecFoodClothes := [300,300,0,0,0]

\label{eq35}\left[{300}, \:{300}, \: 0, \: 0, \: 0 \right](35)
Type: List(NonNegativeInteger?)
fricas
invmatFoodClothes * vecFoodClothes

\label{eq36}\left[{9 \over 5}, \: 3, \:{{15}\over 4}, \:{3 \over{400}}, \:{{2
25}\over 4}\right](36)
Type: Vector(Fraction(Integer))