Items tagged with sum sum Tagged Items Feed

Let M and K be given positive integers.

I struggle with how to write efficiently this formula in Maple,mainly because it sums over *pairs* of integers K1 and K2, with the given property that "K1+2*K2=K":




sum { M!/(M-K1-K2)! * K!/(K1! * K2)! * 1/M^K * 1/2^K2 : such that K1 + 2*K2 = K}

The "!" means factorial.

Why the command


coeff(sum(x^i,i=0..999)^500,x,2) prints


Error, unable to compute coeff??


I believe, that memory/cpu issues are not a relevant answer here.



coeff(sum(x^i,i=0..998)^500,x,2) gives the correct result.


coeff(sum(x^i,i=0..998)^500,x,200) is ok.

How do I compute coeffs of longer sums?Or why this limitation is imposed by Maple Server?


given this expression


U := unapply(sum(T(X[2]), X[4] = 0 .. 3600), X[2]):

I want to display U, but not all 3600 terms. is there anyway to simplify/reduce this sum?

kind of like geo series a+ar+ar^2+ar^3+...+ar^(n-1)=sum(ar^k,k=0..n-1) can be reduced to a*(1-r^n)/(1-r)


I have sum representation,



I tried evaluating at t = 0 or t = 1, it does nothing when I entered f(0)[2]; it returns



I have a big system, so the loop is necessary for the assignment.

hi can i write a function or procedure or summation so that i can write down the following polynomial ? i just want to create a set of polynomials which their summation of power ( power of x + power of y ) be less than three or equal to three ? the coefficients priority is not important , for example it is not important that a1 multiplies to x or y , i just want to create this polynomial with some coeeficients. tnx for help










I have the following procedure to do the above. It works but it returns [9,10],[10,9],[12,1] for n=1729(for example). How do I modify this to 

a) to count 9,10 and 10,9 as the same and hence only show one of them

b) get 1,12 to show as a solution?

global listcub:=table();
local k:=0, x:=iroot(iquo(n,3),3),y:=x,x3:=x^3,y3:=y^3;
if 3*x3 <> n then x=x+1; x3:=x^3;y:=x;y3:=x3 end if;
while x3<=n do
y:=iroot(n-x3,3); y3:=y^3;
if(x3+y3 = n) then k:=k+1; listcub[k]:=[x,y]end if;
x:=x+1; x3:=x^3;
end do;
end proc:


Hy all its my first post, thankyou for having me.
I'm not sure why this happens but say I got a list

X := [0, 1, 2, 3];

and perform this expression

sum(sum(a[k]*X[i]^k, k = 0 .. n), i = 1 .. nops(X))

I get output 4*a[0]+6*a[1]+14*a[2] which is correct and what I want, but if I swap the summations


sum(sum(a[k]*X[i]^k, i = 1 .. nops(X)), k = 0 .. n)

I get 3*a[0]+6*a[1]+14*a[2] which is incorrect I believe, unless I'm being silly and missing something.

this happens because its a 0 in my list, if I replace a zero with a non zero number then it works fine and if I replace my set with

X := [seq(x[i], i = 0 .. 3)];
both summations give me

and at the end there is 4*a[0]
nothing that is really depending on any element in the list. so why when I replace an element with 0 using the second expression (which should be equivalent to first) gives me less a[0]I really would like to understand why this is happening

any insight or assistance would be gratefully appreciated.(I'm still a noob)

I have a nice family of functions of the form:

W:=(p,n,mu,w)->sum(w[k] * (n-k)* mu(n-k),k=1..n)

which can be evaluated for different p's using the operator mu*diff(...,mu)

The recursion begins with p=0 and proceeds using mu*diff(W(p,n,mu,w),mu) = W(p+1,n,mu,w).

Can anybody implement this procedure in Maple

Thank you 

How can I make transformations like:

sum(a*u[k]+b*v[k],k=1..n) into a*sum(u[k],k=1..n)+b*sum(v[k],k=1..n)

and in the opposite direction?

I wish to convert:

Sum(x[k],k=1..n)*Sum(y[k],k=1..m) -> Sum(Sum(x[j]*y[k],j=1..n),k=1..m)

Can anybody show me an elegant way to do it?


Why is it that


returns a SUM entity?

   NAME(4): a
   INTPOS(2): 3


also returns a SUM entry

   NAME(4): a
   INTPOS(2): 1
   INTPOS(2): 3
   INTPOS(2): 1

ToInert() looks fine for both of these.


Tested on Maple 16, Maple 17, Maple 18

Dear all:

I wisth to replace in an expression that contains several sums:

sum(a[i],i=1..n+1) and sum(w[i],i=1..n+1)

and replace them with a single command into:

a[n+1]+sum([i],i=1..n) and w[n+1]+sum(w[n],1..n)

everywhere in the expression

Thank you


Hey all, I am new to the Maple software.

I have a question: how to find sum of all elements in a sequence?

For example , A:=[1,2,3,4]  the stupid way to find the sum is add them together by : A[1]+A[2]+A[3]+A[4]=10

Is there a better way to sum them together?

Surely this is a bug.

> 0^0;
> sum( 0^m, m=0..infinity );

I'm trying to find the partial sum of the function. Now I need to plot the first couple partial sums onto 1 graph.

I'm not really sure how to input the plot function. I was able to graph it by inputting each partial sum function but I would prefer an easier solution.

1 2 3 4 5 6 7 Last Page 1 of 10