Items tagged with sum

I really want to use if condition inside of eval and sum, example as below:

sum(eval(y=x^(j),(if j=1 then x=2 else x=3 fi)),j=1..2)

The reason is: the value of x to be evaluated depends on the value of j which differs inside of the sum (in the context of B-spline functions).

Any lights? Thanks,

any idea for my problem?

 

> k1 := sum(X[h, t], t = 1 .. 23) >= 9;
9 <= X[h, 1] + X[h, 2] + X[h, 3] + X[h, 4] + X[h, 5] + X[h, 6]

   + X[h, 7] + X[h, 8] + X[h, 9] + X[h, 10] + X[h, 11] + X[h, 12]

   + X[h, 13] + X[h, 14] + X[h, 15] + X[h, 16] + X[h, 17]

   + X[h, 18] + X[h, 19] + X[h, 20] + X[h, 21] + X[h, 22]

   + X[h, 23], h = 1 .. 6

why 'h' still 'h'. from my textbooks the formula must be like this :
 

i want to solve the system of equation ( 1 )  , (2)  ,  (3)   under the assumation that x , y have the CDF in (4)  ,  (5)
 

diff(L(lambda[1], lambda[2], alpha), lambda[1]) = n/lambda[1]+sum(x[i], i = 1 .. n)-(sum(2*x[i]*exp(lambda[1])/(exp(x__i*`&lambda;__1`)-1+alpha), i = 1 .. n))

diff(L(lambda[1], lambda[2], alpha), lambda[1]) = n/lambda[1]+sum(x[i], i = 1 .. n)-(sum(2*x[i]*exp(lambda[1])/(exp(x__i*`&lambda;__1`)-1+alpha), i = 1 .. n))

(1)

diff(L(lambda[1], lambda[2], alpha), lambda[2]) = m/lambda[2]+sum(y[j], j = 1 .. m)-(sum(2*y[j]*exp(lambda[2])/(exp(y__j*`&lambda;__2`)-1+alpha), j = 1 .. m))

diff(L(lambda[1], lambda[2], alpha), lambda[2]) = m/lambda[2]+sum(y[j], j = 1 .. m)-(sum(2*y[j]*exp(lambda[2])/(exp(y__j*`&lambda;__2`)-1+alpha), j = 1 .. m))

(2)

diff(L(lambda[1], lambda[2], alpha), alpha) = (n+m)/alpha-(sum(2/(exp(x[i]*`&lambda;__1`)-1+alpha), i = 1 .. n))-(sum(2/(exp(y[j]*`&lambda;__2`)-1+alpha), j = 1 .. m))

diff(L(lambda[1], lambda[2], alpha), alpha) = (n+m)/alpha-(sum(2/(exp(x[i]*`&lambda;__1`)-1+alpha), i = 1 .. n))-(sum(2/(exp(y[j]*`&lambda;__2`)-1+alpha), j = 1 .. m))

(3)

G(x, lambda[1], alpha) = 1-alpha/(exp(lambda[1]*x)-1+alpha)

G(x, lambda[1], alpha) = 1-alpha/(exp(lambda[1]*x)-1+alpha)

(4)

G(y, lambda[2], alpha) = 1-alpha/(exp(lambda[2]*x)-1+alpha)

G(y, lambda[2], alpha) = 1-alpha/(exp(lambda[2]*x)-1+alpha)

(5)

``

``


 

Download internet.mw

Here is a problem from SEEMOUS 2017 (South Eastern European Mathematical Olympiad for University Students)
which Maple can solve (with a little help).

For k a fixed nonnegative integer, compute:

Sum( binomial(i,k) * ( exp(1) - Sum(1/j!, j=0..i) ), i=k..infinity );

(It is the last one, theoretically the most difficult.)

I have the following function which came from a collaborator of a collaborator. It computes a generating function for a family of function's we're using.

GF_Generate := proc (n) 
	local summand, i, j;
	summand := U[0]^x[0]*mul(U[i]^y[i], i = 1 .. n)*mul(binomial(x[0]+add(w[j], j = 1 .. i), y[i])*p^y[i]*(1-p)^(x[0]+add(w[j], j = 1 .. i)-y[i])*binomial(x[0]-1+add(w[j], j = 1 .. i), x[0]-1+add(w[j], j = 1 .. i-1))*v[i]^(x[0]+add(w[j], j = 1 .. i-1))*(1-v[i])^w[i], i = 1 .. n);

	for j from n by -1 to 1 do summand := normal(sum(summand, y[j] = 0 .. infinity)) end do;
	for j from n by -1 to 1 do summand := normal(sum(summand, w[j] = 0 .. infinity)) end do;
	
	sum(summand, x[0] = 0 .. infinity) 
end proc;

For arguments of 2 and 3 it's quick and works fine on Maple18 (tested both GUI and terminal client on OS X), Maple2015 (tested terminal client only on RHEL linux), but generates a "too many levlels of recursion" error in Maple2016 (tested terminal client only on RHEL linux; same server as Maple2015 was tested). It's slow for arguments of 4 and above (45 minutes for n=4 on my mac laptop), so I haven't tested it thoroughly with larger arguments.

