Maple 2023 Questions and Posts

These are Posts and Questions associated with the product, Maple 2023

Could someone explain to me why the Maple online help pages (see here) are still apparently matching the Maple 2021 release for the past few years? Does this mean that all the information on the Maple online help pages is out of date, or just this one specific page is terribly out of date?

I found a new problem in Maple 2023 on windows 10.  But it is more of an annoyonus. This is what happens:

I can have a worksheet open and running somecode with lots of output generated on the screen. Everything displays fine.

Now I go and open a new application not related to Maple at all, for example if I open the task manager, this causes the Maple screen to immediately go all BLANK ! Yes, all the display is gone. I have no idea why opening a new application in new window could cause this.

Everything disappears from the worksheet except for the worksheet frame. All the menus are gone also.

But resizing the worksheet window makes everything to appear agin due to the repaint process, But I need to resize the worksheet few times to get everything to repaint fully.

So the content is still there, but it just do not show/repaint.

Note that Maple does NOT freeze or anything, it is still running and the content is there, it is just that the content becomes not visible due to opening a new application window on the side.

I have never seen anything like this in any other application on windows. I also never had this problem on same PC with Maple 2022.2.

Anyone else noticed this problem?  This is reproducible all the time. Sometimes the content will display again on its own after short amount of time, but will be missing many menu items and missing side content and so on so I have to resize the windows to make repaint eveything again. 

May be it is a Java problem. I do not know.

I have the same system as described in this post 

I will make a movie to show this very soon but I am waiting for something to finish running before I do this so I can save all my work.

Windows 10 pro, running Maple 2023 with two monitors.

Here is a small movie. I made very small example which prints number on the screen in a loop. I added a Sleep in between so it does not take over the CPU just for illustration. In my real code there is no such Sleep command.

In this movie, we see that when I open the task manage window how the display in the worksheet is gone. In this example it comes back after few seconds but all the other items in the worksheet (menus etc..) are still missing. Resizing the windows makes them appear again. In my actual code, due to the larger content, the whole worksheet remain not visible for much longer each time (I waited 5 minutes and more for it to repaint), but still had to resize it to make everything visible as in this example.

Can someone else reproduce this?

for n from 1 to 1000000 do
    print("n=",n);
    Threads:-Sleep(2);
od;

 

 

> int((1 - x)^r*(-2*x + (-2 + x)*log(1 - x))/(2*x*log(1 - x)^2), x = 0 .. 1) assuming 0 <= r

(int((1 - x)^r*(-2*x + (-2 + x)*log(1 - x))/(2*x*log(1 - x)^2), x = 0 .. 1) assuming (0 <= r))

Expected result is:

1 + r - r * ln(1 + r) - 1/2 * ln(2 * Pi * (1 + r)) + lnGAMMA(1 + r)

 

For two nonempty lists (of the same length), 

F~(list1, ` $`, list2); # space-dollarsign

is (almost) equivalent to 

zip(F, list1, list2);

However, it appears that in practice, using `~` can be faster than its equivalent zip version.
Here is a typical test: 

restart;

x := combinat:-randperm(10^7):
y := combinat:-randperm(10^7):

undefine(f);

t2 := CodeTools[Usage](`~`[f](x, ` $`, y), iterations = 10)

memory used=0.62GiB, alloc change=1.21GiB, cpu time=51.35s, real time=14.77s, gc time=42.55s

 

t4 := CodeTools[Usage](zip(f, x, y), iterations = 10)

memory used=0.52GiB, alloc change=-4.00MiB, cpu time=53.88s, real time=16.25s, gc time=44.51s

 

evalb(t2 = t4)

true

(1)

NULL


 

Download `~`_and_zip.mw

But I cannot find any explanations in the documentation (as well as What is Maple's equivalent to Mathematica's MapThread?). Does anyone know why?

For a list containing at least one element, 

F~(list0); # element-wise

is (almost) equivalent to 

