[Maxima] Controlling simplification of type a*a^k -> a^(k+1)
yhonda at mac.com
Sat Aug 4 12:23:02 CDT 2007
I would like to introduce a flag to control the following
a*a^k -> a^(k+1).
In general this simplification is good (thanks to Raymond). However,
when dealing with a series such as
sum(a[n]/b^n, n, 0, k)
in which some a[n] happen to have value b, such
terms are simplified to b^(1-n) while other terms remain a[n]/b^n.
So, in such case, I would like to suppress the this simplification so
that all the terms look similar.
For this purpose, I want to introduce a control variable $exposimp.
If the value is nil the a*a^k->a^(k+1) will be suppressed.
The modification to simp.lisp is pretty simple:
diff -r1.41 simp.lisp
> (defmvar $exposimp t
> "If t, a*a^k to be simplified to a^k+1, otherwise such
> simplification is suppressed. The default is t.")
< ((setf expo (exponent-of (car fm) (car x)))
> ((and $exposimp (setf expo (exponent-of (car fm) (car x))))
If no one opposes, I would like to commit this.
Yasuaki Honda, Chiba, Japan
More information about the Maxima