Rio

15 Reputation

3 Badges

1 years, 278 days

MaplePrimes Activity


These are questions asked by Rio

Hello, I am trying to evaluate this summation, but it keeps giving me a "Error, (in H) bad index into Vector", I can`t find the problem in function, would somebody helps? thanks.

My function:

with(linalg); H := proc (z, aa, AA, bb, BB, m, n, p, q) mu0 := sum('BB'[i], i = 1 .. q)-(sum('AA'[i], i = 1 .. p)); beta0 := (product('AA'[i]^(-'AA'[i]), i = 1 .. p))*(product('BB'[i]^(-'BB'[i]), i = 1 .. q)); if z <> 0 and 0 < mu0 or 0 < abs(z) and abs(z) < 1/beta0 and mu0 = 0 then do s := Vector([seq(-('bb'[i]-v)/'BB'[i], i = 1 .. m)]); Hz := sum(sum((product(('`if`')(i <> h, GAMMA('bb'[i]+'BB'[i]*'s[h]'), 1), i = 1 .. m))*(product(('`if`')(i <> h, GAMMA(1-'aa'[i]-'AA'[i]*'s[h]'), 1), i = 1 .. n))*(-1)^v*z^(('bb[h]'+v)/'BB[h]')/(('`if`')(m < q, product(('`if`')(i <> h, GAMMA(1-'bb'[i]-'BB'[i]*'s[h]'), 1), i = m+1 .. q), 1)*`if`(n < p, product(('`if`')(i <> h, GAMMA('aa'[i]+'AA'[i]*'s[h]'), i = n+1 .. p), 1), 1)*factorial(v)*'BB[h]'), h = 1 .. m), v = 0 .. 10) end do end if; return Hz end proc

>evalf(H(.547, Vector([-23-j]), Vector([.5]), Vector([0, -24-j]), Vector([1, .5]), 1, 1, 1, 2))

Hello, I have the following (nested) summation:

add(binomial(196, j)*0.5^(32.1+j)*add(binomial(109, l)*(-1)^(j+l)*add(0.5^(3.1*h)*GAMMA(-4.1+h)*GAMMA(9.3170731707317073170731707317073170731707317073170+.24390243902439024390243902439024390243902439024390*l+.24390243902439024390243902439024390243902439024390*j+.75609756097560975609756097560975609756097560975610*h)/(factorial(h)*(10.354838709677419354838709677419354838709677419355+.32258064516129032258064516129032258064516129032258*j+h)*GAMMA(.24390243902439024390243902439024390243902439024390*j+.24390243902439024390243902439024390243902439024390*l+15.417073170731707317073170731707317073170731707317+.75609756097560975609756097560975609756097560975610*h)), h = 0 .. infinity), l = 0 .. 109), j = 0 .. 196)

 

But it takes ages to sum h up to 80, for example. I was wondering whether we could improve to gain time. any ideas?

Hello,

I noted that add and 'add' can give different result, can somebody help me understand it?  Consider the code below:

>phi1 := GAMMA(-(1/2)*vst-8.333500000-(1/2)*r)*GAMMA((1/2)*vst+21/2+(1/2)*r); phi2 := GAMMA(16.66700000+r-2*vst)*GAMMA(2.166500000+vst); xi1 := -vst; xi2 := 16.66700000+r-2*vst; z := 37.52950222; K := 9.846618489*10^(-38)*33.330^(.5000000000*r+10.)

### Then I have the following sums (they were supposed to give the same results):

>f := unapply(K*add(phi1*(-1)^vst*z^(-xi1)/factorial(vst)+phi2*(-1)^vst*z^(-xi2)/(.5*factorial(vst)), vst = 0 .. 10000), r):

>g := unapply(K*'add'(phi1*(-1)^vst*z^(-xi1)/factorial(vst)+phi2*(-1)^vst*z^(-xi2)/(.5*factorial(vst)), vst = 0 .. upto), [r, upto]);


# I am interested in the following quantities:

>evalf(f(1)/f(0));

-6.265883733

>evalf(g(1,10000)/g(0,10000))

25.80438437

That seems very strange to me, why maple gives different results?

Page 1 of 1