Items tagged with sum sum Tagged Items Feed

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.

The limit of

G := N -> sum(1/N*numtheory[sigma](k)/k,k=1..N ) 

as N -> infinity should be Pi^2/6. However

eval( G(N), N=infinity );

returns 0.

Can anyone explain this puzzling behaviour?


This may be just my lack of maple syntax, however I cannot seem to find a way to add upper indicies in tensors (without first converting them to some other object, array, matrix etc)

In the physics package an example is just the metric tensor. 

I am trying to do something like this:



add(g_[~mu,2], mu=1..2) 

Is there an easy way of summing upper indicies? Obviously lower indicies work, because the add/sum command recognizes the variable to iterate. 

Thanks in advance,



Hi guys


I have an if statement inside a function. This function then get's called in a sum. However, the result is not correct as the if statement checks wether the argument equals 0, but since the sum passes only the summation index name, it doesn't work as intended.

How can I tell Maple, that it has to evaluate the index before passing it on? MWE appended.




Comm := proc (n) options operator, arrow; `if`(n = 0, 1, 0) end proc;

proc (n) options operator, arrow; `if`(n = 0, 1, 0) end proc





sum(Comm(j), j = 0 .. 0);






Consider the following sum:

We know that if k is between 1 and N, the result will be

and otherwise the sum is zero.

How can I tell maple to compute this sum in each case without giving numerical values to the parameters "N" and "k"?

Thanks. :)

Hi Again

Assume that we have known matrix namely, Q, of order (m+1)*(m+1) and we want to construct following matrix

where 0(bar) is zero matrix of orde (m+1)*(m+1) and New matrix should be of order {N*(m+1)}*{N*(m+1)} where N is known constant.

thanks for any guide

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

I want to sum over several variables at once.


For example, something like


sums over 3 variables. But this can only be done if I know the number of variables in advance. I want to write a code that will sum over m variables, with m being supplied on demand.


Maple can do this for integrals. If I write


the integral is computed over m variables, for any m.


How can something like this be implemented for summation?


We know that sum can return an symbolic summation, for example,


But sometime the relation of parameters in series cannot be defined easily. And it seems that sum cannot correctly determine the symbolic summation of this kind of series:

Maybe it's due to the value of _C(infinite) is undefined. Does anyone have good idea to compute the symbolic summation of this series?

I'd appreciate any help on this topic. Thank a lot.

Hi everyone,

I wanted to plot the fourier series up to a given order of a step function using the code I attached, to change the order I used a sum with upper boundary M. When setting M to a particular value and plotting the function the result is obtained within a second, when on the otherhand using plot(subs(M=11,...),...) it takes close to a minute to produce a picture.

This might be a misuse of subs, in any case, I wanted to share my experience and maybe get an explanation about why this takes that much longer.




f := proc (t) options operator, arrow; sum(-4*sin((2*n+1)*t)/(Pi*(2*n+1)), n = 0 .. M) end proc

proc (t) options operator, arrow; sum(-4*sin((2*n+1)*t)/(Pi*(2*n+1)), n = 0 .. M) end proc


plot(subs(M = 11, f(t)), t = 0 .. 2*Pi)


M := 11; plot(f(t), t = 0 .. 2*Pi)



I have an expression like this:

Since it is linear I want Maple to rewrite it into this:

(with the benefit that Maple then can solve it at least up to a point). i have tried to conceive a rule to do that but got stuck relatively quickly. Does anybody have a way to do this (in some genrality)?


Mac Dude.



Maybe someone can give me a nice answer without Maple.

I am given a fourier series:
ln|cosx|=Co - sum( (-1)^k/k * cos2kx,k=1..infinity)
and am asked what this tells me about the chevychev series for ln(u).



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