Hello, I'm dealing with products of large polynomial exponentials. However, whenever a product of two exponential terms appears they are not "simplified" into an exponential of a sum (unless the exponential args are numeric). Is there some way to coerce this to happen? Specifically I have a situation like this: exp(T-t_1)*exp(T-t_2) and I want something like this: exp(2T-t_1-t_2) or even exp(2T) exp(-t_1) exp(-t_2) I'm porting some of ginac's functionality to python (using cython), and I've been accessing ginac through that, so it's possible it's a bug on my side. However, I've tried to get the desired behavior in ginsh with no luck, so I'm guessing the default behavior is to not simplify products of exponentials. I've also tried creating a possymbol called "e" and simply raising it to the needed power, but this has the same behavior as the exp function. I've been using ginac1.6.1 Thanks, Levi
Hi,
On Wed, 7 Dec 2011 15:22:59 -0800, Levi Boyles <leviboyles@gmail.com> said: LB> exp(T-t_1)*exp(T-t_2) LB> and I want something like this: LB> exp(2T-t_1-t_2)
Yes, it will be nice to have, however to make it really useful you need a more general rule for evaluation: exp(a)*b*exp(c) -> exp(a+c)*b for any expression b. This one is not easy to do automatically within GiNaC for various reasons, I think. Thus if I need this sort of transformations, I implement a sub() method with wildcard adopted for the specific situation. Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk -- www: http://www.maths.leeds.ac.uk/~kisilv/
participants (2)
-
Levi Boyles
-
Vladimir V. Kisil