emendes

395 Reputation

6 Badges

7 years, 35 days

MaplePrimes Activity


These are questions asked by emendes

Hello

I have lots of lists of indexed variables (I am not sure if that is the correct name for it. Please correct me if it is not).  One example is (length of the list can change as well as the indices of the variables):

ans1 := [alpha[3, 7], alpha[3, 8], alpha[3, 9]]

and I need to retrieve two lists from it:  1) [3,3,3] and 2) [7,8,9].  I could not figure out how to do it.

Many thanks.

Ed

Hello

I have used Groebner[UnivariatePolynomial] extensively on my procedures and I wonder whether there is an improvement in speed and memory use in Maple 2020 in relation to the version I am currently using, that is, Maple 2017.  

Many thanks.

Ed

Hello (again)

I thought I won't need help with that type of question but I came across an example that says otherwise.  Here it is

vars:=[x,y,z];

model7 := [x*(-RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)-5/4)+y*alpha[1, 2]-33/(32*RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)), x*z*alpha[2, 6]+y*RootOf(64*_Z^3+80*_Z^2+1104*_Z+561), x^2*(17*RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)+17)/(alpha[1, 2]*alpha[2, 6])-17*x*y/alpha[2, 6]+2*z*x-z-(163/32+RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)^2+5*RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)*(1/4))/(alpha[1, 2]*alpha[2, 6])]

then I issued the command 

map(w->coeffs(w,vars),model7);

to get 

 

[-33/(32*RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)), -RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)-5/4, alpha[1, 2], RootOf(64*_Z^3+80*_Z^2+1104*_Z+561), alpha[2, 6], -(163/32+RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)^2+5*RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)*(1/4))/(alpha[1, 2]*alpha[2, 6]), -1, (17*RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)+17)/(alpha[1, 2]*alpha[2, 6]), -17/alpha[2, 6], 2]

clearly the order does not follow model7's.  

I have also tried

[seq(coeffs(expand(model7[i]), indets(model7[i], suffixed({vars[]}))),i=1..nops(model7))];

Is there a solution to it?

Many thanks (again)

 

Ed

 

 

Hello

I have the following set of coefficients 

coef7 := [-1, 2, alpha[1, 2], alpha[2, 6], (17*RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)+17)/(alpha[1, 2]*alpha[2, 6]), -17/alpha[2, 6], -33/(32*RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)), -(163/32+RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)^2+5*RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)*(1/4))/(alpha[1, 2]*alpha[2, 6]), -RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)-5/4, RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)]

 

Considering that alpha[1,2] and alpha[2,6] are always real, how can I extract only the real solution from coef7?  

Many thanks.

 

Ed

Hello

I need to count and separate the nonlinear terms in a list.  Example:

w:=[[z, y, x, 1], [x*z, x*y, y, 1], [x*z, z, x*y]];

there are 4 nonlinear terms, x*z, x*y, x*z, and x*y.  

The terms can be any combination of the given variables, that is, x, y, and z.  

My solution to the problem of counting the nonlinear terms is 

aux1:=[seq([seq(nops(w[j,i]),i=1..nops(w[j]))],j=1..nops(w))];

aux2:=[seq(selectremove(x->x>1,aux1[i])[1],i=1..nops(aux1))]

res:=convert([seq(convert(nops(aux2[i]),`+`),i=1..nops(aux2))],`+`);

It works but I wonder whether there is a better solution that includes showing the nonlinear terms themselves.

Many thanks

Ed

5 6 7 8 9 10 11 Page 7 of 13