Maple 2024 Questions and Posts

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

I need to seperate vectors  from projective geometry vectors in my package. I am experimenting with using row and column matrices for projective points and lines reppresentation. Two approaches are use here. The 1st converts the Matrices to Vectors and back in the procedure. I dont like that way. The 2nd approach, I worked out the equivalent of CrossProduct and DotProduct for the row and column matrices. That I think is better.

1st Question are there any other approaches worth looking at?Is there something in the Physics package that could be of use?

2nd Qusetion could a new data type be made with the properties of a vector that could be displayed differently.?

Say, for a point [ x : y : z ] and a line < x : y : z >, because projecive quantities as basically ratios..


 

restart

with(LinearAlgebra):

 

#

projcross:=overload([

proc(A::Matrix(1,3),B::Matrix(1,3))
option overload;
description "join of points";
local a:=convert(A,Vector[row]),b:=convert(B,Vector[row]);
uses LinearAlgebra;
print("line thro' points");
convert((a &x b)^%T,Matrix);
end proc,

proc(A::Matrix(3,1),B::Matrix(3,1))
option overload;
description "meet of lines";
local a:=convert(A,Vector[column]),b:=convert(B,Vector[column]);
uses LinearAlgebra;
print("intersect point");
convert((a &x b)^%T,Matrix);
end proc,

proc(A::{Matrix(1,3),Matrix(3,1)},B::{Matrix(1,3),Matrix(3,1)})
option overload;
description "incidence of point and line";
uses LinearAlgebra;
local a,b;
if type(A,'Matrix'(1,3))and type(B,'Matrix'(3,1)) or type(A,'Matrix'(3,1))and type(B,'Matrix'(1,3))  then #not working
a:=convert(A,Vector[row]);
b:=convert(B,Vector[row]);
end if;
print("if = 0 coincident");
a.b ;
end proc


]):

projcross(<<1|2|4>>,<<3|-5|7>>)

"line thro' points"

 

Matrix([[34], [5], [-11]])

(1)

projcross(<<1,2,4>>,<<3,-5,7>>)

"intersect point"

 

Matrix([[34, 5, -11]])

(2)

projcross(<<1|2|4>>,<<34,5,-11>>)

"if = 0 coincident"

 

0

(3)

projcross(<<34,5,-11>> ,<<3|-5|7>> )

"if = 0 coincident"

 

0

(4)

#This section is to derive a CrossProduct and DotProduct for row and column matrix inputs

M:=<A[1,1]|A[1,2]|A[1,3]> ; #point

M := Vector[row](3, {(1) = A[1, 1], (2) = A[1, 2], (3) = A[1, 3]})

(5)

N:=<B[1,1]|B[1,2]|B[1,3]> ; #point

N := Vector[row](3, {(1) = B[1, 1], (2) = B[1, 2], (3) = B[1, 3]})

(6)

(M &x N)^%T ; #line thro' points

3

(7)

R:=<A[1,1],A[2,1],A[3,1]> ;# line

R := Vector(3, {(1) = A[1, 1], (2) = A[2, 1], (3) = A[3, 1]})

(8)

S:=<B[1,1],B[2,1],B[3,1]> ;# line

S := Vector(3, {(1) = B[1, 1], (2) = B[2, 1], (3) = B[3, 1]})

(9)

(R &x S)^%T  ;# intersect point

[`?`]

(10)

 

T:=<A[1,1]|A[1,2]|A[1,3]>  ;#point

T := Vector[row](3, {(1) = A[1, 1], (2) = A[1, 2], (3) = A[1, 3]})

(11)

U:=<B[1,1],B[2,1],B[3,1]>  ;# line

U := Vector(3, {(1) = B[1, 1], (2) = B[2, 1], (3) = B[3, 1]})

(12)

DotProduct(T,U,conjugate=false) ; #check coincidence of point and line

A[1, 1]*B[1, 1]+A[1, 2]*B[2, 1]+A[1, 3]*B[3, 1]

(13)

V:=<A[1,1],A[2,1],A[3,1]> ;# line

V := Vector(3, {(1) = A[1, 1], (2) = A[2, 1], (3) = A[3, 1]})

(14)

 

W:=<B[1,1]|B[1,2]|B[1,3]> ;#point

W := Vector[row](3, {(1) = B[1, 1], (2) = B[1, 2], (3) = B[1, 3]})

(15)

DotProduct(V,W,conjugate=false)  ; #check coincidence of line and point

A[1, 1]*B[1, 1]+A[2, 1]*B[1, 2]+A[3, 1]*B[1, 3]

(16)

# CrossProduct and DotProduct procedure for matrix inputs

 

