Hi Marduk,

> I would like to convert exp(-a^2*x^2 - a^2*y^2) into exp(-a^2*(x^2 +
> y^2)).

I don't know either. Maybe it would be easier to help if you explain the
actual problem you want to solve. Perhaps this factorization is not
really necessary.

It might even be that your rule (whatever it is) does not even apply.

(1) -> E ==> Expression Integer
                                  Type: Void
(2) -> p:E := a*(x+y)

   (2)  a y + a x
                                  Type: Expression(Integer)
(8) -> f := factor p

   (8)  a y + a x
                             Type: Factored(Expression(Integer))
(9) -> factors factor p

   (9)  []
 Type: List(Record(factor: Expression(Integer),exponent:
NonNegativeInteger))
(10) -> unit f

   (10)  a y + a x
                                      Type: Expression(Integer)
As you can see, factoring in the domain Expression considers p as an
expression, not as a polynomial.

> However, it seems that exp converts its argument presumably to
> Expression Integer, and since FriCAS always expands products the
> factorization is lost.

Yes. That is another the problem. You must understand that FriCAS is
fundamentally different than other CAS like Maple or Mathematica. They
basically have only an expression tree as their data structure. So for
any transformation there is a function.

FriCAS, however, maintains a whole pool of different data structures,
one for each specific task. Elements of such "domains" are kept
internally in a canonical form (as much as this is possible). That is
why in FriCAS, there is no "simplify".

Well, usually Expression(X) is for manipulating expressions, but (unless
somebody else here on the list comes up with a solution for you) I would
say, Expression(X) doesn't allow what you want to achieve.

Ralf

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to