MaPal93

170 Reputation

5 Badges

2 years, 94 days

MaplePrimes Activity


These are questions asked by MaPal93

I have a 2-parameters quartic equation in n (where n>=2 and integer) and want to find for which parameter values it is zero, if any exists.

Here I am analyzing the signs of each coefficient, but is there a faster way to solve my problem?
Thanks.

quartic_equation_in_n.mw

I want to solve n nonlinear equations in n unknowns named lambda[1], lambda[2], ..., lambda[n]. For simplicity, I assume n=3. Each of the three equations includes matrices and dot products.

Running solve() takes forever...I assume this is because Maple is trying to find the explicit form. I am not sure, but I have reasons to believe that a solution exists.

Questions:

  1. Did I set up the three equations correctly? Is there a simpler or smarter way to set up my problem?
  2. Is it okay for Maple that lambda[i] sometimes appears isolated and sometimes as a component of a vector?  
  3. Is there a way to keep my quantities (except the lambda vector I guess, since it containts the lambda[i] component I need to solve for) undefined/implicit while making sure Maple correctly deals with matrices and dot products?
    e.g., the solution should display terms like p^%T.R.w as such, rather than the corresponding explicit computation...

Worksheet:

restart;

S:=Matrix([[Sigma[1,1],Sigma[1,2],Sigma[1,3]],[Sigma[2,1],Sigma[2,2],Sigma[2,3]],[Sigma[3,1],Sigma[3,2],Sigma[3,3]]]):

w:=Vector(3,symbol=omega):

r:=Vector([sqrt(S[1,1]/(w^%T.S.w)),sqrt(S[2,2]/(w^%T.S.w)),sqrt(S[3,3]/(w^%T.S.w))]):

R:=Matrix([[r[1],0,0],[0,r[2],0],[0,0,r[3]]]):

p:=Vector(3,symbol=rho):

l:=Vector(3,symbol=lambda):

e[1]:=Vector([1,0,0]):
e[2]:=Vector([0,1,0]):
e[3]:=Vector([0,0,1]):

f:=x->x^2:
w__sq:=f~(w):
l__sq:=f~(l):

 

eq1:='(w[1]*((p^%T.R.w)/(2*(l^%T.w__sq)))*(w^%T.S.e[1]))/(w[1]^2*((p^%T.R.w)^2/(4*(l^%T.w__sq)^2))*(w^%T.S.w)+sigma__delta^2*(w[1]^2*(((l__sq)^%T.w__sq)/(4*(l^%T.w__sq)^2)-lambda[1]/(l^%T.w__sq))+1))';

eq2:='(w[2]*((p^%T.R.w)/(2*(l^%T.w__sq)))*(w^%T.S.e[2]))/(w[2]^2*((p^%T.R.w)^2/(4*(l^%T.w__sq)^2))*(w^%T.S.w)+sigma__delta^2*(w[2]^2*(((l__sq)^%T.w__sq)/(4*(l^%T.w__sq)^2)-lambda[2]/(l^%T.w__sq))+1))';

eq3:='(w[3]*((p^%T.R.w)/(2*(l^%T.w__sq)))*(w^%T.S.e[3]))/(w[3]^2*((p^%T.R.w)^2/(4*(l^%T.w__sq)^2))*(w^%T.S.w)+sigma__delta^2*(w[3]^2*(((l__sq)^%T.w__sq)/(4*(l^%T.w__sq)^2)-lambda[3]/(l^%T.w__sq))+1))';

(1/2)*w[1]*(`.`(p^%T, R, w))*(`.`(w^%T, S, e[1]))/((l^%T.w__sq)*((1/4)*w[1]^2*(`.`(p^%T, R, w))^2*(`.`(w^%T, S, w))/(l^%T.w__sq)^2+sigma__delta^2*(w[1]^2*((1/4)*(l__sq^%T.w__sq)/(l^%T.w__sq)^2-lambda[1]/(l^%T.w__sq))+1)))

 

(1/2)*w[2]*(`.`(p^%T, R, w))*(`.`(w^%T, S, e[2]))/((l^%T.w__sq)*((1/4)*w[2]^2*(`.`(p^%T, R, w))^2*(`.`(w^%T, S, w))/(l^%T.w__sq)^2+sigma__delta^2*(w[2]^2*((1/4)*(l__sq^%T.w__sq)/(l^%T.w__sq)^2-lambda[2]/(l^%T.w__sq))+1)))

 