map(F, list0);

However, it seems that in practice, using `~` can be faster than its equivalent map version.
Here is a typical test: 

 

 

restart;

w := [`$`](0 .. 1e4):
x := [`$`](0 .. 2e3):
y := [`$`](0 .. 3e2):
z := [`$`](0 .. 4e1):

undefine(f)

NULL

 

 

# Compute a generalized outer product of [w, x] and [y, z] without using the inefficient `ArrayTools:-GeneralOuterProduct`.

""(* Note that we cannot use the ""unapply"" command here. (Use ""->"" instead.) *)""

p2 := CodeTools[Usage](`~`[proc (s4) options operator, arrow; `~`[proc (s3) options operator, arrow; `~`[proc (s2) options operator, arrow; `~`[proc (s1) options operator, arrow; f(s3, s1) end proc](s2) end proc]([y, z]) end proc](s4) end proc]([w, x]), iterations = 10)

memory used=282.53MiB, alloc change=0.59GiB, cpu time=21.67s, real time=7.41s, gc time=17.33s

p4 := CodeTools[Usage](map(proc (s4) options operator, arrow; map(proc (s3) options operator, arrow; map(proc (s2) options operator, arrow; map(proc (s1) options operator, arrow; f(s3, s1) end proc, s2) end proc, [y, z]) end proc, s4) end proc, [w, x]), iterations = 10)

memory used=230.48MiB, alloc change=-4.00MiB, cpu time=23.26s, real time=8.67s, gc time=17.71s

evalb(p2 = p4);

true

NULL


 

Download `~`_and_map.mw

But I cannot find any explanations in Comparison of element-wise operators and map function or Difference between 'map' and '~' (element-wise operation). Does anyone know why?

 

ODE for electrical circuit (right click on Documentblock, unselect show command does not work. Command still visble)u(t) = T*(diff(`&varphi;`(t), t))+L*(diff(i(t), t))+i(t)*R

u(t) = T*(diff(varphi(t), t))+L*(diff(i(t), t))+i(t)*R

(1)

 

ODE for motor (toggle Documentblock, unselect show command is only effective on equations  3 and 4)i(t)*T = J*(diff(`&varphi;`(t), t, t))

i(t)*T = J*(diff(diff(varphi(t), t), t))

(2)

Isolate i(t) and taking the derivative

i(t) = J*(diff(diff(varphi(t), t), t))/T

(3)

``

diff(i(t), t) = J*(diff(diff(diff(varphi(t), t), t), t))/T

(4)

``

Download Document_Block_hide_command.mw

Hi MaplePrimes,

I've updated to the 2023 version of Maple. After the update I chose to remove older version folders in Windows.

Since then I cant't use my tasks any longer. I've re created the tasks and the are also shown in the Task Palette, but clicking on a task results in nothing. I can though create a new Task and after the creation all my tasks can then be used again.

Its like Maple doesn't recognize the correct Help Database from the beginning. I've reinstalled Maple 2023 two or three times to try to reset the whole installation to something from scratch. Nothing that I do seems to produce the desired result. Does anybody out there have a solution or suggestion to a probable solution?

I don't know of any file that I could attach to exemplify my problem. It's not a math/maple problem relating directly to the maple code language. My tasks themselves work fine once inserted in a document. It's the insertion itself that's the problem.

Thanks.

First issue I see in Maple 2023 integrate

Example 1

restart;
int( (e*x+d)^(3/2)*(c*x^2+a)^(3/2),x)

Example 2

restart;
int((1+x)^(3/2)*(x^2-x+1)^(3/2),x);

Example 3

restart;
int((c*x^4+b*x^2)^(3/2)/x^(3/2),x)

 

Worksheet below for 2023 and also for 2022.2 showing this did not have this problem in 2022.2. Internally for me, this cause other problem when post-processing this, that is why I found it. Any one knows what caused it?  Maple 2022.2 result is much longer, but it does have this "undefined" issue in the result.


 

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

