On Wed, Mar 24, 2010 at 11:01 AM, Freddie Witherden
<fred...@witherden.org> wrote:
> Hi all,
>
> After a discussion on IRC I am interested if there is any way to evaluate 
> sums of the form:
>
>>>> B = [ Symbols, expressions, ... ]
>>>> Sum(n*B[n]*Sqrt(B[n]), (n, 0, len(b)-1))
>
> I ask because the project I am currently working on is based heavily around 
> sums of this form:
> sum(sum(sum(sum(B[i]*A[i,j]*A[j,k]*A[k,l]*C[l],l,1,s),k,1,s),j,1,s),i,1,s) = 
> 1/120
>
> where s, A[i,j] (matrix) and C[i] (vector) are evaluate to Real numbers with 
> just B[i] being Symbols (so the result of the above expression is an equation 
> of the form x1*B[1] + x2*B[2] + ... + xn*B[n] with xn being Reals (of course 
> in Python the indices would be slightly different).
>
> Can anyone think of a clean way to evaluate these sorts of sums? (Extra 
> points if you know where such sums arise in practise ;)
>
> Currently my workflow is:
> 1) Use Python to generate the sums;
> 2) Evaluate using Maxima;
> 3) Paste back into a Python script, parse with regex, solve.

Can you paste your whole code so that we can try it? So your problem
is that some (complicated?) sums can't be evaluated in sympy, but it
works in maxima?

Paste the exact expressions, let's see what can be done.

Ondrej

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sy...@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