(1/2)*w[3]*(`.`(p^%T, R, w))*(`.`(w^%T, S, e[3]))/((l^%T.w__sq)*((1/4)*w[3]^2*(`.`(p^%T, R, w))^2*(`.`(w^%T, S, w))/(l^%T.w__sq)^2+sigma__delta^2*(w[3]^2*((1/4)*(l__sq^%T.w__sq)/(l^%T.w__sq)^2-lambda[3]/(l^%T.w__sq))+1)))

(1)

 

solve({eq1-lambda[1],eq2-lambda[2],eq3-lambda[3]},{lambda[1],lambda[2],lambda[3]});

Download dot_products.mw

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

I am trying to compute partial derivatives of some complicated expression which include summations. First, I noticed that sum behaves differently if I use 1D vs. 2D math. Why?

Questions:
  1. Partial derivative of a summation: why is it not just 2*X[i]?
  2. Partial derivative of a double summation: how to define the nested structure of a double summation with j<>i?
  3. System of n+1 equations: how to define and solve for it?

For 3., each i equation is the partial derivative of my complicated expression with summations with respect to X[i], where i ranges from 1 to n. The last equation is the partial derivative with respect to X_r (a fixed variable).

Thanks.

restart

A := sum(X[i]^2, i = 1 .. n); eq[1] := diff(A, X[i]) = 0

sum(X[i]^2, i = 1 .. n)

 

sum(2*X[i], i = 1 .. n) = 0

(1)

B__wrong := sum(sum((X__r*w+X[i])*(X__r*w+X[j]), j = 1 .. n), i = 1 .. n); B__correct := 'sum(sum((X__r*w+X[i])*(X__r*w+X[j]), j = 1 .. n), i = 1 .. n)'

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

 

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

(2)

eqs := seq(eq[i], i = 1 .. n); vars := seq(X[i], i = 1 .. n)

Error, range bounds in seq must be numeric or character

 

Error, range bounds in seq must be numeric or character

 
 

NULL

Download equations_with_summations.mw

Function X__2(y1,y2) is a function of X__1(y1,y2). How do I express (implicitly) d(X__2)/d(y1) and d(X__2)/d(y2) in terms of d(X__1)/d(y1) and d(X__1)/d(y2) and perhaps of X__1 and X__2 themselves?

I illustrate what I mean with an example for X__1(y1,y2), where d(X__1)/d(y1) and d(X__1)/d(y2) are written in a relatively compact form in terms of X__1 itself:
 

restart;