ProjCp:=overload([

proc(a::Matrix(1,3),b::Matrix(1,3))
option overload;
description "join of points";
local A:=a,B:=b;
print("line thro' points");
<<A[1, 2]*B[1, 3] - A[1, 3]*B[1, 2],-A[1, 1]*B[1, 3] + A[1, 3]*B[1, 1],A[1, 1]*B[1, 2] - A[1, 2]*B[1, 1]>>;
end proc,

 

proc(a::Matrix(3,1),b::Matrix(3,1))
option overload;
description "meet of lines";
local A:=a,B:=b;
print("intersect point");
<<A[2, 1]*B[3, 1] - A[3, 1]*B[2, 1] | -A[1, 1]*B[3, 1] + A[3, 1]*B[1, 1] | A[1, 1]*B[2, 1] - A[2, 1]*B[1, 1] >>;
end proc,

proc(A::{Matrix(1,3),Matrix(3,1)},B::{Matrix(1,3),Matrix(3,1)})
option overload;
description "incidence of point and line";
local dp;
uses LinearAlgebra;
if type(A,'Matrix'(1,3))and type(B,'Matrix'(3,1))   then
dp:=A[1, 1]*B[1, 1] + A[1, 2]*B[2, 1] + A[1, 3]*B[3, 1];

elif type(A,'Matrix'(3,1))and type(B,'Matrix'(1,3)) then
dp:=A[1, 1]*B[1, 1] + A[2, 1]*B[1, 2] + A[3, 1]*B[1, 3];

end if;
print("if = 0 coincident");
return dp
end proc,

proc(A::{Matrix(1,3),list})
option overload;
description "convert to/from cartesian";
if type(A,'Matrix'(1,3)) and A[1,3]<>0 then
[A[1,1]/A[1,3],A[1,2]/A[1,3]];
elif A::list then
<<A[1]|A[2]|1>>;
end if;
end proc,

proc(A::{Matrix(3,1)},{vars:=[x,y]})
option overload;
description "convert to expression";

A[1,1]*vars[1]+A[2,1]*vars[2]+A[3,1];

end proc
 

]):

p1:=<<1|2|4>>:p2:=<<3|-5|7>>:p3:=a*p1-b*p2:

L1:=<<5,7,-8>>:L2:=<<-1,4,-6>>:

L3:=ProjCp(p1,p2)

"line thro' points"

 

L3 := Matrix(3, 1, {(1, 1) = 34, (2, 1) = 5, (3, 1) = -11})

(17)

ProjCp(L1,L2)

"intersect point"

 

Matrix([[-10, 38, 27]])

(18)

ProjCp(p1,L3)

"if = 0 coincident"

 

0

(19)

ProjCp(L3,p1)

"if = 0 coincident"

 

0

(20)

ProjCp(ProjCp(p1,p2),p3)

"line thro' points"

 

"if = 0 coincident"

 

0

(21)

Cartlist:=ProjCp~([p1,p2,p3])

[[1/4, 1/2], [3/7, -5/7], [(a-3*b)/(4*a-7*b), (2*a+5*b)/(4*a-7*b)]]

(22)

ProjCp~(Cartlist)

[Matrix(1, 3, {(1, 1) = 1/4, (1, 2) = 1/2, (1, 3) = 1}), Matrix(1, 3, {(1, 1) = 3/7, (1, 2) = -5/7, (1, 3) = 1}), Matrix(1, 3, {(1, 1) = (a-3*b)/(4*a-7*b), (1, 2) = (2*a+5*b)/(4*a-7*b), (1, 3) = 1})]

(23)

ProjCp~([L1,L2,L3])

[5*x+7*y-8, -x+4*y-6, 34*x+5*y-11]

(24)

 

 

 

 

 

 

 


 

Download 2024-08-16_Projective_Vectors_as_Matrices.mw

What are the best techniques/tools/functions for rendering tabular data in more human-friendly ways within the Maple graphical user interface?

I work with large tables that would be too long to render completely in the interface, and doing so would not be an effective way to represent the data to readers of a Maple Document. However, rendering subsets of the data with headers, captions, colors, and footnotes would be beneficial. It would also be helpful to ensure each data type, such as dates, integers, and strings, was rendered appropriately. Ideally, the table would be rendered with sizing to fit the data rather than always the full width of the Maple Document.

Subsetting the data seems to be straightforward by indexing against the underlying variable. However, the operations available to define the rendering are unclear.

I see that the "Maple 2024 Help" includes documentation for "DocumentTools,Layout,Table." This appears to be the function to focus on specifically, and the DocumentTools Package seems to be the Package where control over layout is provided. Is this the only Package and Function to focus on, or are there alternative techniques?

