power rules
Chris Dams
chrisd at sci.kun.nl
Sat May 22 12:56:50 CEST 2004
Dear Emery,
On Sat, 22 May 2004, econrad wrote:
> I understand the rational behind not automatically making
> p^n/p^1=p^(n-1) when one doesn't know anything about n,
Actually, a^p*a^q=a^(p+q) for any complex numbers a, p and q.
> nevertheless, I know that I'll only be using a real n>1 (or in any case,
> I'll only use n that makes this a valid reduction). How can I force this
> power transformation to take place... I'm sure I can do some convoluted
> matching and replacing to get this to work, but a user should be able to
> give an option to "eval" or to "normal" to get this operation performed
> at their own risk, yes? Have I missed something?
This "convoluted matching and replacing" can be done by
using the method
.subs
( power(wild(0),wild(1))*power(wild(0),wild(2)
==power(wild(0),wild(1)+wild(2)),
subs_options::subs_algebraic
)
Best,
Chris Dams
More information about the GiNaC-list
mailing list