I am using the Maple symbolic engine to evaluate the following expressions:
- expand(subs(int('(1-i+s*i+t*i)^p','s',0,1),'p',1))
- expand(subs(int('(1 -s*i+t*i)^p','s',0,1),'p',1))
The result should be exactly the same. However, the second one give the completely wrong result "1/2 i", which does not even depend on 't' as it should.
- It is essential for my purposes to first integrate and only then substitute 'p'.
- The same problem happens for any integer p>0 (not just p=1).
- If I repeat the same experiment with 't' instead of 't*i' in the original expressions, everything calculates alright:
- expand(subs(int('(1-i+s*i+ t )^p','s',0,1),'p',1)) gives exactly the same result as
- expand(subs(int('(1 -s*i+ t )^p','s',0,1),'p',1))
Is this a bug? Any ideas?
[using Matlab 2011b and Maple 15.00 — the problem occurs with newer versions as well…]
Thanks, Shahar.
Best Answer