Hello

I need to use the Ritt algorithm to find the characteristic sets of a set of differential equations. In the past, it seems there was a Maple package by D. Wang available through Maple Applications, but this no longer appears to be the case. I managed to download an old set of files from the author’s site, dated February 1996, which is a Maple V3 package. The instructions in the Readme file mention that using the provided Makefile, an m-file containing all the functions will be created, which can then be loaded into Maple. Unfortunately, running make -f Makefile did not create anything, so I am wondering if I could get some assistance on how to convert this package to something compatible with the latest Maple releases.

The source (txt) files are structured as follows:

Example: 


1) Comments
2) Definition of the User functions - something like

 

dcharsets[dcharset] := proc() `charsets/d_charset`(args) end:

dcharsets[dmcharset] := proc() `charsets/d_mcharset`(args) end:

dcharsets[dcs] := proc() `charsets/d_charser`(args) end:

dcharsets[dmcs] := proc() `charsets/d_mcs`(args) end:

dcharsets[dics] := proc() `charsets/d_ics`(args) end:

and

read `charsets.m`:

# set of non-zero remainders of d-polys in ps wrt d-ascending set as
#       user level function
`charsets/d_remset` :=

subs(`charsets/class`=`charsets/d_class`,
     `charsets/remseta`=`charsets/d_remseta`,
     `charsets/premas`=`charsets/d_premas`,op(`charsets/remset`)):

and lots of Maple procedures - Example below

 

`charsets/d_charset` := proc(ps,lst,medset)

....

end:

the source file ends with the following lines.

read dhelp;
save `dcharsets.m`:
quit

Many thanks

 

Note: Before posting this question here, I tried to contact the author but received no response.

Hi,
 i observe this error as if a sum() was used instead of a add() in dsolve

> assume(g > 0): dsolve({diff(r(t), t$2) + g * t * r(t), r(0) = r0, D(r)(0) = r1},  r(t));
Error, (in dsolve) unsupported type of index, _a

any help or advice, please ?

Sincerely.

I do not think I ever saw this warning messages from dsolve. This is _Clairaut first order ode. When adding the option singsol=all in the dsolve call, Maple replies with 

I do not have earlier version of Maple to try as my C: drive died and lost all my Maple's installed versions. I need to to try to install older version of Maple sometime and check.

Is this new warning and why does it show? Is this suppose to happen? 


 

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1782 and is the same as the version installed in this computer, created 2024, August 8, 16:5 hours Pacific Time.`

restart;

ode:=a*(1 + diff(y(x), x)^3)^(1/3) + x*diff(y(x), x) - y(x) = 0;

a*(1+(diff(y(x), x))^3)^(1/3)+x*(diff(y(x), x))-y(x) = 0

dsolve(ode,y(x),singsol=all)

Warning, only 1 systems are considered

Warning, only 1 systems are considered

y(x) = a*(c__1^3+1)^(1/3)+x*c__1

 


 

Download strange_warning_message_from_dsolve.mw

I also noticed these warning messages show up only the first time dsolve is called on this ode.

Calling it again right after, using the same command, the warning messages no longer show up, which is  even more strange.

 

I noticed very serious problem in Maple 2024.1

This is new windows 10  22H2  installation. With Maple 2024.1. I've only seen this using Maple and no other windows applications. I have 2 monitors and NVIDIA GeForce RTX 3060 graphics card.

What happens is that sometimes (may be 2-3 times each day), Maple frontend gets all mangled up. I could not figure what causes it. it could be when I move the window from one terminal to the other. sometimes it happens when I open a debugger window.

Only way to fix this is to close all of Maple and start it again. 

Just wondering if anyone seen anything like this and what can cause it. Again, it is only Maple that shows this problem, no other windows application does this. Have 128 GB Ram and PC is only 2 years old.

This is the very first time I see this in Maple and used Maple for long time and on this same PC before and had two terminals also before all the time. I have no idea what causes it.

Could it be Java problem in Maple 2024.1 ?

Any idea why calling solve(eqs,unknowns) gives Error, (in is/internal) type does not exist when the unknowns are in a set, but the error goes away when the unknowns are in a list? Is this expected or is this a bug?


 

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1779 and is the same as the version installed in this computer, created 2024, July 25, 8:56 hours Pacific Time.`

restart;

eqs:={0 = ln(2)+ln(-a*sech(1/2*2^(1/2)*b)^2), 1 = -tanh(1/2*2^(1/2)*b)*a^(1/2)*2^(1/2)};
unknown:={a, b};