X1 := RootOf((8*y__1^14 + 32*y__1^12*y__2^2 + 48*y__1^10*y__2^4 + 32*y__1^8*y__2^6 + 8*y__1^6*y__2^8 + 16*y__1^12 + 80*y__1^10*y__2^2 + 160*y__1^8*y__2^4 + 160*y__1^6*y__2^6 + 80*y__1^4*y__2^8 + 16*y__1^2*y__2^10)*_Z^10 + (40*y__1^13*y__2^2 + 120*y__1^11*y__2^4 + 120*y__1^9*y__2^6 + 40*y__1^7*y__2^8 + 16*y__1^13 + 176*y__1^11*y__2^2 + 544*y__1^9*y__2^4 + 736*y__1^7*y__2^6 + 464*y__1^5*y__2^8 + 112*y__1^3*y__2^10)*_Z^9 + (84*y__1^12*y__2^4 + 168*y__1^10*y__2^6 + 84*y__1^8*y__2^8 - 20*y__1^14 + 28*y__1^12*y__2^2 + 552*y__1^10*y__2^4 + 1288*y__1^8*y__2^6 + 1132*y__1^6*y__2^8 + 348*y__1^4*y__2^10 - 48*y__1^12 - 192*y__1^10*y__2^2 - 272*y__1^8*y__2^4 - 128*y__1^6*y__2^6 + 48*y__1^4*y__2^8 + 64*y__1^2*y__2^10 + 16*y__2^12)*_Z^8 + (88*y__1^11*y__2^6 + 88*y__1^9*y__2^8 - 80*y__1^13*y__2^2 + 56*y__1^11*y__2^4 + 960*y__1^9*y__2^6 + 1432*y__1^7*y__2^8 + 608*y__1^5*y__2^10 - 48*y__1^13 - 416*y__1^11*y__2^2 - 944*y__1^9*y__2^4 - 736*y__1^7*y__2^6 + 16*y__1^5*y__2^8 + 256*y__1^3*y__2^10 + 80*y__1*y__2^12)*_Z^7 + (40*y__1^10*y__2^8 - 128*y__1^12*y__2^4 + 168*y__1^10*y__2^6 + 928*y__1^8*y__2^8 + 632*y__1^6*y__2^10 + 12*y__1^14 - 192*y__1^12*y__2^2 - 1084*y__1^10*y__2^4 - 1472*y__1^8*y__2^6 - 340*y__1^6*y__2^8 + 432*y__1^4*y__2^10 + 180*y__1^2*y__2^12 + 48*y__1^12 + 144*y__1^10*y__2^2 + 112*y__1^8*y__2^4 - 48*y__1^6*y__2^6 - 96*y__1^4*y__2^8 - 32*y__1^2*y__2^10)*_Z^6 + (-92*y__1^11*y__2^6 + 228*y__1^9*y__2^8 + 368*y__1^7*y__2^10 + 32*y__1^13*y__2^2 - 384*y__1^11*y__2^4 - 1272*y__1^9*y__2^6 - 704*y__1^7*y__2^8 + 376*y__1^5*y__2^10 + 224*y__1^3*y__2^12 + 48*y__1^13 + 304*y__1^11*y__2^2 + 432*y__1^9*y__2^4 + 16*y__1^7*y__2^6 - 288*y__1^5*y__2^8 - 128*y__1^3*y__2^10)*_Z^5 + (-24*y__1^10*y__2^8 + 96*y__1^8*y__2^10 + 24*y__1^12*y__2^4 - 412*y__1^10*y__2^6 - 576*y__1^8*y__2^8 + 164*y__1^6*y__2^10 + 160*y__1^4*y__2^12 + 4*y__1^14 + 172*y__1^12*y__2^2 + 532*y__1^10*y__2^4 + 252*y__1^8*y__2^6 - 328*y__1^6*y__2^8 - 216*y__1^4*y__2^10 - 16*y__1^12 - 32*y__1^10*y__2^2 + 32*y__1^6*y__2^6 + 16*y__1^4*y__2^8)*_Z^4 + (-8*y__1^11*y__2^6 - 192*y__1^9*y__2^8 + 28*y__1^7*y__2^10 + 60*y__1^5*y__2^12 + 16*y__1^13*y__2^2 + 232*y__1^11*y__2^4 + 296*y__1^9*y__2^6 - 168*y__1^7*y__2^8 - 184*y__1^5*y__2^10 - 16*y__1^13 - 64*y__1^11*y__2^2 - 32*y__1^9*y__2^4 + 64*y__1^7*y__2^6 + 48*y__1^5*y__2^8)*_Z^3 + (-15*y__1^10*y__2^8 + 9*y__1^6*y__2^12 + 24*y__1^12*y__2^4 + 116*y__1^10*y__2^6 - 36*y__1^8*y__2^8 - 80*y__1^6*y__2^10 - 4*y__1^14 - 40*y__1^12*y__2^2 - 48*y__1^10*y__2^4 + 40*y__1^8*y__2^6 + 52*y__1^6*y__2^8)*_Z^2 + (12*y__1^11*y__2^6 - 4*y__1^9*y__2^8 - 16*y__1^7*y__2^10 - 8*y__1^13*y__2^2 - 24*y__1^11*y__2^4 + 8*y__1^9*y__2^6 + 24*y__1^7*y__2^8)*_Z - y__1^10*y__2^8 - y__1^8*y__2^10 - 4*y__1^12*y__2^4 + 4*y__1^8*y__2^8):

alias(X__1=X1);

