Re: Question about Simplify and related

*To*: mathgroup <mathgroup at yoda.ncsa.uiuc.edu>*Subject*: Re: Question about Simplify and related*From*: HAY at leicester.ac.uk*Date*: Tue, 22 JAN 91 22:40:45 GMT

In response to Paul Schatz's question concerning Simplify and related. Paul: AlgebraicRules[ , ] can be very useful in dealing with polynomial simplification. In the example that you give we have to get inside the lists. One way of doing this is as in (1) below - you will see that we do not need to expand or simplify. If you are doing a lot of this kind of work it might be worthwhile defining a function that will automatically take the application of AlgebraicRules inside brackets as in (2). (1) In:= u ={ {c1 c2 - c3 s1 s2,c2 s1 + c3 c1 s2,s2 s3}, {-s2 c1 - c3 s1 c2, -s2 s1 + c3 c1 c2, c2 s3}, {s3 s1, -s3 c1, c3} } plainuutrans = u.Transpose[u] eqns = { c1^2 + s1^2 == 1, c2^2 + s2^2 == 1, c3^2 + s3^2 == 1 } vars = { c1,c2,c3,s1,s2,s3 } algRls = AlgebraicRules[ eqns, vars ] plainuutrans/. x_Plus :> (x/.algRls) (* :> not ->, (...) essential*) Out = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}} (2) In:= ARL[eqns_, vars_] [expr_List]:= ARL[eqns, vars]/@ expr ARL[eqns_, vars_] [expr_]:= expr/.AlgebraicRules[eqns, vars] In:= ARL[eqns,vars][plainuutrans] Out = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}} Allan Hayes Department of Mathematics The University Leicester LE1 7RH U.K. hay at le.ac.uk