MaplePrimes Questions

As a Maple user for 10+ years, I've had plenty of stack limit errors, pretty much all of them my fault. But I am currently experiencing a very unusual one after updating my Mac from Maple 2019 to Maple 2021.2.

I am running a long script to fetch json data from a url, parse it, and do a bunch of analysis. In most cases it works fine, but some cases give either an "Execution stopped: Stack limit reached." error, or the error "Error, (in type/polynom) result from type `algfun` must be true or false". Both are being caused by calling the gfun:-ratpolytocoeff command.

I kind of think some internal memory of Maple is being accidentally overwritten because I can cause the error to occur or not occur by adding / commenting out random lines of code that have nothing to do with the part of the code causing the problem. I've managed to find a fairly small script that causes the problem to occur:

with(PolynomialIdeals):
url := "https://api.combopal.ru.is/garpur_run/61e5f7acf2e929ff811caad3":

root_func := F[0, x]:

latex:-Settings(useimaginaryunit=i):

data := URL[Get](url):
json := JSON[ParseString](data):
json := JSON[ParseString](data):

debug_solved := (x^5-3*x^4+5*x^3-7*x^2+4*x-1)/(x^5-5*x^4+10*x^3-10*x^2+5*x-1):

debug_gfun := gfun[ratpolytocoeff](debug_solved, x, n);

If I remove ANY of these lines of code, there is no longer any problem, which is very strange because, for example, I'm not using the PolynomialIdeals package anywhere in the script. This particular script works fine on a Linux machine running 2021.0, but yet I am having similar problems on that machine with other cases.

Here's a slightly simpler example in which gfun[ratpolytocoeff] induces a "division by zero" error ("Error, (in convert/fullparfrac/normal_only) numeric exception: division by zero"):

with(PolynomialIdeals):
url := "https://api.combopal.ru.is/garpur_run/61e5f7acf2e929ff811caad3":

latex:-Settings(useimaginaryunit=i):

data := URL[Get](url):
json := JSON[ParseString](data):
json := JSON[ParseString](data):

debug_gfun := gfun[ratpolytocoeff](1/(1-x), x, n);

After the division by zero error, if I press Ctrl+D to close the Maple command line, it prints
"GC Thread signalAbort 0x7000019a5000 Execution stopped: Stack limit reached.".

Is this an internal Maple bug? Is there any workaround? I am pulling my hair out and would be very grateful for any help.

psi := psi(t)

psi := psi(t);
Error, recursive assignment
How can this assignment be accomplished?

Hi,

does anyone has any idea on how the number of digits displayed and the accuracy of calculations in MapleFlow works?

It looks like it is nothing like it is in Maple.

For example:

Digits:=10

interface(displayprecision)=3

1.0210=1.219

interface(displayprecision=10)

1.0210=1.219

Digits:=15

interface(displayprecision=10)

1.0210=1.219

Best regards,

There seems to be a bug in Maple 2021, latest release. Not sure if this was in previous versions.

When checking off the "Show Column Header" in Datatables, the cells are becoming invisible, while the column header still remains.

Show Row Header on the other side works fine.

Hi, I would be grateful if anyone could help find inconsistency in a system of equations I have been solving. I can easily solve the system (that I have called ‘EQs’) when I set the parameter ‘tau\_l’ equal to .06, but for a different value, it will not solve. The same thing happens whenever I change the value of some other parameters like ‘l3’. Regards

ACCOLLEY_Delali_-_Demographics_3.mw

Hello guys,

I want to find exact form of a(t) in following differential equation:

-diff(a(t), t)^2*_C1*6^(-1/(-1 + 2*alpha))*((diff(a(t), t, t)*a(t) + diff(a(t), t)^2)/a(t)^2)^(-1/(-1 + 2*alpha))/(4*(diff(a(t), t, t)*a(t) + diff(a(t), t)^2)*(-1/2 + alpha)) = (6*diff(a(t), t, t)*a(t)^2*alpha + 6*a(t)*diff(a(t), t)^2*alpha + k^2)/a(t)^3

please guide me,

I am looking for something like the equal sign (“=”) with a question mark (“?”) on top.

This would be handy to express an unknown relation or something that has to be proofed.

If not: Is it possible to create custom symbols?

Many times when using the debugger, and hitting the NEXT button I get the message

   Warning, cannot determine statement number; procedure may have changed in-place

The problem is that after this, hitting NEXT will not go to next statement any more. It will bypass and return from the current procedure. but hitting STEP will make it go to next statement, But STEP will also go into next block which I might not want to do.

Only way to fix this is to terminate the debugging session and start all over again.

it is random and comes up in different places. The code in in .mla file and I step through it.

I am sure anyone who have used the buildin debugger have seen this message before. It shows for me many times. 

What causes it and what can one do to not make it show up or clear it up so one does not have to restart the debugging each time it shows up?

Here is a screen shot.  I am also wondering if this happens using the emacs interface to the Maple debugger? I have not used the emacs interface to the debugger before.