restart;

int( (e*x+d)^(3/2)*(c*x^2+a)^(3/2),x)

(e*x+d)^(1/2)*(c*x^2+a)^(1/2)*undefined*x*(3*c*e*x^3+4*c*d*x^2+6*a*e*x+12*a*d)/(c*e*x^3+c*d*x^2+a*e*x+a*d)^(1/2)

restart;

int((1+x)^(3/2)*(x^2-x+1)^(3/2),x);

(1+x)^(1/2)*(x^2-x+1)^(1/2)*undefined*x*(x^3+4)/(x^3+1)^(1/2)

restart;

int((c*x^4+b*x^2)^(3/2)/x^(3/2),x)

undefined*(c*x^2+2*b)*(c*x^4+b*x^2)^(3/2)/(x^(1/2)*(c*x^2+b)*(x*(c*x^2+b))^(1/2))

 


 

Download bug_3_maple_2023_int_march_10_2023.mw

 

interface(version);

`Standard Worksheet Interface, Maple 2022.2, Windows 10, October 23 2022 Build ID 1657361`

restart;

int( (e*x+d)^(3/2)*(c*x^2+a)^(3/2),x)

(2/1155)*(e*x+d)^(1/2)*(c*x^2+a)^(1/2)*(372*(-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2)*((-x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e+d*c))^(1/2)*((x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e-d*c))^(1/2)*EllipticF((-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2), (-((-c*a)^(1/2)*e-d*c)/((-c*a)^(1/2)*e+d*c))^(1/2))*c*a^3*d*e^6+245*x^6*c^4*d*e^6+300*x^5*a*c^3*e^7+145*x^5*c^4*d^2*e^5-x^4*c^4*d^3*e^4+255*x^3*a^2*c^2*e^7+2*x^3*c^4*d^4*e^3+8*x^2*c^4*d^5*e^2+60*x*a^3*c*e^7+360*(-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2)*((-x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e+d*c))^(1/2)*((x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e-d*c))^(1/2)*EllipticF((-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2), (-((-c*a)^(1/2)*e-d*c)/((-c*a)^(1/2)*e+d*c))^(1/2))*c^2*a^2*d^3*e^4-12*(-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2)*((-x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e+d*c))^(1/2)*((x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e-d*c))^(1/2)*EllipticF((-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2), (-((-c*a)^(1/2)*e-d*c)/((-c*a)^(1/2)*e+d*c))^(1/2))*c^3*a*d^5*e^2-16*(-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2)*((-x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e+d*c))^(1/2)*((x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e-d*c))^(1/2)*EllipticF((-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2), (-((-c*a)^(1/2)*e-d*c)/((-c*a)^(1/2)*e+d*c))^(1/2))*(-c*a)^(1/2)*c^3*d^6*e-432*(-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2)*((-x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e+d*c))^(1/2)*((x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e-d*c))^(1/2)*EllipticE((-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2), (-((-c*a)^(1/2)*e-d*c)/((-c*a)^(1/2)*e+d*c))^(1/2))*c*a^3*d*e^6-336*(-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2)*((-x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e+d*c))^(1/2)*((x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e-d*c))^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1/2)*e-d*c))^(1/2)*((-x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e+d*c))^(1/2)*((x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e-d*c))^(1/2)*EllipticF((-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2), (-((-c*a)^(1/2)*e-d*c)/((-c*a)^(1/2)*e+d*c))^(1/2))*(-c*a)^(1/2)*a^2*c*d^2*e^5-100*(-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2)*((-x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e+d*c))^(1/2)*((x*c+(-c*a)^(1/2))*e/((-c*a)^(1/2)*e-d*c))^(1/2)*EllipticF((-(e*x+d)*c/((-c*a)^(1/2)*e-d*c))^(1/2), (-((-c*a)^(1/2)*e-d*c)/((-c*a)^(1/2)*e+d*c))^(1/2))*(-c*a)^(1/2)*a*c^2*d^4*e^3)/(c^2*e^5*(c*e*x^3+c*d*x^2+a*e*x+a*d))

