From: nijso b. <ni...@ho...> - 2014-04-20 22:01:37
|
Hi, I want a*exp(x+2)/b to be split into [a,1/b,exp(x),exp(2)] so I can collect the constant terms. (%i2) substinpart("[",a/b,0); (%o2) [a,1/b] (%i4) substinpart("[",exp(x+2),0); (%o4) [%e,x+2] but the internal representations of a/b and exp(x+2) are: ((MTIMES SIMP) $A ((MEXPT SIMP) $B -1)) ((MTIMES SIMP) ((MEXPT) $%E 2) ((MEXPT) $%E $X)) I guess I still don't understand exactly how substinpart works. Why is substinpart not working on exp(x+2)? In both cases, "*" is the first operator mentioned in the internal representation, but also inpart(exp(x +2),0) says the first operator is "^". Best, Nijso |