MaplePrimes Questions

My program simply keeps hanging.

It takes me 5 days to complete something which should take 2-3 hrs, since Maple keeps hanging, and I have to keep terminating server.exe and start again. Sometimes when I start again it does not hang where it was. I do this dozens of time per day.

even though I use timelimit on every possible Maple call. The problem also is that when timelimit works, it takes 10-20 times more time than asked. I ask for 10 second timeout, sometimes it timesout after 3-10 minutes if I am lucky.

So I keep trying to make workarounds and I am tired of all of this. Just waste of time. This is getting worst with each new Maple release not better.

Here is an example

restart;
expr:=-1/3*2^(2/3)/((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)*((-1/2*a^2*p-1/2*p^2*a+1/2*p*((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)*a-3)*(-p^2*(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p))^(2/3)+2^(2/3)*(-(a+3/2*p)*p*((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a^2*p+5/2*p^2*a+3/2*p^3+3)*p)/(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p)/(-1/2*2^(2/3)*(-p^2*(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p))^(2/3)+p*(p*(-p^2*(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p))^(1/3)+2^(1/3)))/p^2;

try 
    t0:=time[real]();
    timelimit(20,int(expr,p));
catch:
    print("time used ",time[real]()-t0,"seconds");
    print("timed out");
end try;

in Maple 2023, with 128 GB RAM and very fast PC and nothing else is running, it hangs. I could leave it for hrs, the server.exe  is running at full CPU and timelimit is ignored. Timelimit in Maple is useless.

I do not know what else to do. if someone can suggest something, I am willing to try anything before I finally give up.

 

For the function coulditbe it says

The environment variable _EnvTry can be used to specify the intensity of the testing by the is and coulditbe routines. Currently _EnvTry can be set to normal (the default) or hard. If _EnvTry is set to hard, is and coulditbe calls can take exponential time.

But how does one know the current value of _EnvTry which is supposed to be set to normal.? If I do   _EnvTry it does not show any value.  And when I do 

anames('environment');
anames('environment','active');

I do not see _EnvTry even listed.  I wanted to make sure I am setting it correctly.

Is it enough to do this?

 

foo:=proc()
 _EnvTry:='hard';
  #now use coulditbe, it should use hard value?
  #coulditbe(....)
end proc;

foo();

Would the above actually tell coulditbe to try hard? I wanted to use this inside a proc without affecting any global setting it might have. It is not possible to tell by just calling it if it actually using the hard option or not.

I do not think I am setting this right, I just tried

foo:=proc()
 _EnvTry:='hard';
 _EnvTry:='XXXX';
  #now use coulditbe, it should use hard value?
  coulditbe(1=2)
end proc;

And it did not complain or anything. Any value I put seems to work. I must be not setting this correctly as coulditbe does not complain.

I wish help would give example usages. But Maple help is not good at all as it has no usage examples to help users.

btw, I think the use of environment variables is bad in programming.

Each function should instead accept options as argument and one should set an option explictly.  So coulditbe should have an explicit optional argument to pass it. This makes the code more clear when looking at the call also.

Programming environment variables are just like global variables.

Bad way to program as in large program one can lose track of these settings.

I have FORTRAN namelist files, that have the form like

<space>&namelist_name

<space>varName1=0.600

<space>varName2=123

<space>varName3=345.0

<space>&end

In these files there are no blank lines as automatically put in above,

The goal is to read such files into Maple and have the same varNames created in Maple to be names/symbols with the values shown in the FORTRAN file assigned to those Maple names. In other words, Maple should then have

varName1 := 0.600:

varName2 := 123:

varName3 := 345.0:

This would enable the Maple to use these variables in the usual way to make calculations, etc.

I know how to read the FORTRAN files and get the varNames and values into two separate Maple tables, but I haven't found a way to then make the Maple assignments that are required. There must be a way to accomplish the goal.

Thank you for any suggestions.

      --- Mike

Write a Maple procedure called "matricediag" which takes as input a square matrix M of m rows and m columns and which returns The smallest element below the main diagonal and its position.

When I look for petrov type II vacuum solutions in the Metric search, one of the metrics i get is Stephani [33,8,3].

But when I load the metric and calculate the Ricci or the Einstein tensor, they are not identically zero.
Am I using the metric search wrong or is there a glitch in the program?

Download Temp.mw

Let  denote the factors of the "absolute factorization" of the following bivariate polynomial (i.e., ): 

p := product(x^3*k^2 + (x*(y + 2) + 2)*k - x^3 + y^3 + y + 1, k = RootOf(_Z^3 + _Z + 1)):
f__0 := (evala@AFactors)(p)[2, .., 1]; # Assume that we do not know the extension field in advance.

It is unfortunate that the output is not easy to read, so I have to simplify it here. However, it appears that none of the results (i.e., , , and ) is eminently readable. 
 

restart;

p := product(x^3*(k^2-1)+(x*(y+2)+2)*k+y^3+y+1, k = RootOf(_Z^3+_Z+1))

-3*x^9+8*x^6*y^3-5*x^3*y^6+y^9-4*x^7*y+3*x^4*y^4-8*x^7+8*x^6*y-x^5*y^2+6*x^4*y^3-10*x^3*y^4+x^2*y^5+3*y^7-4*x^5*y+3*x^4*y^2-5*x^3*y^3+4*x^2*y^4+3*y^6-4*x^5+5*x^4*y-11*x^3*y^2+5*x^2*y^3+4*x*y^4+3*y^5-2*x^4-16*x^3*y-x^2*y^2+8*x*y^3+6*y^4-11*x^3-16*x^2*y+4*x*y^2+8*y^3-20*x^2+3*y^2-16*x+7*y-3

(1)

f__0 := (`@`(evala, AFactors))(p)[2, () .. (), 1]

[x^3+((-(106/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+1486/3267+(1/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)^2)*y+2972/3267-(212/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(2/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)^2)*x+(-(4/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)^2-3040/3267+(61/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))*y^3+(-(4/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)^2-3040/3267+(61/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))*y-68/3267-(151/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-(2/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)^2, x^3+(((106/3267)*RootOf(10501+_Z^3+51*_Z)+(106/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+1486/3267+(1/3267)*(-RootOf(10501+_Z^3+51*_Z)-RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))^2)*y+2972/3267+(212/3267)*RootOf(10501+_Z^3+51*_Z)+(212/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(2/3267)*(-RootOf(10501+_Z^3+51*_Z)-RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))^2)*x+(-(4/3267)*(-RootOf(10501+_Z^3+51*_Z)-RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))^2-3040/3267-(61/3267)*RootOf(10501+_Z^3+51*_Z)-(61/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))*y^3+(-(4/3267)*(-RootOf(10501+_Z^3+51*_Z)-RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))^2-3040/3267-(61/3267)*RootOf(10501+_Z^3+51*_Z)-(61/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))*y-68/3267+(151/3267)*RootOf(10501+_Z^3+51*_Z)+(151/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-(2/3267)*(-RootOf(10501+_Z^3+51*_Z)-RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))^2, x^3+((-(106/3267)*RootOf(10501+_Z^3+51*_Z)+1486/3267+(1/3267)*RootOf(10501+_Z^3+51*_Z)^2)*y+2972/3267-(212/3267)*RootOf(10501+_Z^3+51*_Z)+(2/3267)*RootOf(10501+_Z^3+51*_Z)^2)*x+(-(4/3267)*RootOf(10501+_Z^3+51*_Z)^2-3040/3267+(61/3267)*RootOf(10501+_Z^3+51*_Z))*y^3+(-(4/3267)*RootOf(10501+_Z^3+51*_Z)^2-3040/3267+(61/3267)*RootOf(10501+_Z^3+51*_Z))*y-68/3267-(151/3267)*RootOf(10501+_Z^3+51*_Z)-(2/3267)*RootOf(10501+_Z^3+51*_Z)^2]

(2)

f__1 := evala(f__0)

[34/3267-(151/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(2/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)*RootOf(10501+_Z^3+51*_Z)+(2/3267)*RootOf(10501+_Z^3+51*_Z)^2+(2870/3267)*x-(212/3267)*x*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-(2/3267)*x*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)*RootOf(10501+_Z^3+51*_Z)-(2/3267)*x*RootOf(10501+_Z^3+51*_Z)^2-(2836/3267)*y+(61/3267)*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(4/3267)*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)*RootOf(10501+_Z^3+51*_Z)+(4/3267)*y*RootOf(10501+_Z^3+51*_Z)^2+(1435/3267)*x*y-(106/3267)*x*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-(1/3267)*x*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)*RootOf(10501+_Z^3+51*_Z)-(1/3267)*x*y*RootOf(10501+_Z^3+51*_Z)^2+x^3-(2836/3267)*y^3+(61/3267)*y^3*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(4/3267)*y^3*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)*RootOf(10501+_Z^3+51*_Z)+(4/3267)*y^3*RootOf(10501+_Z^3+51*_Z)^2, x^3+(106/3267)*x*y*RootOf(10501+_Z^3+51*_Z)+(106/3267)*x*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(1435/3267)*x*y+(1/3267)*x*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)*RootOf(10501+_Z^3+51*_Z)+(2870/3267)*x+(212/3267)*x*RootOf(10501+_Z^3+51*_Z)+(212/3267)*x*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(2/3267)*x*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)*RootOf(10501+_Z^3+51*_Z)-(4/3267)*y^3*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)*RootOf(10501+_Z^3+51*_Z)-(2836/3267)*y^3-(61/3267)*y^3*RootOf(10501+_Z^3+51*_Z)-(61/3267)*y^3*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-(4/3267)*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)*RootOf(10501+_Z^3+51*_Z)-(2836/3267)*y-(61/3267)*y*RootOf(10501+_Z^3+51*_Z)-(61/3267)*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+34/3267+(151/3267)*RootOf(10501+_Z^3+51*_Z)+(151/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-(2/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)*RootOf(10501+_Z^3+51*_Z), x^3-(106/3267)*x*y*RootOf(10501+_Z^3+51*_Z)+(1486/3267)*x*y+(1/3267)*x*y*RootOf(10501+_Z^3+51*_Z)^2+(2972/3267)*x-(212/3267)*x*RootOf(10501+_Z^3+51*_Z)+(2/3267)*x*RootOf(10501+_Z^3+51*_Z)^2-(4/3267)*y^3*RootOf(10501+_Z^3+51*_Z)^2-(3040/3267)*y^3+(61/3267)*y^3*RootOf(10501+_Z^3+51*_Z)-(4/3267)*y*RootOf(10501+_Z^3+51*_Z)^2-(3040/3267)*y+(61/3267)*y*RootOf(10501+_Z^3+51*_Z)-68/3267-(151/3267)*RootOf(10501+_Z^3+51*_Z)-(2/3267)*RootOf(10501+_Z^3+51*_Z)^2]