{0 = ln(2)+ln(-a*sech((1/2)*2^(1/2)*b)^2), 1 = -tanh((1/2)*2^(1/2)*b)*a^(1/2)*2^(1/2)}

{a, b}

solve(eqs,unknown)

Error, (in is/internal) type `a` does not exist

solve(eqs,unknown)

Error, (in is/internal) type `a` does not exist

restart;

eqs:=[0 = ln(2)+ln(-a*sech(1/2*2^(1/2)*b)^2), 1 = -tanh(1/2*2^(1/2)*b)*a^(1/2)*2^(1/2)];
unknown:={a, b};

[0 = ln(2)+ln(-a*sech((1/2)*2^(1/2)*b)^2), 1 = -tanh((1/2)*2^(1/2)*b)*a^(1/2)*2^(1/2)]

{a, b}

solve(eqs,unknown)

Error, (in is/internal) type `a` does not exist

restart;

eqs:=[0 = ln(2)+ln(-a*sech(1/2*2^(1/2)*b)^2), 1 = -tanh(1/2*2^(1/2)*b)*a^(1/2)*2^(1/2)];
unknown:=[a, b];

[0 = ln(2)+ln(-a*sech((1/2)*2^(1/2)*b)^2), 1 = -tanh((1/2)*2^(1/2)*b)*a^(1/2)*2^(1/2)]

[a, b]

solve(eqs,unknown)

[]

 


 

Download is_internal_error_from_solve_maple_2024_1.mw

Update

Reported to Maplesoft support.

 

Something seems to have changed.  I do not now have Maple 2024.0 to check or earlier Maple's as I have to reinstall windows since my C:\ drive died. 

I installed Maple 2024.1 new on windows 10 home edition.

I noticed now when evaluating the current cell, the cursor automatically jumps to next cell, which is what I want and how Maple always worked.

But now the cursor jumps to the end of the command in the next cell. Before, I could swear that not how it worked and it used to jump to the start of the next cell.

This makes it very confusing, as I keep looking for where the cursor is now.

Why was this changed in 2024.1? I looked at option and see nothing to change this. 

Here is worksheet and small movie. 

This is my display options

 


 

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

x:=1;

1

y:=3;

3

z:=4;

4

h:=4;

4

 


 

Download cursor_jump_to_end_of_line.mw

 

 

Update

I tried to change the cursor size and thickness in windows 10 itself (using settings->Ease of access->Text cursor) and made it much bigger and restarted Maple but this had no effect. Cursor inside Maple remained the same.

I was hoping if there is a way to make the cursor bigger then this will make it easier to see where it jumped to when hitting enter.

It is bad, since the Maple cursor jumps to random places in the next cell. sometimes it jumps to the middle of the code in the next cell when there are more than one line there.

Here is a movie. Notice how it jumped to the start of the second line now in next cell in one case and not to the end of the code.

I can't believe no one at Maplesoft have noticed this and is able to fix it. This is ridiculous behavior. I spend few seconds each time I hit enter looking for where the cursor has landed as I keep looking at start of the next cell and it is not there. I could have 10-20 lines of code in one cell and have too look to find where the cursor is hidden in these 20 lines.

It natural for one to look for where the cursor is when woking and this makes it annoying. Hopefully someone can find a way to tell Maple to bring the old behaviour back where cursor jumps always to the start of the next cell.

 

 

 

 

I am using the smart plot (i.e plot without giving the x=from..to) since I am generating these plots programmatically and better let Maple figure the best range to use.

But found Maple hangs on some solutions.

Here is an example

restart;
sol:=1/2/cos(x)*(sin(x)^2+(sin(x)^4+36*cos(x))^(1/2));
plot(sol);

I waited for 30 minutes and nothing happened.

If I change the above command to 

plot(sol,x=-Pi..Pi);

then it finishes instantly. It looks like Maple is stuck trying to find correct x and y ranges to use.

Is this known limitation  or smart plot or is this a bug?

Maple 2024.1 on windows 10.

 

sometimes (not often) I get this pop-up window when I open new worksheet and run something first time in it.

And it can last for 10-20 seconds until connection is made.

I have my preferences set to  create new engine for each worksheet.

The strange thing when this happened now, is that I only had 4 worksheets open and was not running anything in any of them. So Maple was not "busy". Task manage showed 8 mservers.exe processes on it at the time. Which is not unormal.

I have 128 GB and PC was not busy at the time this happened.

Any idea what can cause this to happen?

Windows 10 home edition, Maple 2024.1

Hi 

