Question: Infinity limit of expression with summations?

I want to compute the limit for a parameter (gamma) to infinity of an expression which includes summations over indexes. Below are two approaches. I believe that both should produce the same output, however:

  1. Approach A generates a signum, but I don't understand where this is coming from
  2. Approach B works smoothly once I fix the final value n of the index to some number but runs very slow if I leave n undefined (I had to interrupt the execution)

Maybe approach B is not wrong, and I just need to wait longer...

Any thoughts? 

Approach A: Compute infinity limit while keeping X and lambda undefined (since they are independent of gamma, see below), then define X and lambda
 

problem: what generates signum?

restart;

local gamma;

gamma

(1)

assume(0 < gamma, 0 < n, 0 < w, 0 < Delta, 0 < vo[i], -1 < rho and rho < 1, 0 < sigma__v, 0 < sigma__d, 0 < sigma__dr, delta[i]::real, delta[j]::real, delta[k]::real, delta__r::real, X[i]::real, X[j]::real, X__r::real);
interface(showassumed=0);

1

(2)

W:=sum(X[i]*(-lambda*X[i]-lambda*delta[i]-vo[i]),i=1..n)+X__r*(-lambda__r*X__r-lambda__r*delta__r-w*sum(vo[i],i=1..n))+sum((X[i]+w*X__r)*(vo[i]+(1/(w*n))*(Delta)),i=1..n)-gamma/2*sigma__v^2*(1-(1+rho*(n-1))/(n))*sum((X[i]+w*X__r)^2,i=1..n)-gamma/2*sigma__v^2*(rho-(1+rho*(n-1))/(n))*sum(sum((X[i]+w*X__r)*(X[j]+w*X__r),j=1..i-1)+sum((X[i]+w*X__r)*(X[j]+w*X__r),j=i+1..n),i=1..n);
 

sum(X[i]*(-lambda*X[i]-lambda*delta[i]-vo[i]), i = 1 .. n)+X__r*(-lambda__r*X__r-lambda__r*delta__r-w*(sum(vo[i], i = 1 .. n)))+Delta*X__r+sum(Delta*X[i]/(w*n)+vo[i]*X__r*w+X[i]*vo[i], i = 1 .. n)-(1/2)*gamma*sigma__v^2*(1-(1+rho*(n-1))/n)*(n*X__r^2*w^2+sum(2*X__r*w*X[i]+X[i]^2, i = 1 .. n))-(1/2)*gamma*sigma__v^2*(rho-(1+rho*(n-1))/n)*(n^2*X__r^2*w^2-n*X__r^2*w^2+sum(sum(X__r*w*X[j]+X[i]*X[j], j = i+1 .. n)+sum(X__r*w*X[j]+X[i]*X[j], j = 1 .. i-1)+X__r*w*X[i]*n-X__r*w*X[i], i = 1 .. n))

(3)

limit(W,gamma=infinity);

-signum(-(sum(sum(X[j]*(X__r*w+X[i]), j = i+1 .. n)+sum(X[j]*(X__r*w+X[i]), j = 1 .. i-1)+X__r*w*(n-1)*X[i], i = 1 .. n))+(n-1)*(sum(X[i]*(2*X__r*w+X[i]), i = 1 .. n)))*infinity

(4)

#convert(%, piecewise);

Approach B: Define X and lambda first, then compute infinity limit

problem: why last execution so slow?

restart;

local gamma;

gamma

(5)

assume(0 < gamma, 0 < n, 0 < w, 0 < Delta, 0 < vo[i], -1 < rho and rho < 1, 0 < sigma__v, 0 < sigma__d, 0 < sigma__dr, delta[i]::real, delta[j]::real, delta[k]::real, delta__r::real, X[i]::real, X[j]::real, X__r::real);
interface(showassumed=0);

1

(6)

X[i] := (1/(2*n*w))*sqrt((4*n-3)/(1+rho*(n-1)))*(sigma__d/sigma__v)*Delta-(1/(2*n))*delta[i]-(1/(2*n))*(sum(delta[j],j=1..i-1)+sum(delta[j],j=i+1..n));
X[j] := (1/(2*n*w))*sqrt((4*n-3)/(1+rho*(n-1)))*(sigma__d/sigma__v)*Delta-(1/(2*n))*delta[j]-(1/(2*n))*(sum(delta[k],k=1..j-1)+sum(delta[k],k=j+1..n));
X__r := (1/(2*w*sqrt(n*(1+rho*(n-1)))))*(sigma__dr/sigma__v)*Delta-(1/2)*delta__r;

lambda := sqrt((1+rho*(n-1))/(4*n-3))*(sigma__v/sigma__d);
lambda__r := w*sqrt(n*(1+rho*(n-1)))*(sigma__v/sigma__dr);
 

