On Sat, Dec 1, 2012 at 9:32 AM, Aaron Meurer <asmeu...@gmail.com> wrote:
> I guess it's not necessarily a good idea to auto-expand things like
> binomial(n, 5).  Go ahead and open another issue for that if you want.
> Probably it should be changed to remain unevaluated, and to expand
> with expand(func=True).

Hi Aaron, before I report that, does the doit() automatically call an
expand()? Ideally what we expect is I should get:

t*Sum(n*(-1)**(1 + j)*binomial(1, j)*ival(j), (j, 0, 1)) +
Sum((-1)**j*binomial(0, j)*ival(j), (j, 0, 0)) + t**3*Sum(n*(-1)**(3 +
j)*(-1 + n)*(-2 + n)*binomial(3, j)*ival(j)/6, (j, 0, 3)) +
t**4*Sum(n*(-1)**(4 + j)*(-1 + n)*(-3 + n)*(-2 + n)*binomial(4,
j)*ival(j)/24, (j, 0, 4)) + t**2*Sum(n*(-1)**(2 + j)*(-1 +
n)*binomial(2, j)*ival(j)/2, (j, 0, 2)) + t**5*Sum(n*(-1)**(5 + j)*(-1
+ n)*(-4 + n)*(-3 + n)*(-2 + n)*binomial(5, j)*ival(j)/120, (j, 0, 5))

but with the Sums actually evaluated. BTW try copy-pasting the above
(which is nothing but the output of sstr as you had suggested) into
IPython and hitting enter, and again there is an infinite loop.

If I replace the Sum by summation then I get:

t**5*(-n*(n - 4)*(n - 3)*(n - 2)*(n - 1)*ival(0)/120 + n*(n - 4)*(n -
3)*(n - 2)*(n - 1)*ival(1)/24 - n*(n - 4)*(n - 3)*(n - 2)*(n -
1)*ival(2)/12 + n*(n - 4)*(n - 3)*(n - 2)*(n - 1)*ival(3)/12 - n*(n -
4)*(n - 3)*(n - 2)*(n - 1)*ival(4)/24 + n*(n - 4)*(n - 3)*(n - 2)*(n -
1)*ival(5)/120) + t**4*(n*(n - 3)*(n - 2)*(n - 1)*ival(0)/24 - n*(n -
3)*(n - 2)*(n - 1)*ival(1)/6 + n*(n - 3)*(n - 2)*(n - 1)*ival(2)/4 -
n*(n - 3)*(n - 2)*(n - 1)*ival(3)/6 + n*(n - 3)*(n - 2)*(n -
1)*ival(4)/24) + t**3*(-n*(n - 2)*(n - 1)*ival(0)/6 + n*(n - 2)*(n -
1)*ival(1)/2 - n*(n - 2)*(n - 1)*ival(2)/2 + n*(n - 2)*(n -
1)*ival(3)/6) + t**2*(n*(n - 1)*ival(0)/2 - n*(n - 1)*ival(1) + n*(n -
1)*ival(2)/2) + t*(-n*ival(0) + n*ival(1)) + ival(0)

which is the same doit() output I guess. What we would expect as an
"ideal" output would be:

t**5*binomial(n,5)*(-ival(5) + binomial...

something like that. So if you could advise me on how exactly to word
the subject of the bug I can report it.

-- 
Shriramana Sharma

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to