restart;

int((1+x)^(3/2)*(x^2-x+1)^(3/2),x);

-(1/55)*(1+x)^(1/2)*(x^2-x+1)^(1/2)*(-10*x^7+(27*I)*3^(1/2)*(-2*(1+x)/(-3+I*3^(1/2)))^(1/2)*((I*3^(1/2)-2*x+1)/(I*3^(1/2)+3))^(1/2)*((I*3^(1/2)+2*x-1)/(-3+I*3^(1/2)))^(1/2)*EllipticF((-2*(1+x)/(-3+I*3^(1/2)))^(1/2), (-(-3+I*3^(1/2))/(I*3^(1/2)+3))^(1/2))-81*(-2*(1+x)/(-3+I*3^(1/2)))^(1/2)*((I*3^(1/2)-2*x+1)/(I*3^(1/2)+3))^(1/2)*((I*3^(1/2)+2*x-1)/(-3+I*3^(1/2)))^(1/2)*EllipticF((-2*(1+x)/(-3+I*3^(1/2)))^(1/2), (-(-3+I*3^(1/2))/(I*3^(1/2)+3))^(1/2))-38*x^4-28*x)/(x^3+1)

 


 

Download maple_2022_int_march_10_2023.mw

When will the PDF Maple User Manual be released for Maple 2023. Also I hope the Programming guide is updated too as it is still at 2020.

I know that this is not really a question regarding core Maple package, but I am running into problems during the installation process.

After having upgraded Maple networktools as mentioned, I am unable to run the activation program due to an error.

"Java Virtual Machine Launcher: Error: Could not create the Java Virtual Machine."

I've never had that problem before in previous versions. There was no Java installed on the (virtual) server, so I installed the latest OpenJDK to check if that solved the problem.

Unfortunately it didn't.

Any hints would be appreciated.

Windows Server 2012R2

My main question is: How to change the font used in worksheet by Maple for 1D input from Courier to another font say times new roman? Is there a setting for this so it applies all the time?

ps. I found Can-I-Change-the-Default-Fonts-or-Style-for-Maple-Worksheets-and-Documents?language=en_US  (very hard to follow and confusing, but it seems that is only way to fix this problem now is to change the default font).

-----------------------------------------------------------------------------------------------------------------

