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

fricas
As := matrix([ [-3,1,1,1], [1,1,1,1], [1,1,1,1], [1,1,1,1]])

\label{eq1}\left[ 
\begin{array}{cccc}
- 3 & 1 & 1 & 1 
\
1 & 1 & 1 & 1 
\
1 & 1 & 1 & 1 
\
1 & 1 & 1 & 1 
(1)
Type: Matrix(Integer)
fricas
A := subMatrix(As, 2,4,2,4)

\label{eq2}\left[ 
\begin{array}{ccc}
1 & 1 & 1 
\
1 & 1 & 1 
\
1 & 1 & 1 
(2)
Type: Matrix(Integer)
fricas
ob := orthonormalBasis(A)

\label{eq3}\begin{array}{@{}l}
\displaystyle
\left[{\left[ 
\begin{array}{c}
-{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}
\
{{\sqrt{2}}\over{\sqrt{3}}}
\
-{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}
(3)
Type: List(Matrix(Expression(Integer)))
fricas
P : Matrix(Expression Integer) := new(3,3,0)

\label{eq4}\left[ 
\begin{array}{ccc}
0 & 0 & 0 
\
0 & 0 & 0 
\
0 & 0 & 0 
(4)
Type: Matrix(Expression(Integer))
fricas
setsubMatrix!(P,1,1,ob.3)

\label{eq5}\left[ 
\begin{array}{ccc}
{1 \over{\sqrt{3}}}& 0 & 0 
\
{1 \over{\sqrt{3}}}& 0 & 0 
\
{1 \over{\sqrt{3}}}& 0 & 0 
(5)
Type: Matrix(Expression(Integer))
fricas
setsubMatrix!(P,1,2,ob.1)

\label{eq6}\left[ 
\begin{array}{ccc}
{1 \over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}& 0 
\
{1 \over{\sqrt{3}}}&{{\sqrt{2}}\over{\sqrt{3}}}& 0 
\
{1 \over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}& 0 
(6)
Type: Matrix(Expression(Integer))
fricas
setsubMatrix!(P,1,3,ob.2)

\label{eq7}\left[ 
\begin{array}{ccc}
{1 \over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}& -{1 \over{\sqrt{2}}}
\
{1 \over{\sqrt{3}}}&{{\sqrt{2}}\over{\sqrt{3}}}& 0 
\
{1 \over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}&{1 \over{\sqrt{2}}}
(7)
Type: Matrix(Expression(Integer))
fricas
Pt := transpose(P)

\label{eq8}\left[ 
\begin{array}{ccc}
{1 \over{\sqrt{3}}}&{1 \over{\sqrt{3}}}&{1 \over{\sqrt{3}}}
\
-{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}&{{\sqrt{2}}\over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}
\
-{1 \over{\sqrt{2}}}& 0 &{1 \over{\sqrt{2}}}
(8)
Type: Matrix(Expression(Integer))
fricas
Ps : Matrix(Expression Integer) := new(4,4,0)

\label{eq9}\left[ 
\begin{array}{cccc}
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
(9)
Type: Matrix(Expression(Integer))
fricas
Ps(1,1) := 1

\label{eq10}1(10)
Type: Expression(Integer)
fricas
setsubMatrix!(Ps,2,2,P)

\label{eq11}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
0 &{1 \over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}& -{1 \over{\sqrt{2}}}
\
0 &{1 \over{\sqrt{3}}}&{{\sqrt{2}}\over{\sqrt{3}}}& 0 
\
0 &{1 \over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}&{1 \over{\sqrt{2}}}
(11)
Type: Matrix(Expression(Integer))
fricas
PsT := transpose(Ps)

\label{eq12}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
0 &{1 \over{\sqrt{3}}}&{1 \over{\sqrt{3}}}&{1 \over{\sqrt{3}}}
\
0 & -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}&{{\sqrt{2}}\over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}
\
0 & -{1 \over{\sqrt{2}}}& 0 &{1 \over{\sqrt{2}}}
(12)
Type: Matrix(Expression(Integer))
fricas
PsTAsPs := PsT * As * Ps

\label{eq13}\left[ 
\begin{array}{cccc}
- 3 &{3 \over{\sqrt{3}}}& 0 & 0 
\
{3 \over{\sqrt{3}}}& 3 & 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
(13)
Type: Matrix(Expression(Integer))
fricas
b1 := PsTAsPs(2,1)

\label{eq14}3 \over{\sqrt{3}}(14)
Type: Expression(Integer)
fricas
l1 := PsTAsPs(2,2)

\label{eq15}3(15)
Type: Expression(Integer)
fricas
Us : Matrix(Expression Integer) := new(4,4,0)

\label{eq16}\left[ 
\begin{array}{cccc}
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
(16)
Type: Matrix(Expression(Integer))
fricas
Us(1,1) := 1

\label{eq17}1(17)
Type: Expression(Integer)
fricas
Us(2,2) := 1

\label{eq18}1(18)
Type: Expression(Integer)
fricas
Us(3,3) := 1

\label{eq19}1(19)
Type: Expression(Integer)
fricas
Us(4,4) := 1

\label{eq20}1(20)
Type: Expression(Integer)
fricas
Us(2,1) := -b1 / l1

\label{eq21}-{1 \over{\sqrt{3}}}(21)
Type: Expression(Integer)
fricas
Us

\label{eq22}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
-{1 \over{\sqrt{3}}}& 1 & 0 & 0 
\
0 & 0 & 1 & 0 
\
0 & 0 & 0 & 1 
(22)
Type: Matrix(Expression(Integer))
fricas
PsUs := Ps * Us

\label{eq23}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
-{1 \over 3}&{1 \over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}& -{1 \over{\sqrt{2}}}
\
-{1 \over 3}&{1 \over{\sqrt{3}}}&{{\sqrt{2}}\over{\sqrt{3}}}& 0 
\
-{1 \over 3}&{1 \over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}&{1 \over{\sqrt{2}}}
(23)
Type: Matrix(Expression(Integer))
fricas
PsUsT := transpose(PsUs)

\label{eq24}\left[ 
\begin{array}{cccc}
1 & -{1 \over 3}& -{1 \over 3}& -{1 \over 3}
\
0 &{1 \over{\sqrt{3}}}&{1 \over{\sqrt{3}}}&{1 \over{\sqrt{3}}}
\
0 & -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}&{{\sqrt{2}}\over{\sqrt{3}}}& -{{\sqrt{2}}\over{2 \ {\sqrt{3}}}}
\
0 & -{1 \over{\sqrt{2}}}& 0 &{1 \over{\sqrt{2}}}
(24)
Type: Matrix(Expression(Integer))
fricas
PsUsTAsPsUs := PsUsT * As * PsUs

\label{eq25}\left[ 
\begin{array}{cccc}
- 4 & 0 & 0 & 0 
\
0 & 3 & 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
(25)
Type: Matrix(Expression(Integer))
fricas
C := inverse(PsUs)

\label{eq26}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
{{\sqrt{3}}\over 3}&{{\sqrt{3}}\over 3}&{{\sqrt{3}}\over 3}&{{\sqrt{3}}\over 3}
\
0 & -{{\sqrt{3}}\over{3 \ {\sqrt{2}}}}&{{2 \ {\sqrt{3}}}\over{3 \ {\sqrt{2}}}}& -{{{\sqrt{2}}\ {\sqrt{3}}}\over 6}
\
0 & -{{\sqrt{2}}\over 2}& 0 &{{\sqrt{2}}\over 2}
(26)
Type: Union(Matrix(Expression(Integer)),...)
fricas
c := PsUsTAsPsUs(1,1)

\label{eq27}- 4(27)
Type: Expression(Integer)
fricas
gQ := PsUsTAsPsUs / c

\label{eq28}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
0 & -{3 \over 4}& 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
(28)
Type: Matrix(Expression(Integer))
fricas
x1 := transpose(matrix([[1,2,3,4]]))

\label{eq29}\left[ 
\begin{array}{c}
1 
\
2 
\
3 
\
4 
(29)
Type: Matrix(Integer)
fricas
v1 := transpose(x1) * As * x1

\label{eq30}\left[ 
\begin{array}{c}
{96}
(30)
Type: Matrix(Integer)
fricas
x2 := C * x1

\label{eq31}\left[ 
\begin{array}{c}
1 
\
{{{10}\ {\sqrt{3}}}\over 3}
\
0 
\
{\sqrt{2}}
(31)
Type: Matrix(Expression(Integer))
fricas
v2 := transpose(x2) * PsUsTAsPsUs * x2

\label{eq32}\left[ 
\begin{array}{c}
{96}
(32)
Type: Matrix(Expression(Integer))

fricas
)clear value c
As := matrix([ [-c,-1,-2,-1], [-1,3,-1,0], [-2,-1,3,0], [-1,0,0,-6]])

\label{eq33}\left[ 
\begin{array}{cccc}
- c & - 1 & - 2 & - 1 
\
- 1 & 3 & - 1 & 0 
\
- 2 & - 1 & 3 & 0 
\
- 1 & 0 & 0 & - 6 
(33)
Type: Matrix(Polynomial(Integer))
fricas
A := subMatrix(As, 2,4,2,4)

\label{eq34}\left[ 
\begin{array}{ccc}
3 & - 1 & 0 
\
- 1 & 3 & 0 
\
0 & 0 & - 6 
(34)
Type: Matrix(Polynomial(Integer))
fricas
ob := orthonormalBasis(A)

\label{eq35}\begin{array}{@{}l}
\displaystyle
\left[{\left[ 
\begin{array}{c}
0 
\
0 
\
1 
(35)
Type: List(Matrix(Expression(Integer)))
fricas
P : Matrix(Expression Integer) := new(3,3,0)

\label{eq36}\left[ 
\begin{array}{ccc}
0 & 0 & 0 
\
0 & 0 & 0 
\
0 & 0 & 0 
(36)
Type: Matrix(Expression(Integer))
fricas
setsubMatrix!(P,1,1,ob.3)

\label{eq37}\left[ 
\begin{array}{ccc}
-{1 \over{\sqrt{2}}}& 0 & 0 
\
{1 \over{\sqrt{2}}}& 0 & 0 
\
0 & 0 & 0 
(37)
Type: Matrix(Expression(Integer))
fricas
setsubMatrix!(P,1,2,ob.1)

\label{eq38}\left[ 
\begin{array}{ccc}
-{1 \over{\sqrt{2}}}& 0 & 0 
\
{1 \over{\sqrt{2}}}& 0 & 0 
\
0 & 1 & 0 
(38)
Type: Matrix(Expression(Integer))
fricas
setsubMatrix!(P,1,3,ob.2)

\label{eq39}\left[ 
\begin{array}{ccc}
-{1 \over{\sqrt{2}}}& 0 &{1 \over{\sqrt{2}}}
\
{1 \over{\sqrt{2}}}& 0 &{1 \over{\sqrt{2}}}
\
0 & 1 & 0 
(39)
Type: Matrix(Expression(Integer))
fricas
Pt := transpose(P)

\label{eq40}\left[ 
\begin{array}{ccc}
-{1 \over{\sqrt{2}}}&{1 \over{\sqrt{2}}}& 0 
\
0 & 0 & 1 
\
{1 \over{\sqrt{2}}}&{1 \over{\sqrt{2}}}& 0 
(40)
Type: Matrix(Expression(Integer))
fricas
Ps : Matrix(Expression Integer) := new(4,4,0)

\label{eq41}\left[ 
\begin{array}{cccc}
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
(41)
Type: Matrix(Expression(Integer))
fricas
Ps(1,1) := 1

\label{eq42}1(42)
Type: Expression(Integer)
fricas
setsubMatrix!(Ps,2,2,P)

\label{eq43}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
0 & -{1 \over{\sqrt{2}}}& 0 &{1 \over{\sqrt{2}}}
\
0 &{1 \over{\sqrt{2}}}& 0 &{1 \over{\sqrt{2}}}
\
0 & 0 & 1 & 0 
(43)
Type: Matrix(Expression(Integer))
fricas
PsT := transpose(Ps)

\label{eq44}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
0 & -{1 \over{\sqrt{2}}}&{1 \over{\sqrt{2}}}& 0 
\
0 & 0 & 0 & 1 
\
0 &{1 \over{\sqrt{2}}}&{1 \over{\sqrt{2}}}& 0 
(44)
Type: Matrix(Expression(Integer))
fricas
PsTAsPs := PsT * As * Ps

\label{eq45}\left[ 
\begin{array}{cccc}
- c & -{1 \over{\sqrt{2}}}& - 1 & -{3 \over{\sqrt{2}}}
\
-{1 \over{\sqrt{2}}}& 4 & 0 & 0 
\
- 1 & 0 & - 6 & 0 
\
-{3 \over{\sqrt{2}}}& 0 & 0 & 2 
(45)
Type: Matrix(Expression(Integer))
fricas
Us : Matrix(Expression Integer) := new(4,4,0)

\label{eq46}\left[ 
\begin{array}{cccc}
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
\
0 & 0 & 0 & 0 
(46)
Type: Matrix(Expression(Integer))
fricas
Us(1,1) := 1

\label{eq47}1(47)
Type: Expression(Integer)
fricas
Us(2,2) := 1

\label{eq48}1(48)
Type: Expression(Integer)
fricas
Us(3,3) := 1

\label{eq49}1(49)
Type: Expression(Integer)
fricas
Us(4,4) := 1

\label{eq50}1(50)
Type: Expression(Integer)
fricas
Us(2,1) := -PsTAsPs(2,1) / PsTAsPs(2,2)

\label{eq51}1 \over{4 \ {\sqrt{2}}}(51)
Type: Expression(Integer)
fricas
Us(3,1) := -PsTAsPs(3,1) / PsTAsPs(3,3)

\label{eq52}-{1 \over 6}(52)
Type: Expression(Integer)
fricas
Us(4,1) := -PsTAsPs(4,1) / PsTAsPs(4,4)

\label{eq53}3 \over{2 \ {\sqrt{2}}}(53)
Type: Expression(Integer)
fricas
Us

\label{eq54}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
{1 \over{4 \ {\sqrt{2}}}}& 1 & 0 & 0 
\
-{1 \over 6}& 0 & 1 & 0 
\
{3 \over{2 \ {\sqrt{2}}}}& 0 & 0 & 1 
(54)
Type: Matrix(Expression(Integer))
fricas
PsUs := Ps * Us

\label{eq55}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
{5 \over 8}& -{1 \over{\sqrt{2}}}& 0 &{1 \over{\sqrt{2}}}
\
{7 \over 8}&{1 \over{\sqrt{2}}}& 0 &{1 \over{\sqrt{2}}}
\
-{1 \over 6}& 0 & 1 & 0 
(55)
Type: Matrix(Expression(Integer))
fricas
PsUsT := transpose(PsUs)

\label{eq56}\left[ 
\begin{array}{cccc}
1 &{5 \over 8}&{7 \over 8}& -{1 \over 6}
\
0 & -{1 \over{\sqrt{2}}}&{1 \over{\sqrt{2}}}& 0 
\
0 & 0 & 0 & 1 
\
0 &{1 \over{\sqrt{2}}}&{1 \over{\sqrt{2}}}& 0 
(56)
Type: Matrix(Expression(Integer))
fricas
PsUsTAsPsUs := PsUsT * As * PsUs

\label{eq57}\left[ 
\begin{array}{cccc}
{{-{{24}\  c}-{53}}\over{24}}& 0 & 0 & 0 
\
0 & 4 & 0 & 0 
\
0 & 0 & - 6 & 0 
\
0 & 0 & 0 & 2 
(57)
Type: Matrix(Expression(Integer))
fricas
cc := PsUsTAsPsUs(1,1)

\label{eq58}{-{{24}\  c}-{53}}\over{24}(58)
Type: Expression(Integer)
fricas
so := solve(cc = 0, c)

\label{eq59}\left[{c = -{{53}\over{24}}}\right](59)
Type: List(Equation(Expression(Integer)))
fricas
c0 := rhs so.1

\label{eq60}-{{53}\over{24}}(60)
Type: Expression(Integer)
fricas
gQ := PsUsTAsPsUs / cc

\label{eq61}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
0 & -{{96}\over{{{24}\  c}+{53}}}& 0 & 0 
\
0 & 0 &{{144}\over{{{24}\  c}+{53}}}& 0 
\
0 & 0 & 0 & -{{48}\over{{{24}\  c}+{53}}}
(61)
Type: Matrix(Expression(Integer))
fricas
eval(PsUsTAsPsUs, c = c0)

\label{eq62}\left[ 
\begin{array}{cccc}
0 & 0 & 0 & 0 
\
0 & 4 & 0 & 0 
\
0 & 0 & - 6 & 0 
\
0 & 0 & 0 & 2 
(62)
Type: Matrix(Expression(Integer))




  Subject:   Be Bold !!
  ( 13 subscribers )  
Please rate this page: