First of all, you write r(...) in two places, where I suspect you mean
r*(...).
Secondly, it is not expanded because Maxima normally only does basic
normalizations by default, in order to allow the user to control the form
of the expression.
You can try expand for one kind of expansion. If you want your expression
in the form of a polynomial in 'r', try rat(r2,r). Try factor(r2) for a
different form. Etc.
A large part of the art of using Maxima is choosing the form of the
expression to work with, then figuring out how to get it into that form.
There is no such thing as the best form of an expression, just different
forms with different advantages.
-s
On Tue, Nov 29, 2011 at 20:33, Alejandro Morales <mori at fis.unam.mx> wrote:
> Hi there!
> Somebody can explain why the following expresion is not fully expanded
> with: expand(r2);? I am using Maxima 5.23.2
> (%i1) r2:(r((r((r*(A+B*exp(%i*phi[0]**))+t*C)*exp(-2*s*l)*exp(%i***
> phi[l])+B*exp(%i*phi[0])*exp(%**i*phi[l]))+t*C*exp(%i*phi[l]))**
> *exp(-2*s*l)*exp(%i*phi[l])+B***exp(%i*phi[0])*exp(2*%i*phi[l]**
> ))+t*C*exp(2*%i*phi[l]))*exp(-**2*s*l)*exp(%i*phi[l])+B*exp(%**
> i*phi[0])*exp(3*%i*phi[l]);
> %i phi - 2 l s %i phi - 2 l s
> l l
> (%o1) %e (r(%e
> %i phi - 2 l s %i phi %i phi + %i phi
> l 0 l 0
> (r(%e (t C + r (%e B + A)) + %e B)
> %i phi 2 %i phi + %i phi 2 %i phi
> l l 0 l
> + %e t C) + %e B) + %e t C)
> 3 %i phi + %i phi
> l 0
> + %e B
> (%i2) expand(r2);
> %i phi - 2 l s %i phi - 2 l s
> l l
> (%o2) %e r(%e
> %i phi - 2 l s - 2 l s + %i phi + %i phi
> l l 0
> r(%e t C + r %e B
> %i phi + %i phi %i phi - 2 l s 2 %i phi - 2 l s
> l 0 l l
> + %e B + r %e A) + %e t C
> 2 %i phi + %i phi 3 %i phi - 2 l s 3 %i phi + %i phi
> l 0 l l 0
> + %e B) + %e t C + %e B
>
> Thanks.
> ______________________________**_________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>
>