I noticed strange font problem using Maple 2023 on windows 10. This problem does not show on Maple 2022.2 (at least I do not think I've seen it or noticed it before). 

Variables with _ between the names, will have the underscore not display sometimes as I move the cursor around (movie at end).

When scrolling back up, the underscores no longer become visible. 

But as I move the cursor over the variable name which containes the underscore, they will now show up.

I am sure this is a font issue. The zoom is set at 100%. I made no changes at all other than making the input 1D math as I normally do and set the default to worksheet. Some of my setting are below.

This could be a DPI issue settings of some sort. My monitor is standard monitor (not a 4K one) and again, I have not changed any settings on my PC after I installed Maple 2023 and did not change any hardware.

 

 

 

 

Here is some system information also

 

 

Here is the movie showing the problem

 

 

As I play more with it, I notice a common theme. This happens when I hit the UP ARROW to go to the line above. Then suddenly the underscroes no longer visible. Once I hit the LEFT arrow (now I am at the above line), they show up again.

Here is another movie which more clearly shows this.

This makes it very hard to work with the code in the worksheet. But I am sure this can be fixed as it looks like just a font configuration issue with Maple on windows. But I do not know what it is and how to fix it.

 

I found something new. When setting the ZOOM at 125% instead of 100% as above, I notice the underscores do not completely disappear but become THINNER but one can still see them. This affects only the underscores. When the ZOOM at 150%, they do not change at all.  Here is a movie. first part at 125%. Notice how they become little thinner when doing the same thing as above. But at 150% they remain visible because they do not change thinkness. When going back to 100% zoom, they  no longer show.

So the problem is that they are there all the time, but depending on the ZOOM level, they beome thinner and thinner until they become invisible to the eye.

 

I found some related issue on windows 10 with some application where this problem shows up.

some-characters-missing-or-cut-off-when-displayed-on-screen

 "When you view your document in Microsoft Word, some characters may be missing, or the top (or bottom) of some characters may be cut off.

This problem may affect the following types of characters:

Underscore"

The above is about WORD, but it could as well apply to Maple?

I also found  underscore not rendering with courier

"Underscore characters are not rendered in new Google Docs in the Courier
New 11pt or 12pt fonts."

My question is: How to change the font used in worksheet by Maple? Now it is using Courier. May be if I change the font, this problem will go away?

 

Update: Found a workaround!  It is the font used!  I changed from Courier to Times New Roman and now the underscore do not change thinkness!  I just need a way to make this permenant for all 1D Maple input.   Here is a new movie showing it is fixed. You can see the underscores remain visible, all at 100% ZOOM level. Once I change to Courier, the problem show up again. 

I am not sure if this is a Maple issue or windows.

 

 

 

The new command ArrayTools[GeneralOuterProduct] (introduced in Maple 2021) computes the generalized outer product of two rtables, and again, there exists a similar function Outer in Mma (cf. the end of this question). But in practice, it appears that this Maple command is not so fast as Mma's one. To begin with, we need to generate four lists: w, x, y, and z. Our goal is forming all possible combinations of the lowest‐level elements in a nested structure (rather than a flat structure). Now let us start the test.

In Mathematica (the real time is about ): 

And in Maple (the real time is about ): 
 

restart;

w := [`$`](0 .. 1e4):
x := [`$`](0 .. 2e3):
y := [`$`](0 .. 3e2):
z := [`$`](0 .. 4e1):

"time[real]((p1:=MmaTranslator:-Mma:-ReplaceRepeated(convert(ArrayTools:-GeneralOuterProduct(convert([w,x],Array,fill=NULL),()->`if`(nargs=2,`[]`(args),NULL),convert([y,z],Array,fill=NULL)),listlist),[]=NULL)))"

199.880

(1)

"time[real]((p2:=(s4->(s3->(s2->(s1->`[]`(s3,s1))~(s2))~([y,z]))~(s4))~([w,x])))"

7.699

(2)

p3 := parse(StringTools:-CharacterMap("{}", "[]", FileTools:-Text:-ReadFile("E:/data.txt")))

evalb(p1 = p2 and p2 = p3) = trueNULL


 

Download Outer.mw

As you can see, Maple and Mathematica returns identical results (∵p1p3); nevertheless, Maple consumes too much time: the ratio is 199.880/0.784176 ≈ 254.892. (What a wide gap between them!) 
So, is there any possibility of speeding up Maple's ArrayTools:-GeneralOuterProduct? Or any ideas of obtaining the same results in Maple efficiently?

Explanatory notes. Here is an illustrative animation: 

Update: In Maple 2023 the warning appears with 2D.

With 1D

int(1/(sqrt(x__0 - x)*sqrt(-x^2 + 1)), x = 0 .. x__0)

Warning, unable to determine if -1 is between 0 and x__0; try to use assumptions or use the AllSolutions option

 

Warning, unable to determine if 1 is between 0 and x__0; try to use assumptions or use the AllSolutions option

 

int(1/((x__0-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. x__0)

(1)

NULL

With 2D

int(1/(sqrt(x__0-x)*sqrt(-x^2+1)), x = 0 .. x__0)

int(1/((x__0-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. x__0)

(1)

NULL

The root cause might be the same as for this open question.

int_warning_2D.mw

int_warning_1D.mw

1 2 Page 1 of 2