[GiNaC-list] expand conundrum

Krishna Mohan Gundu gkmohan at gmail.com
Tue Oct 28 07:24:35 CET 2008


Hi,

I am unable to understand why the following expression is not fully
expanded (I manually split it at key points to go easy on eyes). I
turn to you for help. I failed to isolate it to a simpler problem.

16*(1.0)*z1*(dz2 . [1,
0])*((1.0)*p2[1]^(-1)*z1*dz2[0]+(1.0)*p2[1]^(-1)*z2*dz1[0])
-(631.6546816697189115)*p1[2]*(1.0)^2*z1^2*z2^2
+16*(1.0)*z2*((1.0)*p2[0]^(-1)*z1*dz2[1]+(1.0)*p2[0]^(-1)*z2*dz1[1])*(dz1
. [0, 1])
+16*(1.0)*z2*((1.0)*p2[1]^(-1)*z1*dz2[0]+(1.0)*p2[1]^(-1)*z2*dz1[0])*(dz1
. [1, 0])
+16*(1.0)*z1*(dz2 . [0,
1])*((1.0)*p2[0]^(-1)*z1*dz2[1]+(1.0)*p2[0]^(-1)*z2*dz1[1])

legend:
p1,p2,dz1,dz2,dz3 are vectors,
z1, z2, z3 are scalars
p2[0],p2[1] etc are components
[1,0], [0,1] etc are vectors too
(dz1 . dz2) etc are inner products

each of the terms that starts as 16*(1.0) ... has an unexpanded part
of the from ... * (... + ...)


I can consider many possible reasons but could not come up with an answer

1) The part is actually expanded but somewhere it is being gathered
again. Not likely, as my code does not override the gather function.
2) GiNaC thinks it cannot be expanded for some reason
   a) GiNaC refuses to expand due to restrictions on the depth of the
tree? (not likely, the depth is too small)
   b) GiNaC refuses to expand cause it thinks the product may not be
distributive? (likely, but i dont know)
   c) GiNaC thinks its an atom but the output fools me into believing
it is not an atom?

I would appreciate if any of you can point out the problem. Meanwhile
I will keep digging at it.

thanks,
Krishna.


More information about the GiNaC-list mailing list