(3)

f__2 := simplify(f__0, size)

[(1/3267)*(-4*y^3+(-4+x)*y-2+2*x)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)^2+(1/3267)*(61*y^3+(61-106*x)*y-151-212*x)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-(3040/3267)*y^3+(1/3267)*(1486*x-3040)*y+x^3-68/3267+(2972/3267)*x, (1/3267)*(-4*y^3+(-4+x)*y-2+2*x)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)^2+(1/3267)*((-8*y^3+(-8+2*x)*y-4+4*x)*RootOf(10501+_Z^3+51*_Z)-61*y^3+(106*x-61)*y+212*x+151)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(1/3267)*(-4*y^3+(-4+x)*y-2+2*x)*RootOf(10501+_Z^3+51*_Z)^2+(1/3267)*(-61*y^3+(106*x-61)*y+212*x+151)*RootOf(10501+_Z^3+51*_Z)-(3040/3267)*y^3+(1/3267)*(1486*x-3040)*y+x^3-68/3267+(2972/3267)*x, (1/3267)*(-4*y^3+(-4+x)*y-2+2*x)*RootOf(10501+_Z^3+51*_Z)^2+(1/3267)*(61*y^3+(61-106*x)*y-151-212*x)*RootOf(10501+_Z^3+51*_Z)-(3040/3267)*y^3+(1/3267)*(1486*x-3040)*y+x^3-68/3267+(2972/3267)*x]

