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

fricas
(1) -> 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}
-{\frac{1}{2 \ {\sqrt{\frac{3}{2}}}}}
\
-{\frac{1}{2 \ {\sqrt{\frac{3}{2}}}}}
\
{\frac{1}{\sqrt{\frac{3}{2}}}}
(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}
{\frac{1}{\sqrt{3}}}& 0 & 0 
\
{\frac{1}{\sqrt{3}}}& 0 & 0 
\
{\frac{1}{\sqrt{3}}}& 0 & 0 
(5)
Type: Matrix(Expression(Integer))
fricas
setsubMatrix!(P,1,2,ob.1)

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

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

\label{eq8}\left[ 
\begin{array}{ccc}
{\frac{1}{\sqrt{3}}}&{\frac{1}{\sqrt{3}}}&{\frac{1}{\sqrt{3}}}
\
-{\frac{1}{2 \ {\sqrt{\frac{3}{2}}}}}& -{\frac{1}{2 \ {\sqrt{\frac{3}{2}}}}}&{\frac{1}{\sqrt{\frac{3}{2}}}}
\
-{\frac{1}{\sqrt{2}}}&{\frac{1}{\sqrt{2}}}& 0 
(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 &{\frac{1}{\sqrt{3}}}& -{\frac{1}{2 \ {\sqrt{\frac{3}{2}}}}}& -{\frac{1}{\sqrt{2}}}
\
0 &{\frac{1}{\sqrt{3}}}& -{\frac{1}{2 \ {\sqrt{\frac{3}{2}}}}}&{\frac{1}{\sqrt{2}}}
\
0 &{\frac{1}{\sqrt{3}}}&{\frac{1}{\sqrt{\frac{3}{2}}}}& 0 
(11)
Type: Matrix(Expression(Integer))
fricas
PsT := transpose(Ps)

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

\label{eq13}\left[ 
\begin{array}{cccc}
- 3 &{\frac{3}{\sqrt{3}}}& 0 & 0 
\
{\frac{3}{\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}\frac{3}{\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}-{\frac{1}{\sqrt{3}}}(21)
Type: Expression(Integer)
fricas
Us

\label{eq22}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
-{\frac{1}{\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 
\
-{\frac{1}{3}}&{\frac{1}{\sqrt{3}}}& -{\frac{1}{2 \ {\sqrt{\frac{3}{2}}}}}& -{\frac{1}{\sqrt{2}}}
\
-{\frac{1}{3}}&{\frac{1}{\sqrt{3}}}& -{\frac{1}{2 \ {\sqrt{\frac{3}{2}}}}}&{\frac{1}{\sqrt{2}}}
\
-{\frac{1}{3}}&{\frac{1}{\sqrt{3}}}&{\frac{1}{\sqrt{\frac{3}{2}}}}& 0 
(23)
Type: Matrix(Expression(Integer))
fricas
PsUsT := transpose(PsUs)

\label{eq24}\left[ 
\begin{array}{cccc}
1 & -{\frac{1}{3}}& -{\frac{1}{3}}& -{\frac{1}{3}}
\
0 &{\frac{1}{\sqrt{3}}}&{\frac{1}{\sqrt{3}}}&{\frac{1}{\sqrt{3}}}
\
0 & -{\frac{1}{2 \ {\sqrt{\frac{3}{2}}}}}& -{\frac{1}{2 \ {\sqrt{\frac{3}{2}}}}}&{\frac{1}{\sqrt{\frac{3}{2}}}}
\
0 & -{\frac{1}{\sqrt{2}}}&{\frac{1}{\sqrt{2}}}& 0 
(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 
\
{\frac{\sqrt{3}}{3}}&{\frac{\sqrt{3}}{3}}&{\frac{\sqrt{3}}{3}}&{\frac{\sqrt{3}}{3}}
\
0 & -{\frac{\sqrt{\frac{3}{2}}}{3}}& -{\frac{\sqrt{\frac{3}{2}}}{3}}&{\frac{2 \ {\sqrt{\frac{3}{2}}}}{3}}
\
0 & -{\frac{\sqrt{2}}{2}}&{\frac{\sqrt{2}}{2}}& 0 
(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 & -{\frac{3}{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 
\
{\frac{{10}\ {\sqrt{3}}}{3}}
\
{\sqrt{\frac{3}{2}}}
\
{\frac{\sqrt{2}}{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}
-{\frac{1}{\sqrt{2}}}& 0 & 0 
\
{\frac{1}{\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}
-{\frac{1}{\sqrt{2}}}& 0 & 0 
\
{\frac{1}{\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}
-{\frac{1}{\sqrt{2}}}& 0 &{\frac{1}{\sqrt{2}}}
\
{\frac{1}{\sqrt{2}}}& 0 &{\frac{1}{\sqrt{2}}}
\
0 & 1 & 0 
(39)
Type: Matrix(Expression(Integer))
fricas
Pt := transpose(P)

\label{eq40}\left[ 
\begin{array}{ccc}
-{\frac{1}{\sqrt{2}}}&{\frac{1}{\sqrt{2}}}& 0 
\
0 & 0 & 1 
\
{\frac{1}{\sqrt{2}}}&{\frac{1}{\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 & -{\frac{1}{\sqrt{2}}}& 0 &{\frac{1}{\sqrt{2}}}
\
0 &{\frac{1}{\sqrt{2}}}& 0 &{\frac{1}{\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 & -{\frac{1}{\sqrt{2}}}&{\frac{1}{\sqrt{2}}}& 0 
\
0 & 0 & 0 & 1 
\
0 &{\frac{1}{\sqrt{2}}}&{\frac{1}{\sqrt{2}}}& 0 
(44)
Type: Matrix(Expression(Integer))
fricas
PsTAsPs := PsT * As * Ps

\label{eq45}\left[ 
\begin{array}{cccc}
- c & -{\frac{1}{\sqrt{2}}}& - 1 & -{\frac{3}{\sqrt{2}}}
\
-{\frac{1}{\sqrt{2}}}& 4 & 0 & 0 
\
- 1 & 0 & - 6 & 0 
\
-{\frac{3}{\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}\frac{1}{4 \ {\sqrt{2}}}(51)
Type: Expression(Integer)
fricas
Us(3,1) := -PsTAsPs(3,1) / PsTAsPs(3,3)

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

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

\label{eq54}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
{\frac{1}{4 \ {\sqrt{2}}}}& 1 & 0 & 0 
\
-{\frac{1}{6}}& 0 & 1 & 0 
\
{\frac{3}{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 
\
{\frac{5}{8}}& -{\frac{1}{\sqrt{2}}}& 0 &{\frac{1}{\sqrt{2}}}
\
{\frac{7}{8}}&{\frac{1}{\sqrt{2}}}& 0 &{\frac{1}{\sqrt{2}}}
\
-{\frac{1}{6}}& 0 & 1 & 0 
(55)
Type: Matrix(Expression(Integer))
fricas
PsUsT := transpose(PsUs)

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

\label{eq57}\left[ 
\begin{array}{cccc}
{\frac{-{{24}\  c}-{53}}{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}\frac{-{{24}\  c}-{53}}{24}(58)
Type: Expression(Integer)
fricas
so := solve(cc = 0, c)

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

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

\label{eq61}\left[ 
\begin{array}{cccc}
1 & 0 & 0 & 0 
\
0 & -{\frac{96}{{{24}\  c}+{53}}}& 0 & 0 
\
0 & 0 &{\frac{144}{{{24}\  c}+{53}}}& 0 
\
0 & 0 & 0 & -{\frac{48}{{{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: (replying)   Be Bold !!
  ( 15 subscribers )  
Please rate this page: