[GiNaC-list] Problem simplifying exponents in polynomials
Gerry Boland
gerboland at gmail.com
Fri Jun 1 16:42:40 CEST 2007
Hi all,
I'm fairly new to GiNaC, but it's most impressive so far. But I've a
problem, I'm struggling to perform the following: I have a polynomial with
lots of terms (beta,e,t1 & t2 are realsymbols) like:
1/6+1/36*e^(-beta)*e^t1*e^(-t1)+1/36*e^(-t1)*e^(-beta)*e^t1+
25/36*e^t1*e^(-beta)*e^(-t1)-1/36*e^(-t1)-1/36*e^(-t1)-
1/36*e^t1*e^(-beta)-1/36*e^t1*e^(-beta)-1/36*e^(-beta)*e^t1+
5/36*e^(-t1)-1/36*e^(-t1)+1/36*e^(-t1)*e^t1*e^(-beta)-
1/36*e^(-t1)+1/36*e^(-beta)*e^(-t1)*e^t1-1/36*e^(-beta)*e^t1-
1/36*e^(-beta)*e^t1+1/36*e^t1*e^(-t1)*e^(-beta)-1/36*e^(-t1)+
5/36*e^t1*e^(-beta)
which should simply evaluate to:
1/6+5/6*e^(-beta)
I've not managed to make the expand() & collect() functions do this, it
seems to not want to perform something like:
e^t*e^(1-t)=e^1
I also tried this using actual exp() instead of e^ symbol, but I found it
harder to collect terms then too.
Is there something I'm missing or doing wrong?
Many thanks in advance,
-Gerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cebix.net/pipermail/ginac-list/attachments/20070601/5464729e/attachment.html
More information about the GiNaC-list
mailing list