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

Edit detail for SandBoxJohn2 revision 1 of 3

1 2 3
Editor:
Time: 2007/11/18 18:05:13 GMT-8
Note: fix formatting

changed:
-
This is a new SandBox test page. Since the page name begins with
SandBox, no email notice should be generated if this page is
changed.

Solving Equations

  What method is used to solve equation in Axiom?

\begin{reduce}
off tex;
solve( {st^2 * ( (x2-xa)^2 + (y2-ya)^2 ) = sa^2 * ( (x2-xt)^2 + (y2-yt)^2 ), y2 = 0}, {x2, y2} );
solve( {st^2 * ( (x2-xa)^2 + (y2-ya)^2 ) = sa^2 * ( (x2-xt)^2 + (y2-yt)^2 ), y2 = 0}, {x2, y2} );
solve( {st^2 * ( (x2-xa)^2 + (y2-ya)^2 ) = sa^2 * ( (x2-xt)^2 + (y2-yt)^2 ), y2 = m*x2 + b}, {x2, y2} );
\end{reduce}

\begin{axiom}
)set output tex off
)set output algebra on
solve( y = 3 * x + 7, x )
solve( [st * ( (x2-xa)^2 + (y2-ya)^2 ) = 0, x2 = 1], [x2, y2] )
solve( [st^2 * ( (x2-xa)^2 + (y2-ya)^2 ) = sa^2 * ( (x2-xt)^2 + (y2-yt)^2 ), y2 = m*x2 + b], [x2, y2] )
\end{axiom}
\begin{axiom}
solve( [st^2 * ( (x2-xa)^2 + (y2-ya)^2 ) = sa^2 * ( (x2-xt)^2 + (y2-yt)^2 ), x2 = y2], [x2, y2] )
solve( st * ( (x2-xa)^2 + (y2-ya)^2 )^(1/2) = 0,st)
solve([a=4,sin(x)=a/5],[a,x])
\end{axiom}


This is a new SandBox? test page. Since the page name begins with SandBox?, no email notice should be generated if this page is changed.

Solving Equations

What method is used to solve equation in Axiom?