(1/2)*((4*n-3)/(1+rho*(n-1)))^(1/2)*sigma__d*Delta/(n*w*sigma__v)-(1/2)*delta[i]/n-(1/2)*(sum(delta[j], j = 1 .. i-1)+sum(delta[j], j = i+1 .. n))/n

 

(1/2)*((4*n-3)/(1+rho*(n-1)))^(1/2)*sigma__d*Delta/(n*w*sigma__v)-(1/2)*delta[j]/n-(1/2)*(sum(delta[k], k = 1 .. j-1)+sum(delta[k], k = j+1 .. n))/n

 

(1/2)*sigma__dr*Delta/(w*(n*(1+rho*(n-1)))^(1/2)*sigma__v)-(1/2)*delta__r

 

((1+rho*(n-1))/(4*n-3))^(1/2)*sigma__v/sigma__d

 

w*(n*(1+rho*(n-1)))^(1/2)*sigma__v/sigma__dr

(7)

W:=sum(X[i]*(-lambda*X[i]-lambda*delta[i]-vo[i]),i=1..n)+X__r*(-lambda__r*X__r-lambda__r*delta__r-w*sum(vo[i],i=1..n))+sum((X[i]+w*X__r)*(vo[i]+(1/(w*n))*(Delta)),i=1..n)-gamma/2*sigma__v^2*(1-(1+rho*(n-1))/(n))*sum((X[i]+w*X__r)^2,i=1..n)-gamma/2*sigma__v^2*(rho-(1+rho*(n-1))/(n))*sum(sum((X[i]+w*X__r)*(X[j]+w*X__r),j=1..i-1)+sum((X[i]+w*X__r)*(X[j]+w*X__r),j=i+1..n),i=1..n):
 

W limit for n=3

Winf := collect(expand(simplify(limit(eval(W,n=3),gamma=infinity))),[Delta,Delta^2]):

quad_term := collect(expand(simplify(coeff(Winf,Delta^2))),[sigma__d,sigma__dr]);
linear_term := expand(simplify(coeff(Winf,Delta)));
coeff_term := collect(expand(simplify(eval(Winf,Delta=0))),delta__r^2);

(-(1/4)/(sigma__v*(1+2*rho)^(1/2)*w^2)+(1/2)*(1/(1+2*rho))^(1/2)/(w^2*sigma__v))*sigma__d+(1/12)*3^(1/2)*sigma__dr/((1+2*rho)^(1/2)*sigma__v*w)

 

-(1/2)*delta__r-(1/6)*delta[1]/w-(1/6)*delta[2]/w-(1/6)*delta[3]/w

 

((1/4)*3^(1/2)*sigma__v*w/((1+2*rho)^(1/2)*sigma__dr)+(1/2)*3^(1/2)*sigma__v*w*rho/((1+2*rho)^(1/2)*sigma__dr))*delta__r^2+(1/36)*sigma__v*delta[1]^2/((1+2*rho)^(1/2)*sigma__d)+(1/36)*sigma__v*delta[2]^2/((1+2*rho)^(1/2)*sigma__d)+(1/36)*sigma__v*delta[3]^2/((1+2*rho)^(1/2)*sigma__d)+(1/18)*sigma__v*delta[1]^2*rho/((1+2*rho)^(1/2)*sigma__d)+(1/18)*sigma__v*delta[2]^2*rho/((1+2*rho)^(1/2)*sigma__d)+(1/18)*sigma__v*delta[3]^2*rho/((1+2*rho)^(1/2)*sigma__d)+(1/18)*sigma__v*delta[2]*delta[1]/((1+2*rho)^(1/2)*sigma__d)+(1/18)*sigma__v*delta[1]*delta[3]/((1+2*rho)^(1/2)*sigma__d)+(1/18)*sigma__v*delta[2]*delta[3]/((1+2*rho)^(1/2)*sigma__d)+(1/9)*sigma__v*delta[2]*delta[1]*rho/((1+2*rho)^(1/2)*sigma__d)+(1/9)*sigma__v*delta[1]*delta[3]*rho/((1+2*rho)^(1/2)*sigma__d)+(1/9)*sigma__v*delta[2]*delta[3]*rho/((1+2*rho)^(1/2)*sigma__d)

(8)

W limit for generic n

Winf := collect(expand(simplify(limit(W,gamma=infinity))),[Delta,Delta^2]):

quad_term := collect(expand(simplify(coeff(Winf,Delta^2))),[sigma__d,sigma__dr]);
linear_term := expand(simplify(coeff(Winf,Delta)));
coeff_term := collect(expand(simplify(eval(Winf,Delta=0))),delta__r^2);

 

NULL

Download Infinity_limit_and_summations.mw

Please Wait...