(4)

f__3 := simplify(f__0, RootOf)

[34/3267-(2836/3267)*y^3+(61/3267)*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-(151/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(2870/3267)*x-(106/3267)*x*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-(2836/3267)*y+(61/3267)*y^3*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(1435/3267)*x*y+x^3-(212/3267)*x*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(1/3267)*(-x*y-2*x+4*y^3+4*y+2)*RootOf(10501+_Z^3+51*_Z)^2+(1/3267)*(-2*x*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-x*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+2*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+4*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+4*y^3*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))*RootOf(10501+_Z^3+51*_Z), x^3-(61/3267)*y^3*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(151/3267)*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(1435/3267)*x*y+34/3267+(2870/3267)*x-(2836/3267)*y^3-(2836/3267)*y+(106/3267)*x*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(212/3267)*x*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-(61/3267)*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+(1/3267)*(-61*y-61*y^3+151+2*x*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+106*x*y-4*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)-4*y^3*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+x*y*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2)+212*x-2*RootOf(_Z^2+_Z*RootOf(10501+_Z^3+51*_Z)+51+RootOf(10501+_Z^3+51*_Z)^2))*RootOf(10501+_Z^3+51*_Z), x^3+((-(106/3267)*RootOf(10501+_Z^3+51*_Z)+1486/3267+(1/3267)*RootOf(10501+_Z^3+51*_Z)^2)*y+2972/3267-(212/3267)*RootOf(10501+_Z^3+51*_Z)+(2/3267)*RootOf(10501+_Z^3+51*_Z)^2)*x+(-(4/3267)*RootOf(10501+_Z^3+51*_Z)^2-3040/3267+(61/3267)*RootOf(10501+_Z^3+51*_Z))*y^3+(-(4/3267)*RootOf(10501+_Z^3+51*_Z)^2-3040/3267+(61/3267)*RootOf(10501+_Z^3+51*_Z))*y-68/3267-(151/3267)*RootOf(10501+_Z^3+51*_Z)-(2/3267)*RootOf(10501+_Z^3+51*_Z)^2]

