Items tagged with sum sum Tagged Items Feed

Hi,

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:

 

with(Physics);

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,

Age

 

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.

 

Cheers

NOh

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

(1)

Comm(0);

1

(2)

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

0

(3)

``

 

Download MWE.mwMWE.mw

Kronecker Delta in a Sum....

September 29 2014 H-R 85

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

add(add(add(f(k1,k2,k3),k1=range1),k2=range2),k3=range3);

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

int(f(seq(k[i],i=1..m)),[seq(k[i]=range[i],i=1..m)]);

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.

sum_cannot_return_symbolic_summation.mw

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.

Cheers,

Sören

restart

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

(1)

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

 

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

 

Download fourier_subs.mw

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)?

Thanks,

Mac Dude.

 

Hi,

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).

 

Thanks

Hi,

I have

Let

A:= sum(a[n]*phi(n)+b[n+1]*phi(n+2),n=0..N);

Please, I need to write this sum, using only phi(n), how can I use maple to get the solution.

Thank you very much for any idea.

 

 

 

 

 

 

 

f:=C->sum(x[cat(new,c)],c=1..C);

f(4) # does not give me what i want , which is

x[cat(new,1)]+x[cat(new,2)]+x[cat(new,3)]+x[cat(new,4)];

 

seq(x[cat(new,c)],c=1..4);
convert([%],`+`);

This works. But it's just a simple example to illustrate my problem.

 

Is there a way to fix this 'cat' problem in the procedure 'f'?

 

Thanks,

 

casper

restart:with(plots):

h3:=((1+lambda*m*x/a0+phi*((4/Pi*sum((-1)^(n+1)/(2*n-1)*cos(2*Pi*(2*n-1)*x),n=1..infinity)))));

q:=Q-1:

f:=sin(alpha)/E;

DP3:=Int(f-((q*(k+1)*(k+2))/((1-tau)^(k+1)*((h3^(k+2)))*(k+1+tau)))^(1/k),x=0..1);

E:=0.2:phi:=0.2:alpha:=0.1:k:=1:lambda:=0.1:a0:=0.5:m:=0.1:tau:=0.1:

plot((DP3),Q=0..1,axes=box,linestyle=1,color=[red]);

I am unable to plot DP3 vs Q, not only it take very long time but didn't give any output.

Please have a look.

 

Cheers!

 

 Calculus problem S(n)=1^2+3^2+5^2+...+(2n-1)^2 ?

Hello,

restart:

N := N0-(1/2)*sqrt(2)*sqrt(Pi*Kc/d)*(sum(erfc((1/2)*(L*n+x)/sqrt(d*t))+erfc((1/2)*((n+1)*L-x)/sqrt(d*t)),

n = 0 .. infinity));

N0:=0.2:L:=0.25:Kc:=2*10^(-12):t:=360000:d:=2.010619298*10^(-10):

When I plot N vs x = 0..0.25 then there is no issue

plot(N,x=0..0.25,axes=box);

but when try to use a loop to get the data, Maple cannot evaluate

for x from 0 to 0.25 by 0.01 do

N[x]:=evalf(N0-sqrt(Pi*Kc/(2*d))*sum(((((erfc((n*L+x)/(2*sqrt(d*t))))+erfc(((n+1)*L-x)/(2*sqrt(d*t))))),n=0..infinity)));
end do;

Thanks

  

Cumulative list...

January 11 2014 erik10 341

Dear Maple users

My question is probably simple, but I can't seem to figure out how to do it in a smart way way without using procedures: My task is to create a cumulative list from a list. Ex: From [3,-2,5,1,10,7] I want to create the list [3,1,6,7,17,24]. Every entrance in the new list is the sum of the previous ones including the actual entrance. The Statistics package contain a command named CumulativeSum, but unfortunately a list is not returned ... I hope someone can help doing it is a simple way.

Regards,

Erik

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