Any idea why this code fails in Maple 2016?

 

Hi Dears,

I'm have a code like this:

sum(-GAMMA(k+1, x), k = 0 .. -2) and Maple give me : Ei(1, x).

How to check that answer is correct?

 

Thank you in advance.

I am looking forward to hearing from you.

Can somebody please expand the following double sum to produce a list of sequences?

(Sum(f[i], i = 0 .. 1))*(Sum(g[i, j, k], j = 0 .. 1)) for k = {1,2}

I need to make sure the operation order is correct, so I would like to verify my workings.

Thanks!

Hello.

I have a Pde solution in from of the sum.

pde := diff(u(x, t), t) = diff(u(x, t), x$2)

symbolic := pdsolve([pde, u(x, 0) = 1, u(0, t) = 0, u(1, t) = 0])

symbolic := u(x, t) = Sum(-(2*((-1)^_Z9-1))*sin(_Z9*Pi*x)*exp(-Pi^2*_Z9^2*t)/(Pi*_Z9), _Z9 = 1 .. infinity)

 

I tried a subs or eval command dosen't work.

 

Thanks.

pdex1.mw
 

restart

pde := diff(u(x, t), t) = diff(u(x, t), `$`(x, 2)):

ics := [u(x, 0) = 1, u(0, t) = 0, u(1, t) = 0]:

pds := pdsolve(pde, ics, numeric, time = t, range = 0 .. 1, spacestep = 1/4024, timestep = 1/4024):

symbolic := pdsolve([pde, u(x, 0) = 1, u(0, t) = 0, u(1, t) = 0])

u(x, t) = Sum(-2*((-1)^_Z9-1)*sin(_Z9*Pi*x)*exp(-Pi^2*_Z9^2*t)/(Pi*_Z9), _Z9 = 1 .. infinity)

(1)

eval(rhs(symbolic), `~`[_Z9] = n)

Sum(-2*((-1)^_Z9-1)*sin(_Z9*Pi*x)*exp(-Pi^2*_Z9^2*t)/(Pi*_Z9), _Z9 = 1 .. infinity)

(2)

subs(`~`[_Z9] = n, rhs(symbolic))

Sum(-2*((-1)^_Z9-1)*sin(_Z9*Pi*x)*exp(-Pi^2*_Z9^2*t)/(Pi*_Z9), _Z9 = 1 .. infinity)

(3)

subs[eval](`~`[_Z9] = n, rhs(symbolic))

Sum(-2*((-1)^_Z9-1)*sin(_Z9*Pi*x)*exp(-Pi^2*_Z9^2*t)/(Pi*_Z9), _Z9 = 1 .. infinity)

(4)

``


 

Download pdex1.mw

 

I am having issues with Maple 2016 computing closed form solutions using the sum command. For example, sum((-1)^n, n = 1 .. infinity) evaluates to -1/2 in the help topic, however, when I run the command in a maple document, this result is not obtained. It instead returns sum((-1)^n, n = 1 .. infinity). Likewise, sum( a*r^k, k = 0..infinity) doesn't evaluate to -a/(r-1). How can I get Maple to determine closed form solutions for power series?

i wrote this problem to solve 

Delta= Sum(j=1 to n)SUM(i=j to n)(pi*hj/Ad(t,ij)*Et,ij))

Where n=70,  G= ftj (t)/(4+0.85*t) , where (t =8, 16, 24,…….up to 8*n), hj= 13 for all j except j1 =18

Ad= (Aj+s(mij-1)), where Aj varies

Mij=ES/E(G),          where E(G)= 57sqrt(1000*G)

 

n := 70;

70

(1)

i := seq(1 .. n, 1);

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70

(2)

t := proc (i) options operator, arrow; 8*i end proc;

proc (i) options operator, arrow; 8*i end proc

(3)

j := i;

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70

(4)

F = f(j);

F = f(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70)

(5)

F(1 .. 30) := 8;

8

(6)

F(31 .. 40) := 7;

7

(7)

F(41 .. 70) := 6;

6

(8)

G := proc (F, i) options operator, arrow; F*t/(4+.85*t) end proc;

proc (F, i) options operator, arrow; F*t/(4+.85*t) end proc

(9)

A := f(j);

f(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70)

(10)

A(1 .. 30) := 5184;

5184

(11)

A(31 .. 50) := 3600;

3600

(12)

A(51 .. 62) := 1936;

1936

(13)

A(63 .. 70) := 1024;

1024

(14)

s := f(j);

proc () option remember; table( [( 31 .. 50 ) = 3600, ( 63 .. 70 ) = 1024, ( 1 .. 30 ) = 5184, ( 51 .. 62 ) = 1936, ( 31 .. 40 ) = 3600 ] ) 'procname(args)' end proc

(15)

s(1 .. 10) := 128.0448;

128.0448

(16)