(5)

Unfortunately, none of f__0, f______1__, f__2, and f______3__ is very readable.
It can be proved that the following one is also the factors.

f__4 := [x^3 + RootOf(3*_Z^3 - 4*_Z^2 + _Z - 1, index = 3)*(x*(y + 2) + 2) + RootOf(3*_Z^3 + 8*_Z^2 + 5*_Z + 1, index = 3)*(y^3 + y + 1), x^3 + RootOf(3*_Z^3 - 4*_Z^2 + _Z - 1, index = 2)*(x*(y + 2) + 2) + RootOf(3*_Z^3 + 8*_Z^2 + 5*_Z + 1, index = 1)*(y^3 + y + 1), x^3 + RootOf(3*_Z^3 - 4*_Z^2 + _Z - 1, index = 1)*(x*(y + 2) + 2) + RootOf(3*_Z^3 + 8*_Z^2 + 5*_Z + 1, index = 2)*(y^3 + y + 1)];

evala(p+3*`?()`(`*`, f__4))NULL

[x^3+RootOf(3*_Z^3-4*_Z^2+_Z-1, index = 3)*(x*(y+2)+2)+RootOf(3*_Z^3+8*_Z^2+5*_Z+1, index = 3)*(y^3+y+1), x^3+RootOf(3*_Z^3-4*_Z^2+_Z-1, index = 2)*(x*(y+2)+2)+RootOf(3*_Z^3+8*_Z^2+5*_Z+1, index = 1)*(y^3+y+1), x^3+RootOf(3*_Z^3-4*_Z^2+_Z-1, index = 1)*(x*(y+2)+2)+RootOf(3*_Z^3+8*_Z^2+5*_Z+1, index = 2)*(y^3+y+1)]

 

0

(6)

`~`[length]([f__ || (0 .. 4)])

[3858, 4389, 1410, 3608, 513]

(7)

`~`[MmaTranslator:-Mma:-LeafCount]([f__ || (0 .. 4)])

[935, 1047, 391, 881, 166]

(8)

As you can see, f__4 is of lower mathematical complexity.


 

Download fully_simplify_f_0.mw

The  above (whose "size" is smaller) comes from manual simplification, but this is not a easy work. Is there a way to get the much simplified result programmatically?

I am not able to make a MWE for this error, as it only shows in the debugger. So it seems Maple internal memory changes or some other library is loaded to cause this. Inside the debugger, I get to a function which does this

DBG> simplify(JacobiDN(x,k)^2*n)

Error, invalid input: simplify/Jacobi/JacobiDN expects its 1st argument, k, to be of type posint, but received 0

Version 2023 on windows 10

In a worksheet, the above works just fine

restart;
simplify(JacobiDN(x,k)^2*n)

Back to the debugger, if I write (2*n) instead of 2*n, then the error goes away

DBG> simplify(JacobiDN(x,k)^(2*n))
JacobiDN(x,k)^(2*n)

The values of x,k,n are all symbols and have no values in the code running:

I have no idea why this happend when I run the code only. It think x is zero in the above for some reason.

Sorry can't make MWE, I wish I can. Something strange happens when I run the code that does not show otherwise. 

Any suggestions how to invetigate this more? Stepping into the simplify code it fails in

DBG> next
`simplify/check_constant`:
   3   return type(r,'And(constant,Or(Not(function),satisfies(f -> evalb(op(f)
         <> NULL))))')

DBG> r
JacobiDN(x,k)^2*n^2