off tex;
solve( {st^2 * ( (x2-xa)^2 + (y2-ya)^2 ) = sa^2 * ( (x2-xt)^2 + (y2-yt)^2 ), y2 = 0}, {x2, y2} );
4 2 2 2 2 2 2 2 2 2 {{x2=(sqrt( - sa *yt + sa *st *xa - 2*sa *st *xa*xt + sa *st *xt
2 2 2 2 2 2 4 2 2 2 2 2 + sa *st *ya + sa *st *yt - st *ya ) + sa *xt - st *xa)/(sa - st
),
y2=0},
4 2 2 2 2 2 2 2 2 2 {x2=( - sqrt( - sa *yt + sa *st *xa - 2*sa *st *xa*xt + sa *st *xt
2 2 2 2 2 2 4 2 2 2 2 + sa *st *ya + sa *st *yt - st *ya ) + sa *xt - st *xa)/(sa
2 - st ),
y2=0}}
solve( {st^2 * ( (x2-xa)^2 + (y2-ya)^2 ) = sa^2 * ( (x2-xt)^2 + (y2-yt)^2 ), y2 = 0}, {x2, y2} );
4 2 2 2 2 2 2 2 2 2 {{x2=(sqrt( - sa *yt + sa *st *xa - 2*sa *st *xa*xt + sa *st *xt
2 2 2 2 2 2 4 2 2 2 2 2 + sa *st *ya + sa *st *yt - st *ya ) + sa *xt - st *xa)/(sa - st
),
y2=0},
4 2 2 2 2 2 2 2 2 2 {x2=( - sqrt( - sa *yt + sa *st *xa - 2*sa *st *xa*xt + sa *st *xt
2 2 2 2 2 2 4 2 2 2 2 + sa *st *ya + sa *st *yt - st *ya ) + sa *xt - st *xa)/(sa
2 - st ),
y2=0}}
solve( {st^2 * ( (x2-xa)^2 + (y2-ya)^2 ) = sa^2 * ( (x2-xt)^2 + (y2-yt)^2 ), y2 = m*x2 + b}, {x2, y2} );
2 4 2 2 2 2 4 4 2 2 {{x2=(sqrt( - b *sa + 2*b *sa *st - b *st - 2*b*m*sa *xt + 2*b*m*sa *st *xa
2 2 4 4 2 2 + 2*b*m*sa *st *xt - 2*b*m*st *xa + 2*b*sa *yt - 2*b*sa *st *ya
2 2 4 2 4 2 2 2 2 2 - 2*b*sa *st *yt + 2*b*st *ya - m *sa *xt + m *sa *st *xa
2 2 2 2 2 2 2 2 2 2 2 + m *sa *st *xt + m *sa *st *ya - 2*m *sa *st *ya*yt
2 2 2 2 2 4 2 4 2 2 + m *sa *st *yt - m *st *xa + 2*m*sa *xt*yt - 2*m*sa *st *xa*yt
2 2 4 4 2 2 2 2 - 2*m*sa *st *xt*ya + 2*m*st *xa*ya - sa *yt + sa *st *xa
2 2 2 2 2 2 2 2 2 2 2 - 2*sa *st *xa*xt + sa *st *xt + sa *st *ya + sa *st *yt
4 2 2 2 2 2 2 - st *ya ) - b*m*sa + b*m*st + m*sa *yt - m*st *ya + sa *xt
2 2 2 2 2 2 2 - st *xa)/(m *sa - m *st + sa - st ),
2 4 2 2 2 2 4 4 2 2 y2=(sqrt( - b *sa + 2*b *sa *st - b *st - 2*b*m*sa *xt + 2*b*m*sa *st *xa
2 2 4 4 2 2 + 2*b*m*sa *st *xt - 2*b*m*st *xa + 2*b*sa *yt - 2*b*sa *st *ya
2 2 4 2 4 2 2 2 2 2 - 2*b*sa *st *yt + 2*b*st *ya - m *sa *xt + m *sa *st *xa
2 2 2 2 2 2 2 2 2 2 2 + m *sa *st *xt + m *sa *st *ya - 2*m *sa *st *ya*yt
2 2 2 2 2 4 2 4 2 2 + m *sa *st *yt - m *st *xa + 2*m*sa *xt*yt - 2*m*sa *st *xa*yt
2 2 4 4 2 2 2 2 - 2*m*sa *st *xt*ya + 2*m*st *xa*ya - sa *yt + sa *st *xa
2 2 2 2 2 2 2 2 2 2 2 - 2*sa *st *xa*xt + sa *st *xt + sa *st *ya + sa *st *yt
4 2 2 2 2 2 2 2 2 - st *ya )*m + b*sa - b*st + m *sa *yt - m *st *ya + m*sa *xt
2 2 2 2 2 2 2 - m*st *xa)/(m *sa - m *st + sa - st )},
2 4 2 2 2 2 4 4 {x2=( - sqrt( - b *sa + 2*b *sa *st - b *st - 2*b*m*sa *xt
2 2 2 2 4 4 + 2*b*m*sa *st *xa + 2*b*m*sa *st *xt - 2*b*m*st *xa + 2*b*sa *yt
2 2 2 2 4 2 4 2 - 2*b*sa *st *ya - 2*b*sa *st *yt + 2*b*st *ya - m *sa *xt
2 2 2 2 2 2 2 2 2 2 2 2 + m *sa *st *xa + m *sa *st *xt + m *sa *st *ya
2 2 2 2 2 2 2 2 4 2 - 2*m *sa *st *ya*yt + m *sa *st *yt - m *st *xa
4 2 2 2 2 + 2*m*sa *xt*yt - 2*m*sa *st *xa*yt - 2*m*sa *st *xt*ya
4 4 2 2 2 2 2 2 + 2*m*st *xa*ya - sa *yt + sa *st *xa - 2*sa *st *xa*xt
2 2 2 2 2 2 2 2 2 4 2 2 + sa *st *xt + sa *st *ya + sa *st *yt - st *ya ) - b*m*sa
2 2 2 2 2 2 2 2 2 2 + b*m*st + m*sa *yt - m*st *ya + sa *xt - st *xa)/(m *sa - m *st + sa
2 - st ),
2 4 2 2 2 2 4 4 y2=( - sqrt( - b *sa + 2*b *sa *st - b *st - 2*b*m*sa *xt
2 2 2 2 4 4 + 2*b*m*sa *st *xa + 2*b*m*sa *st *xt - 2*b*m*st *xa + 2*b*sa *yt
2 2 2 2 4 2 4 2 - 2*b*sa *st *ya - 2*b*sa *st *yt + 2*b*st *ya - m *sa *xt
2 2 2 2 2 2 2 2 2 2 2 2 + m *sa *st *xa + m *sa *st *xt + m *sa *st *ya
2 2 2 2 2 2 2 2 4 2 - 2*m *sa *st *ya*yt + m *sa *st *yt - m *st *xa
4 2 2 2 2 + 2*m*sa *xt*yt - 2*m*sa *st *xa*yt - 2*m*sa *st *xt*ya
4 4 2 2 2 2 2 2 + 2*m*st *xa*ya - sa *yt + sa *st *xa - 2*sa *st *xa*xt
2 2 2 2 2 2 2 2 2 4 2 2 + sa *st *xt + sa *st *ya + sa *st *yt - st *ya )*m + b*sa
2 2 2 2 2 2 2 2 2 2 2 - b*st + m *sa *yt - m *st *ya + m*sa *xt - m*st *xa)/(m *sa - m *st
2 2 + sa - st )}}
reduce