I teach Pre-Calulus High School level, and our school recently upgraded to Maple 2024. Like in Maple 2023 we use Assistant-Tools-import DATA and chosing an Excel file from which to import to do regression on.  In the new 2024 we have experienced, that Maple cannot read in DATA, meaning it cannot read column of DATA into a Maple document. However if we copy into Excel document on the machine locally, then there is no issue and the data is imported. 

Any idear what can cause this?  

I just saw that Maple 2024 no longer supports importing Quandl data.

If this is a feature that I will like to use, it is possible to keep both Maple 2023 and Maple 2024 installed at the same time on Microsoft Windows 11 without conflicts?  Or should I just not upgrade to Maple 2024?  I currently have a perpetual license for Maple 2023 and am on the 15-day trial for Maple 2024.

I just installed the 15-day trial for the new Maple 2024.  It looks like Maple 2024 has the same problem as Maple 2023 in that it will not maintain a connection to MapleCloud.  I can sign in to MapleCloud no problem but as soon as I close the window, it forgets my password and I have to log back in each time I want to access MapleCloud.  Is there a way for Maple 2023 or Maple 2024 to remember my Maplesoft password so I do not have to log back in every time I want to access MapleCloud?

I called dsolve with timelimit on this ode.  All of Maple instantly locks up.

I do not mean the worksheet, but everything. I have each worksheet using its own engine,. Not able to open new worksheet, nothing clicks. The whole front end locks up. Can't click on anything. 

Killing every mserver.exe does not even resolve this. I had to terminate all of Maple from the task manager. The strange thing, is that looking at task manager I see mserver.exe doing nothing. zero CPU. Only the front end process is at high CPU (the one with the Java icon).  It looks like the Java frontend is locked up for some reason.

 

Do others see the same thing? does this happen on the mac also? Please make sure to save all your work before trying to run this on your PC.

Maple 2024.1 on windows 10. This is first order Riccati ode.

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1774 and is the same as the version installed in this computer, created 2024, July 16, 17:18 hours Pacific Time.`

ode:=(a2*x^2+b2*x+c2)*diff(y(x),x)=y(x)^2+(a1*x+b1)*y(x)+a0*x^2+b0*x+c0;

(a2*x^2+b2*x+c2)*(diff(y(x), x)) = y(x)^2+(a1*x+b1)*y(x)+a0*x^2+b0*x+c0

DEtools:-odeadvisor(ode);

[_rational, _Riccati]

#WARNING. This will freeze all of Maple.
timelimit(30,dsolve(ode));


Download maple_lock_up_july_17_2024.mw

These are GUI options on my end.

 

 

 

 

UPDATE 1

in Maple 2023.2 also on windows 10,  there is no lock up at all. same code. The solution to the ode is very large. I tried using both typesetting level  to EXTENDED  and  typesetting level MAPLE STANDARD and no hang.

I wonder if this has something to do with why Maple 2024.1 locks up? But I have not changed anything in my end. I made no change in options or anything else. same PC, same graphics card. 

UPDATE 2

Found the BUG!!  

In Maple 2024.1, if I change the display option typesetting level  to EXTENDED, the front end do not hang.

If I change the display typesetting level MAPLE STANDARD, the ftont end hangs.

But why??


 

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1774 and is the same as the version installed in this computer, created 2024, July 16, 17:18 hours Pacific Time.`

ode:=(a2*x^2+b2*x+c2)*diff(y(x),x)=y(x)^2+(a1*x+b1)*y(x)+a0*x^2+b0*x+c0;

(a2*x^2+b2*x+c2)*(diff(y(x), x)) = y(x)^2+(a1*x+b1)*y(x)+a0*x^2+b0*x+c0

DEtools:-odeadvisor(ode);

[_rational, _Riccati]

interface(typesetting=extended):

timelimit(30,dsolve(ode));

`[Length of output exceeds limit of 1000000]`

interface(typesetting=standard):

#WARNING, this will hang MAPLE now. WHY??
timelimit(30,dsolve(ode));


 

Download maple_lock_up_july_17_2024_2.mw

ps. Reported to Maplesoft support. July 17, 2024. Hopefully this will be fixed in Maple 2024.2

 

I was working with a Dataframe when I wanted to change the datatype of multiple columns at the same time as this is quite a large dataframe. I found in the helpfile that I can change datatype by the following command: 

SubsDatatype(Data, plts, float) which then change the datatype of "plts" into float. I had hoped that using multiple columns in the command would work in this way: SubsDatatype(Data, [plts, act], float)  but apparently not. Is there a way to do this or do I have to do it column by column?

Additionally I have another question about dataframes. I would like to replace "0" in the dataframe by a "blank" as you can do in excel. How do you do this in a dataframe?

Thanks in advance for any help given!

5 6 7 8 9 10 11 Last Page 7 of 43