s(11 .. 20) := 63.763;

63.763

(17)

s(21 .. 30) := 79.92;

79.92

(18)

s(31 .. 40) := 64.08;

64.08

(19)

s(41 .. 50) := 47.88:

s(51 .. 62) := 31.944;

31.944

(20)

s(63 .. 70) := 12.49;

12.49

(21)

E := proc (G) options operator, arrow; 57*sqrt(1000*F) end proc;

proc (G) options operator, arrow; 57*sqrt(1000*F) end proc

(22)

Es := 29000;

29000

(23)

m := proc (E) options operator, arrow; Es/E(G) end proc;

proc (E) options operator, arrow; Es/E(G) end proc

(24)

Ad := proc (j, m) options operator, arrow; A+s*(m(E)-1) end proc;

proc (j, m) options operator, arrow; A+s*(m(E)-1) end proc

(25)

P := f(j);

proc () option remember; table( [( 21 .. 30 ) = 79.92, ( 31 .. 50 ) = 3600, ( 41 .. 50 ) = 47.88, ( 63 .. 70 ) = 12.49, ( 1 .. 30 ) = 5184, ( 51 .. 62 ) = 31.944, ( 11 .. 20 ) = 63.763, ( 31 .. 40 ) = 64.08, ( 1 .. 10 ) = 128.0448 ] ) 'procname(args)' end proc

(26)

P(1 .. 68) := 254.7;

254.7

(27)

P(69 .. 70) := 196.8;

196.8

(28)

h := f(j);

proc () option remember; table( [( 21 .. 30 ) = 79.92, ( 31 .. 50 ) = 3600, ( 41 .. 50 ) = 47.88, ( 63 .. 70 ) = 12.49, ( 1 .. 30 ) = 5184, ( 51 .. 62 ) = 31.944, ( 11 .. 20 ) = 63.763, ( 31 .. 40 ) = 64.08, ( 1 .. 10 ) = 128.0448 ] ) 'procname(args)' end proc

(29)

h(1) := 18;

18

(30)

h(2 .. 70) = 13;

h(2 .. 70) = 13

(31)

delta := sum(sum((P.h)/(E(G)*Ad)), i = 1 .. n, j = i)

Error, invalid input: sum uses a 2nd argument, k, which is missing

 

``


 

Download short.mw

f=sum((2*q*cos(2* i*x)*(-1)^(i)*(-1)^((2*i-1)))/(i*Pi),i=1.3.5...35)

I want to write this series but getting error

the result is

2*q*cos(2*x)/Pi-2*cos(6*x)*q/(3*Pi)+2*q*cos(10*x)/(5*Pi)-2*q*cos(14*x)/(7*Pi)+2*q*cos(18*x)/(9*Pi)-2*q*cos(22*x)/(11*Pi)+2*q*cos(26*x)/(13*Pi)-2*q*cos(30*x)/(15*Pi)+2*q*cos(34*x)/(17*Pi)-2*q*cos(38*x)/(19*Pi)+2*q*cos(42*x)/(21*Pi)-2*q*cos(46*x)/(23*Pi)+2*q*cos(50*x)/(25*Pi)-2*q*cos(54*x)/(27*Pi)+2*q*cos(58*x)/(29*Pi)-2*q*cos(62*x)/(31*Pi)+2*q*cos(66*x)/(33*Pi)-2*q*cos(70*x)/(35*Pi)

can anybody help 

Hello, I need help in add/sum, there are two problems:

 

1. How we write triple summation (sigma) in Maple? (See pic)

Pic 1 (Triple Sigma)

I try sum(sum(sum or add(add(add but it isn't working.

 

 

2. How we write summation like in this pic?

Pic 2

I already try these syntax:

for e from 1 to 9 do

for k from 1 to 17 do

if i=(2*e-1) then next else

constraint12[2*e-1,k]:=add(x[2*e-1,i,k],i from i in T)=1

end if

end do

end do

 

For example, the expected result for e=2 and k=1 is like following equation:

x[2,1,1]+x[2,3,1]+x[2,4,1]+x[2,5,1]+...+x[2,17,1]+x[2,18,1]=1

But the result I get:

x[2,1,1]+x[2,2,1]+x[2,3,1]+...+x[2,18,1]=1

 

How to omit the x[2,2,1]?

 

Thank you.

Hi! I'm trying to find the way to plot the solution with series representation. I need some help to find the easiest way.

Note: I realized some typing errors, which do not change the question a lot ,and I corrected them.

plot.mw

 

 

 

 

Can we calculate the following equations in Maple?

Substituting equations (21) and (22) into (17), and then obtain equation (23). How to do that? I have done this, but the results are complex and large. They are not in a sum form, but in an expansion form. The reference and the maple file are attached.

Hope for your help.

Best wishes,

Kang

Dynamic_buckling_of_thin_isotropic_plates_subjected_to_in-plane_impact.pdf

gg.mw

Hello,how can i find the lambda in this equation? and x=0..2 , t=0..2

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