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

Submitted by : (unknown) at: 2007-11-17T22:03:09-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

This doesn't work:

fricas
(1) -> L := [ A = 2*P1+P2, B = 2*P2+P1, C = 2*Q1+Q2, D = 2*Q2+Q1]

\label{eq1}\begin{array}{@{}l}
\displaystyle
\left[{A ={P 2 +{2 \  P 1}}}, \:{B ={{2 \  P 2}+ P 1}}, \:{C ={Q 2 +{2 \  Q 1}}}, \: \right.
\
\
\displaystyle
\left.{D ={{2 \  Q 2}+ Q 1}}\right] 
(1)
Type: List(Equation(Polynomial(Integer)))
fricas
solve(L, [P1,P2])

\label{eq2}\left[ \right](2)
Type: List(List(Equation(Fraction(Polynomial(Integer)))))

But it should, observe this:

fricas
SA:=solve([L.1,L.2],[P1,P2])

\label{eq3}\left[{\left[{P 1 ={\frac{- B +{2 \  A}}{3}}}, \:{P 2 ={\frac{{2 \  B}- A}{3}}}\right]}\right](3)
Type: List(List(Equation(Fraction(Polynomial(Integer)))))
fricas
SB:=solve([L.3,L.4],[Q1,Q2])

\label{eq4}\left[{\left[{Q 1 ={\frac{- D +{2 \  C}}{3}}}, \:{Q 2 ={\frac{{2 \  D}- C}{3}}}\right]}\right](4)
Type: List(List(Equation(Fraction(Polynomial(Integer)))))

First two equationa do not depend on Q_i, the later two don't depend on P_i. Now check it again the initial set:

fricas
S:=[SA.1.1,SA.1.2,SB.1.1,SB.1.2]

\label{eq5}\begin{array}{@{}l}
\displaystyle
\left[{P 1 ={\frac{- B +{2 \  A}}{3}}}, \:{P 2 ={\frac{{2 \  B}- A}{3}}}, \: \right.
\
\
\displaystyle
\left.{Q 1 ={\frac{- D +{2 \  C}}{3}}}, \:{Q 2 ={\frac{{2 \  D}- C}{3}}}\right] 
(5)
Type: List(Equation(Fraction(Polynomial(Integer))))
fricas
map(x+->eval(x,S),L)

\label{eq6}\left[{A = A}, \:{B = B}, \:{C = C}, \:{D = D}\right](6)
Type: List(Equation(Expression(Integer)))

Status: open => duplicate




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