Problem Parsing an expression



Hi Richard,

Thanks for the reply.  Please see my responses in context below.



On Fri, 2012-11-30 at 07:20 -0800, Richard Fateman wrote:
> You say that the form of the exponentials differ.
> 
> What do the forms look like that you think should be the same?

If I run the sample code I sent (with display2d:false) and look for the
part beginning with aa[6] I get:

aa[6] = 0

bb[6] = -t[0]*xi^2*D-k[0]^2*t[3]*D-t[0]*Gam

ar = -2*k[0]^2*S(k[0])*K[0](k[0],xi)*Gam*xi^3*D^2
       *%e^(t[0](-xi^2*D-Gam)-k[0]^2*t[3]*D)
   -2*k[0]^4*S(k[0])*K[0](k[0],xi)*Gam*xi*D^2
     *%e^(t[0](-xi^2*D-Gam)-k[0]^2*t[3]*D)...
 
aa[6] = 0 means that it found nothing multiplying 

          exp(bb[6])=exp(-t[0]*xi^2*D-k[0]^2*t[3]*D-t[0]*Gam)

ar is the remaining expression (i.e., what I started with less what has
already been parsed).  The 2nd line in ar contains

                  %e^(t[0](-xi^2*D-Gam)-k[0]^2*t[3]*D)

which would match if the argument were expanded and rearranged.

> 
> Note that radcan does not necessarily choose the same branch of
> an algebraic function that you might.  It also changes exp(a+b)/exp(a).

I'm aware of that, but radcan isn't invoked while parsing the
expression, and is supposed to give zero.   Also, there are no algebraic
expressions here so the branch isn't relevant.

> So far as I can tell, none of the "assume" commands should affect 
> anything you are doing.

You're probably correct, but there were needed in the real problem and I
wanted to make sure that the environment used for ordering the
expressions was the same.

> 
>