axiom
)set output tex off
axiom
)set output algebra on
solve( y = 3 * x + 7, x )
y - 7 (1) [x= -----] 3
Type: List(Equation(Fraction(Polynomial(Integer))))
axiom
solve( [st * ( (x2-xa)^2 + (y2-ya)^2 ) = 0, x2 = 1], [x2, y2] )
2 2 2 (2) [[x2= 1,ya - 2y2 ya + y2 + xa - 2xa + 1= 0]]
Type: List(List(Equation(Fraction(Polynomial(Integer)))))
axiom
solve( [st^2 * ( (x2-xa)^2 + (y2-ya)^2 ) = sa^2 * ( (x2-xt)^2 + (y2-yt)^2 ), y2 =
m*x2 + b], [x2, y2] )
(3) [ y2 - b [x2= ------, m
2 2 2 2 2 2 2 2 2 2 - m sa yt + 2m sa y2 yt + m st ya - 2m st y2 ya + 2 2 2 2 2 ((m + 1)st + (- m - 1)sa )y2 + 2 2 2 2 2 2 2 2 (2m sa xt - 2m st xa - 2b st + 2b sa )y2 - m sa xt - 2b m sa xt + 2 2 2 2 2 2 2 2 m st xa + 2b m st xa + b st - b sa = 0 ] ]
Type: List(List(Equation(Fraction(Polynomial(Integer)))))

axiom
solve( [st^2 * ( (x2-xa)^2 + (y2-ya)^2 ) = sa^2 * ( (x2-xt)^2 + (y2-yt)^2 ), x2 = y2],
[x2, y2] )
(4) [ [x2= y2,
2 2 2 2 2 2 2 2 2 - sa yt + 2sa y2 yt + st ya - 2st y2 ya + (2st - 2sa )y2 + 2 2 2 2 2 2 (2sa xt - 2st xa)y2 - sa xt + st xa = 0 ] ]
Type: List(List(Equation(Fraction(Polynomial(Integer)))))
axiom
solve( st * ( (x2-xa)^2 + (y2-ya)^2 )^(1/2) = 0,st)
(5) [st= 0]
Type: List(Equation(Expression(Integer)))
axiom
solve([a=4,sin(x)=a/5],[a,x])
(6) [[]]
Type: List(List(Equation(Expression(Integer))))