ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 23 Nov 2016 09:04:08 -0600Summation with variables in limithttps://ask.sagemath.org/question/35701/summation-with-variables-in-limit/ Hi, I am new to Sage (and programming for that matter). I would like to sum (a1 +a3)(a1+a4)(a2+a3)(a2+a4) over all non-negative integers a1, a2, a3, a4 which satisfy 2*a1 + a3 + a4 less-than D and 2*a1 + a3 + a4 less-than D. Of course, my answer should be in terms of D (I have already declared D as a variable).
I have tried using the standard sum function, but that doesn't seem to work over more than one variable. I could try writing my sum as several sums, each over a single variable, but that seems tedious. Does sage allow for more complicated summations like the one I would like to calculate? If so, I would be grateful for an example.
I have tried searching for similar questions on this site, as well as google searching, but I have had no success.
Thank you.
Michael YWed, 23 Nov 2016 09:04:08 -0600https://ask.sagemath.org/question/35701/how to sum up the function over all permutations of variables in associative non-commutative algebrahttps://ask.sagemath.org/question/34714/how-to-sum-up-the-function-over-all-permutations-of-variables-in-associative-non-commutative-algebra/ hello, i need to sum up $\lambda_{\sigma}(a_{\sigma(1)}a_{\sigma(2)}a_{\sigma(3)}-a_{\sigma(3)}a_{\sigma(4)}a_{\sigma(5)})$ over all $\sigma\in S_5$ where $a_i$ are elements of associative non-commutative algebra.
the result should be $E_1a_1a_2a_3a_4a_5+\cdots+E_{120}a_5a_4a_3a_2a_1$
and i need to express $E_i$ in terms of $\lambda_{\sigma}$.
actualy my tartget is to find non-zero solution of $E_i=0$ for all $i$.RadmirSun, 04 Sep 2016 08:19:15 -0500https://ask.sagemath.org/question/34714/Sage showed "TypeError: need a summation variable" when i used sum function with for loophttps://ask.sagemath.org/question/10674/sage-showed-typeerror-need-a-summation-variable-when-i-used-sum-function-with-for-loop/I try to make a summation list and the commands are below this:
> sage: var('n')
>
> sage: var('x')
>
> sage: f = (2/n)\*(sin(n\*x)\*(-1)^(n+1))
>
> sage: funclist = [sum(f,n,1,20) for n
> in range(1,3)]
but i found an error message:
> TypeError: need a summation variable
How to solve this problem?
terces907Tue, 29 Oct 2013 23:43:42 -0500https://ask.sagemath.org/question/10674/