X__2 := -y__1*y__2^2*X__1*(8*X__1^7*y__1^10 + 24*X__1^7*y__1^8*y__2^2 + 24*X__1^7*y__1^6*y__2^4 + 8*X__1^7*y__1^4*y__2^6 + 24*X__1^6*y__1^9*y__2^2 + 48*X__1^6*y__1^7*y__2^4 + 24*X__1^6*y__1^5*y__2^6 + 26*X__1^5*y__1^8*y__2^4 + 26*X__1^5*y__1^6*y__2^6 + 8*X__1^4*y__1^7*y__2^6 + 32*X__1^7*y__1^8 + 128*X__1^7*y__1^6*y__2^2 + 192*X__1^7*y__1^4*y__2^4 + 128*X__1^7*y__1^2*y__2^6 + 32*X__1^7*y__2^8 + 16*X__1^6*y__1^9 + 192*X__1^6*y__1^7*y__2^2 + 480*X__1^6*y__1^5*y__2^4 + 448*X__1^6*y__1^3*y__2^6 + 144*X__1^6*y__1*y__2^8 - 16*X__1^5*y__1^10 + 32*X__1^5*y__1^8*y__2^2 + 392*X__1^5*y__1^6*y__2^4 + 624*X__1^5*y__1^4*y__2^6 + 280*X__1^5*y__1^2*y__2^8 - 36*X__1^4*y__1^9*y__2^2 + 72*X__1^4*y__1^7*y__2^4 + 396*X__1^4*y__1^5*y__2^6 + 288*X__1^4*y__1^3*y__2^8 - 28*X__1^3*y__1^8*y__2^4 + 84*X__1^3*y__1^6*y__2^6 + 156*X__1^3*y__1^4*y__2^8 - 7*X__1^2*y__1^7*y__2^6 + 33*X__1^2*y__1^5*y__2^8 - 64*X__1^5*y__1^8 - 192*X__1^5*y__1^6*y__2^2 - 192*X__1^5*y__1^4*y__2^4 - 64*X__1^5*y__1^2*y__2^6 - 32*X__1^4*y__1^9 - 288*X__1^4*y__1^7*y__2^2 - 480*X__1^4*y__1^5*y__2^4 - 224*X__1^4*y__1^3*y__2^6 + 8*X__1^3*y__1^10 - 88*X__1^3*y__1^8*y__2^2 - 408*X__1^3*y__1^6*y__2^4 - 312*X__1^3*y__1^4*y__2^6 + 12*X__1^2*y__1^9*y__2^2 - 108*X__1^2*y__1^7*y__2^4 - 196*X__1^2*y__1^5*y__2^6 + 4*X__1^2*y__1^3*y__2^8 + 2*X__1*y__1^8*y__2^4 - 46*X__1*y__1^6*y__2^6 + 4*X__1*y__1^4*y__2^8 - y__1^7*y__2^6 + y__1^5*y__2^8 + 32*X__1^3*y__1^8 + 64*X__1^3*y__1^6*y__2^2 + 32*X__1^3*y__1^4*y__2^4 + 16*X__1^2*y__1^9 + 96*X__1^2*y__1^7*y__2^2 + 80*X__1^2*y__1^5*y__2^4 + 32*X__1*y__1^8*y__2^2 + 64*X__1*y__1^6*y__2^4 + 16*y__1^7*y__2^4)/(-8*X__1^7*y__1^11*y__2^2 - 24*X__1^7*y__1^9*y__2^4 - 24*X__1^7*y__1^7*y__2^6 - 8*X__1^7*y__1^5*y__2^8 - 32*X__1^6*y__1^10*y__2^4 - 64*X__1^6*y__1^8*y__2^6 - 32*X__1^6*y__1^6*y__2^8 - 50*X__1^5*y__1^9*y__2^6 - 50*X__1^5*y__1^7*y__2^8 - 28*X__1^4*y__1^8*y__2^8 + 32*X__1^8*y__1^10 + 160*X__1^8*y__1^8*y__2^2 + 320*X__1^8*y__1^6*y__2^4 + 320*X__1^8*y__1^4*y__2^6 + 160*X__1^8*y__1^2*y__2^8 + 32*X__1^8*y__2^10 + 160*X__1^7*y__1^9*y__2^2 + 640*X__1^7*y__1^7*y__2^4 + 960*X__1^7*y__1^5*y__2^6 + 640*X__1^7*y__1^3*y__2^8 + 160*X__1^7*y__1*y__2^10 - 8*X__1^6*y__1^12 - 24*X__1^6*y__1^10*y__2^2 + 328*X__1^6*y__1^8*y__2^4 + 1048*X__1^6*y__1^6*y__2^6 + 1056*X__1^6*y__1^4*y__2^8 + 352*X__1^6*y__1^2*y__2^10 - 24*X__1^5*y__1^11*y__2^2 - 48*X__1^5*y__1^9*y__2^4 + 400*X__1^5*y__1^7*y__2^6 + 848*X__1^5*y__1^5*y__2^8 + 424*X__1^5*y__1^3*y__2^10 - 38*X__1^4*y__1^10*y__2^4 - 54*X__1^4*y__1^8*y__2^6 + 274*X__1^4*y__1^6*y__2^8 + 290*X__1^4*y__1^4*y__2^10 - 44*X__1^3*y__1^9*y__2^6 - 32*X__1^3*y__1^7*y__2^8 + 104*X__1^3*y__1^5*y__2^10 - 27*X__1^2*y__1^8*y__2^8 + 15*X__1^2*y__1^6*y__2^10 - 64*X__1^6*y__1^10 - 256*X__1^6*y__1^8*y__2^2 - 384*X__1^6*y__1^6*y__2^4 - 256*X__1^6*y__1^4*y__2^6 - 64*X__1^6*y__1^2*y__2^8 - 256*X__1^5*y__1^9*y__2^2 - 768*X__1^5*y__1^7*y__2^4 - 768*X__1^5*y__1^5*y__2^6 - 256*X__1^5*y__1^3*y__2^8 + 16*X__1^4*y__1^12 + 32*X__1^4*y__1^10*y__2^2 - 408*X__1^4*y__1^8*y__2^4 - 848*X__1^4*y__1^6*y__2^6 - 424*X__1^4*y__1^4*y__2^8 + 48*X__1^3*y__1^11*y__2^2 + 48*X__1^3*y__1^9*y__2^4 - 352*X__1^3*y__1^7*y__2^6 - 352*X__1^3*y__1^5*y__2^8 + 54*X__1^2*y__1^10*y__2^4 - 150*X__1^2*y__1^6*y__2^8 + 22*X__1*y__1^9*y__2^6 - 30*X__1*y__1^7*y__2^8 - 2*y__1^8*y__2^8 + 32*X__1^4*y__1^10 + 96*X__1^4*y__1^8*y__2^2 + 96*X__1^4*y__1^6*y__2^4 + 32*X__1^4*y__1^4*y__2^6 + 96*X__1^3*y__1^9*y__2^2 + 192*X__1^3*y__1^7*y__2^4 + 96*X__1^3*y__1^5*y__2^6 - 8*X__1^2*y__1^12 - 8*X__1^2*y__1^10*y__2^2 + 104*X__1^2*y__1^8*y__2^4 + 104*X__1^2*y__1^6*y__2^6 - 16*X__1*y__1^11*y__2^2 + 48*X__1*y__1^7*y__2^6 - 8*y__1^10*y__2^4 + 8*y__1^8*y__2^6):