DBG> type(r,'And(constant,Or(Not(function),satisfies(f -> evalb(op(f)          <> NULL))))')
false

DBG> step
`simplify/Jacobi`
`simplify/do`:
  84               userinfo(1,simplify,'applying',new_simp,
                     `function to expression`);

 85               new_r := new_simp(r,symb_mode);  

Here it generate the error.


It has nothing to do with simplify. Here is a call to integrate which gives same error

DBG> lhs(ode)
diff(diff(xi(x),x),x)-k^2*JacobiSN(x,k)*JacobiCN(x,k)/JacobiDN(x,k)*diff(xi(x),x)+(-k^2*JacobiCN(x,k)^2+k^2*JacobiSN(x,k)^2-k^4*JacobiSN(x,k)^2*JacobiCN(x,k)^2/JacobiDN(x,k)^2-JacobiSN(x,k)^2*k^2*n^2+n^2)*xi(x)

DBG> int(lhs(ode),x)
Error, invalid input: simplify/Jacobi/JacobiDN expects its 1st argument, k, to be of type posint, but received 0

DBG> x
x

DBG> k
k

DBG> xi(x)
xi(x)

 

alias(b = JacobiCN(sqrt(2)*sqrt(x), sqrt(2)*_Z/2)^2);
                          lessthan, b

I could not find an explanation on the help page.

I would have expected simply b as the return value.

Update:
A worksheet that generates the output


 

RootOf(JacobiCN(sqrt(2)*sqrt(x), (1/2)*sqrt(2)*_Z)^2*_Z^2+_Z^2-2)

RootOf(JacobiCN(2^(1/2)*x^(1/2), (1/2)*2^(1/2)*_Z)^2*_Z^2+_Z^2-2)

(1)

plot(RootOf(JacobiCN(2^(1/2)*x^(1/2), (1/2)*2^(1/2)*_Z)^2*_Z^2+_Z^2-2), x = 0 .. 5)

 

convert(JacobiCN(sqrt(2)*sqrt(x), (1/2)*sqrt(2)*_Z)^2, Elliptic_related)

1-JacobiSN(2^(1/2)*x^(1/2), (1/2)*2^(1/2)*_Z)^2

(2)

convert(RootOf(JacobiCN(2^(1/2)*x^(1/2), (1/2)*2^(1/2)*_Z)^2*_Z^2+_Z^2-2), Elliptic_related)

RootOf(JacobiSN(2^(1/2)*x^(1/2), (1/2)*2^(1/2)*_Z)^2*_Z^2-2*_Z^2+2)

(3)

alias(b = JacobiSN(sqrt(2)*sqrt(x), (1/2)*sqrt(2)*_Z))

lessthan, b

(4)

``

Download alias_with_lessthan_output.mw

Apparently functions working on lines do not work on segments.

I can't see any logical explanation why that should be so.

Please consider expanding functionality in future Maple versions.

segprojection.mw

Is there a way to determine the version of MapleSim used to create a model from the model file or within MapleSim when an older model was loaded?

Hei

Vet noen om Windows 11 støtter Maple 2020? Eller støttes det bare av Windows 10.

If I understand right, the form  is equivalent to  (where the optional index variable is omitted), which produces a sequence of n occurrences of y. But how to explain the following output (of p1())? 

restart;

kernelopts(version)

`Maple 2023.0, X86 64 WINDOWS, Mar 06 2023, Build ID 1689885`

(1)

p0 := proc()
    local a := 1, b := 2;
    seq('assign(('a', 'b') = (a + 1, 2*b))', 1 .. 3);
    print(a, b)
end:

p1 := proc()
    local a := 1, b := 2;
    seq('assign(('a', 'b') = (a + 1, 2*b))', 3);
    print(a, b)
end:

p2 := proc()
    local a := 1, b := 2;
    'assign(('a', 'b') = (a + 1, 2*b))' $ 3;
    print(a, b)
end:

p3 := proc()
    local a := 1, b := 2;
    to 3 do
        assign(('a', 'b') = (a + 1, 2*b))
    od;
    print(a, b)
end:

p0()

p1()

p2()

p3()

4, 16

 

5, 32

 

4, 16

 

4, 16

(2)


Download singular_behaviour_of_`seq`.mw

Main code: 

p1 := proc()
    local a := 1, b := 2;
    seq('assign(('a', 'b') = (a + 1, 2*b))', 3);
    print(a, b)
end:
p1():

How can an equation containing a logarithmic function be converted into a polynomial?

First 197 198 199 200 201 202 203 Last Page 199 of 2428