2018-06-29 11:06:30 -0500 | received badge | ● Famous Question (source) |

2014-11-10 09:30:29 -0500 | received badge | ● Notable Question (source) |

2014-04-13 06:44:40 -0500 | received badge | ● Popular Question (source) |

2013-10-29 21:33:58 -0500 | commented answer | Difference between sum and for loop Hi, thank you for your reply. On the first point, k is always an odd integer, and so this is not a problem. I see what you mean about distinguishing between python variables and symbolic variables. The variable that will remain unknown at the end is x, and x is also a parameter for t and s. However I have been testing this out with various values of x for which I know what the answer should be. I seem to have isolated where the problem may lie. I'm not sure if you'd read my comment above: with the functions I've defined before h(3,2,3,1,2) = 0, which is right. However if I do the same calculation with sum I get sum(h(3,t,3,1,2),t,2,2) = -6. This happens for a number of values and is the reason why ... (more) |

2013-10-29 09:14:08 -0500 | commented question | Difference between sum and for loop Ok so I've had a look at it and the problem arises for some specific values in the double sum. For example, with the functions defined above, h(3,2,3,1,2) = 0 which is correct. However, when I try to compute the same value with sum, I get instead sum(h(3,t,3,1,2),t,2,2) = -6. I think this has something to do with the way in which sum evaluates its arguments. I can't work out how to deal with this, if anyone has any ideas I would really appreciate it. |

2013-10-28 07:04:05 -0500 | asked a question | Difference between sum and for loop Hi, I'm currently using sage to calculate some double sums over two variables, where s runs from 1 to t-1, and t runs from 2 to 2 where i, j, k, x, n are all nonnegative integers. This gives me the correct values for what I am enumerating, for instance qentr(1,3,3,1,2) = 96, which is right. For some reason when I replace these for loops with two nested sums, say, this no longer gives me the correct values. If I replace the two nested loops with this sum I get qentr(1,3,3,1,2)=196.... I wanted to replace the loops with sum in order to return an expression in x, the only way I can think to do this is with sum but this does not yield the right expression. Does anyone know why this happens? Does anyone know an alternative way I can get the function qentr() to return a polynomial in x? The function h from above is the following: Cheers! |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.