Synthetic representation of derivatives


derivatives for X__1 okay: written in terms of y__1, y__2, and X__1 itself.

derX1_y1 := diff(X1, y__1):
derX1_y2 := diff(X1, y__2):

Diff('X__1(y__1,y__2)', y__1) = collect~(normal(eval(derX1_y1, X1 = 'X__1(y__1,y__2)')), 'X__1(y__1,y__2)');
Diff('X__1(y__1,y__2)', y__2) = collect~(normal(eval(derX1_y2, X1 = 'X__1(y__1,y__2)')), 'X__1(y__1,y__2)');


derivatives for X__2 not okay (X__2 is itself a function of X__1): how do I write them in terms of y__1, y__2, X__1 AND the derivatives for X__1 just found? What's the most compact way to express these two derivatives below?

derX2_y1 := diff(X__2, y__1):
derX2_y2 := diff(X__2, y__2):

Diff('X__2(y__1,y__2)', y__1) = collect~(normal(eval(eval(derX2_y1, derX1_y1='Diff('X__1(y__1,y__2)', y__1)'), X__1 = 'X__1(y__1,y__2)')), 'X__1(y__1,y__2)');
Diff('X__2(y__1,y__2)', y__2) = collect~(normal(eval(derX2_y2, X__1 = 'X__1(y__1,y__2)')), 'X__1(y__1,y__2)');

``

 

Download compact_derivatives.mw


Thank you for the help.

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