Maple 2021.2 on windows 10

 

Colleagues, help me please. There is a 256 by 256 matrix in the form of a histogram or heat map.

I want to smooth this histogram and get a surface function.

I used Lowess.

However, there is a problem. the resulting function f (x,y) of the surface is calculated for a long time and it is not possible to use it in NonLinearfit. My NonLinearFit does not give a result. I try to use this function as  A * f(x,y) where A is parameter/

And my idea is to use this function as a template when approximating new poorer matrices. like copulas

What should I do?

I can't understand why this error Error, adding lists of different length show up only when removing a print statement!

Why would a print has anything to do with an error message showing up or not?

some context. I wanted to call map on expression, but wanted to collect the result of operating on each indent in a list as map goes through the expression on term after the other. The expression will be type `+`.

I did not know how to do it inside map. So I create separate proc which map call.

Inside this proc, I use list to append to (this will small list, few terms at most).  To be able to do this, I made the list I want to collect thing into a global variable outside the proc.  Everything was working OK, until I remove a print statement  I had inside the proc for debugging.

I am sure there is a better way to do this all (i.e. collect map output into a list) and I am trying to find better way. But my question is: Why would this error shows up only when I remove a print statement from the last line in the proc?

I also notice when removing the line variable declaration global L now both version work with no error, but get warning Warning, (in f) `L` is implicitly declared local which is why I added declaration global L in first place.

Maple 2021.2 on windows 10

interface(version);

`Standard Worksheet Interface, Maple 2021.2, Windows 10, November 23 2021 Build ID 1576349`

restart;

r:=2/(x^2+1)+1/(x^2+1)^2;
L:=[];
f:=proc(Z)
   global L;  
   #do some processing on Z, then collect it into list L
   L:=[ op(L), Z^2];
   #print("op(L) = ",op(L)," Z=",Z);   
end proc:
map(Z->f(Z),r);
L;

2/(x^2+1)+1/(x^2+1)^2

[]

Error, adding lists of different length

[4/(x^2+1)^2, 1/(x^2+1)^4]

restart;

r:=2/(x^2+1)+1/(x^2+1)^2;
L:=[];
f:=proc(Z)
   global L;  
   #do some processing on Z, then collect it into list L
   L:=[ op(L), Z^2];
   print("op(L) = ",op(L)," Z=",Z);   
end proc:
map(Z->f(Z),r);
L;

2/(x^2+1)+1/(x^2+1)^2

[]

"op(L) = ", 4/(x^2+1)^2, " Z=", 2/(x^2+1)

"op(L) = ", 4/(x^2+1)^2, 1/(x^2+1)^4, " Z=", 1/(x^2+1)^2

[4/(x^2+1)^2, 1/(x^2+1)^4]

 

Download why_error.mw

 

Thanks to everyone for the answers and information I did not know that map does process return value from a proc it calls. Good to know.

 

Apparently the Units[Simple] package has not implemented certain features of the original implementation, which (again) leads to very unexpected and wrong results.

This is not acceptable.

Either...

  1. Implement everything
  2. Give a proper warning

a := [0, 1.2, 2, 8, -1.3]

[0, 1.2, 2, 8, -1.3]

(1)

max(a)

8

(2)

Units[Simple]:-max(a)

8

(3)

max[index](a)

4

(4)

Units[Simple]:-max[index](a)

8

(5)

````

Download maxindex.mw

Hello,

I'm havig trouble getting answers to be in decimal form with a certain simple type of equation.

I'm new to Maple so I likely don't understand something basic but when I enter in numbers with decimals as the neumerator like (654321.987*123456.789)/2 I get 4.0390245740 x 10^10. Yet when I enter whole numbers like (654321*123456)/2 I get 40389926688.

I've checked the Number Format settings many times, it's set to "None".

How do I get decimals?

What am I doing wrong?

I'm asking this because I'm sure I'm just missing something.

If I solve a DE with numerics, i.e., dsolve(...,numeric), I get a procedure, say h. I want to answer: if I have a point a that I know, what are the root(s) of h(x) - h(a) = 1? In other words, solve for x.

I thought this would just involve something like fsolve or solve/evalf, or perhaps a root finding package, but I can't figure it out. What I want to avoid is having to write a procedure to hone in on the root myself, since my code is already quite slow.

Any help would be greatly appreciated.

EDIT 1: Here is my MWE (or, what should work in my mind but doesn't). The ODE isn't important, it's just an easy example.

restart;

ode := diff(f(x),x) = f(x);

initial_condition := f(0)=1;

a := 1;

h := dsolve({ode,initial_condition},numeric);

solution := fsolve(h(x) - rhs(h(a)[2]) = 1);

Hi.  I have not been able to find the individual cost of Maple Flow.  How much does it cost?  (in CDN)  Is it inlcuded in Maple?

Can Maple Flow be installed on Linux?  If not, will a Linux version be released on the future?

Regards

First 224 225 226 227 228 229 230 Last Page 226 of 2308