Maple 2025 Questions and Posts

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

I am finding many problems using overload in OOP.

But for starter, here is a basic one that does not use Object. Will make separate question for other issues once I figure this basic one out.

I have overload with two procs.

First proc takes 2 arguments of type string, and the second proc one argument also of type string.

When calling the overloaded proc with one argument or two arguments, it always calls the first one which takes 2 arguments.

It never calls the second, even though the call is using one argument only. It always matchs the first proc.

It seems Maple just checks if the first argument match and stops.

I also made sure to use $ for end of arguments flag.

Now when changing the order and putting as the first proc the one that take one argument and the second proc which takes two arguments, now it works. Maple calls the correct proc based on the number of arguments.

How could this be possible? Is order of procs in overload important?? How does one then figure the correct order. It should be based on match of signature of proc, not the order. i.e. match made based on number and type of arguments. 

Is there a way to make the first one work as is without having to worry about order? Or Am I making mistake somewhere?

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

restart;

set_name :=overload(
        [     
            proc(first_name::string,last_name::string,$) option overload;
                print("in proc which takes two arguments");
            end,
       
            proc(the_name::string,$) option overload;
                 print("in proc which takes one argument");
            end          
        ]
    ):

set_name("me"); #why this call the first proc and not the second?

"in proc which takes two arguments"

set_name("me","joe");

"in proc which takes two arguments"

restart;

#change order of procs in list
set_name :=overload(
        [            
            proc(the_name::string,$) option overload;
                 print("in proc which takes one argument");
            end,      

            proc(first_name::string,last_name::string,$) option overload;
                print("in proc which takes two arguments");
            end       
        ]
    ):

set_name("me");

"in proc which takes one argument"

set_name("me","joe");

"in proc which takes two arguments"

 

 

Download why_order_makes_differenence_in_overload_nov_1_2025.mw

For instance, I would like to represent “3^(1/3)” and “4^(1/4)” respectively as elements of the field generated by “3^(1/3) + 2^(1/2) + 1^(1/1)”. 
I think the Algebraic package and the evala procedure should already offer a direct command, but I couldn't find it. The following results are computed by SymPy's `to_number_field` function: 

-48/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^5 + 
 213/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^4 - 
 52/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^3 - 
 174/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^2 - 
 232/755*(3^(1/3) + 2^(1/2) + 1^(1/1)) + 
 277/151: # originally computed by SymPy's `to_number_field`
is(3^(1/3) = %);
                              true

48/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^5 - 
 213/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^4 + 
 52/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^3 + 
 174/755*(3^(1/3) + 2^(1/2) + 1^(1/1))^2 + 
 987/755*(3^(1/3) + 2^(1/2) + 1^(1/1)) - 
 428/151: # originally computed by SymPy's `to_number_field`
is(4^(1/4) = %);
                              true

Does there exist a direct command in Maple to find the above representations? 

Has anyone had any success in turning off the scrollable matrix feature on Mac? I found the post

 https://www.mapleprimes.com/questions/238061-How-To-Disable-The-New-Scrollable-Matrices

and tried to follow the steps outlined by Acer, but I cannot get it to work. Specifically, I greated a preference file at the location:

 //Users/$USER/Library/Preferences/Maple/<version>/Maple preferences which has the statement 

ScrollableMathTableOutput=false

Any success stories, or tips, will be greatly appreciated. 

Thanks. 

Although several similar problems were asked many years ago (see, e.g., the section “Formal linear algebra” here), there appears to be no new progress so far. It is said that such functionalities exists in the Physics package, but I cannot find any corresponding examples. 
In short, can Maple at present calculate these examples in terms of symbolic array constructs completely automatically?

In Maple 2025.1, why don't all the hotkeys show up when I press the Alt key?

Maple 2025.0 is OK,but update to 2025.1 all the hotkeys don't show up when I press the Alt key.Why?

Hello Maple Community,

I'm working on solving a PDE system for fluid flow in an L-shaped cavity (similar to previous work on H-shaped and square domains ) recently asked by some one here. I've implemented the governing equations in Maple but need help generating contour plots.

I'm attaching:
1. My Maple worksheet l_shape_cavity.mw
2. A PDF with the problem description and equations L_shape_cavity_work.pdf

The main issues I'm facing are:
- Setting up proper boundary conditions for the L-shaped domain
- Generating contour plots for velocity and pressure fields
- Ensuring the solution converges properly

Could you please help me with:
1. Correct implementation of the L-shaped domain geometry
2. Generating proper contour plots
3. Any suggestions for improving the numerical solution

Thank you for your assistance!

In Maple 2025 we are having problems with units.

In Maple 2024 we did not see same errors. Maple sheets working with Maple 2024 does not run in Maple 2025.

In Maple 2025, some units which are f.x. obviously 'J' is not recognices as 'J'.

In Maple 2025, part of units dissapears from expressions.

Just an example; the function v(t) below has correct units m/s, but when using simplify, the unit is changes to m

The Maple file: Error_with_units.mw

Solving an ode, dsolve says it used exact method and gives two solutions as result (correct result).

But when asking dsolve to solve same ode but now specifying that it uses exact method (i.e. same one it used itself before), now it gives one solution only, not two as before.

Why is that? Should not both commands give same result? i.e. two solutions?

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

SupportTools:-Version()

`The Customer Support Updates version in the MapleCloud is 29 and is the same as the version installed in this computer, created June 23, 2025, 10:25 hours Eastern Time.`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1881 and is the same as the version installed in this computer, created 2025, October 7, 16:4 hours Pacific Time.`

restart;

ode:=3*y(x)^3*x^2+y(x)^4+(3*x^3*y(x)^2+y(x)^4+4*x*y(x)^3)*diff(y(x),x) = 0;
DEtools:-odeadvisor(ode);
infolevel[dsolve]:=5:

3*y(x)^3*x^2+y(x)^4+(3*x^3*y(x)^2+y(x)^4+4*x*y(x)^3)*(diff(y(x), x)) = 0

[_exact, _rational]

sol:=dsolve(ode); #gives two solutions

Classification methods on request

Methods to be used are: [exact]

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

* Tackling ODE using method: exact

--- Trying classification methods ---

trying exact

<- exact successful

y(x) = 0, x*y(x)^4+x^3*y(x)^3+(1/5)*y(x)^5+c__1 = 0

maple_sol:=dsolve(ode,[exact]);  #why y=0 solution do not show here??

Classification methods on request

Methods to be used are: [exact]

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

* Tackling ODE using method: exact

--- Trying classification methods ---

trying exact

<- exact successful

x*y(x)^4+x^3*y(x)^3+(1/5)*y(x)^5+c__1 = 0

sol:=dsolve(ode); #gives two solutions again

Classification methods on request

Methods to be used are: [exact]

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

* Tackling ODE using method: exact

--- Trying classification methods ---

trying exact

<- exact successful

y(x) = 0, x*y(x)^4+x^3*y(x)^3+(1/5)*y(x)^5+c__1 = 0

 

 

Download why_different_solutions_maple_2025_1_oct_22_2025.mw

When solution was obtained using earlier call to solve with _EnvAllSolutions := true: set, then odetest givens internal error.

When _EnvAllSolutions := false: then no error.

Why? And is there a workaround so I can use _EnvAllSolutions := true: but have odetest still work?

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1881 and is the same as the version installed in this computer, created 2025, October 7, 16:4 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 29 and is the same as the version installed in this computer, created June 23, 2025, 10:25 hours Eastern Time.`

 

Example fail when using _EnvAllSolutions := true:

 

restart;

kernelopts('assertlevel'=2):

ode:=diff(y(x),x) = ln(1+y(x)^2);
IC:=y(0)=0;
x0:=0;
sol:=y(x) = -sqrt(-1 + exp(RootOf(-Intat(-1/(2*tau*sqrt(-1 + exp(tau))*exp(-tau)), tau = _Z) + x + _C2)));

eq:=0=eval(rhs(sol),x=x0);
_EnvAllSolutions := true:
_EnvExplicit := true:
sol_C:=_C2=solve(eq,_C2);
sol:=eval(sol,sol_C);
odetest(%,[ode,IC])

diff(y(x), x) = ln(1+y(x)^2)

y(0) = 0

0

y(x) = -(-1+exp(RootOf(-Intat(-(1/2)/(tau*(-1+exp(tau))^(1/2)*exp(-tau)), tau = _Z)+x+_C2)))^(1/2)

0 = -(-1+exp(RootOf(-Intat(-(1/2)/(tau*(-1+exp(tau))^(1/2)*exp(-tau)), tau = _Z)+_C2)))^(1/2)

_C2 = Intat(-(1/2)*exp(tau)/(tau*(-1+exp(tau))^(1/2)), tau = (2*I)*Pi*_Z1)

y(x) = -(-1+exp(RootOf(-Intat(-(1/2)/(tau*(-1+exp(tau))^(1/2)*exp(-tau)), tau = _Z)+x+Intat(-(1/2)*exp(tau)/(tau*(-1+exp(tau))^(1/2)), tau = (2*I)*Pi*_Z1))))^(1/2)

Error, (in series/csgn) assertion failed

 

Example Works  when using _EnvAllSolutions := false:

 

restart;

kernelopts('assertlevel'=2):

ode:=diff(y(x),x) = ln(1+y(x)^2);
IC:=y(0)=0;
x0:=0;
sol:=y(x) = -sqrt(-1 + exp(RootOf(-Intat(-1/(2*tau*sqrt(-1 + exp(tau))*exp(-tau)), tau = _Z) + x + _C2)));

eq:=0=eval(rhs(sol),x=x0);
_EnvAllSolutions := false:
_EnvExplicit := true:
sol_C:=_C2=solve(eq,_C2);
sol:=eval(sol,sol_C);
odetest(%,[ode,IC])

diff(y(x), x) = ln(1+y(x)^2)

y(0) = 0

0

y(x) = -(-1+exp(RootOf(-Intat(-(1/2)/(tau*(-1+exp(tau))^(1/2)*exp(-tau)), tau = _Z)+x+_C2)))^(1/2)

0 = -(-1+exp(RootOf(-Intat(-(1/2)/(tau*(-1+exp(tau))^(1/2)*exp(-tau)), tau = _Z)+_C2)))^(1/2)

_C2 = Intat(-(1/2)*exp(tau)/(tau*(-1+exp(tau))^(1/2)), tau = 0)

y(x) = -(-1+exp(RootOf(-Intat(-(1/2)/(tau*(-1+exp(tau))^(1/2)*exp(-tau)), tau = _Z)+x+Intat(-(1/2)*exp(tau)/(tau*(-1+exp(tau))^(1/2)), tau = 0))))^(1/2)

[RootOf(Intat(exp(tau)/(tau*(-1+exp(tau))^(1/2)), tau = _Z)+2*x-Intat(exp(tau)/(tau*(-1+exp(tau))^(1/2)), tau = 0))-ln(exp(RootOf(Intat(exp(tau)/(tau*(-1+exp(tau))^(1/2)), tau = _Z)+2*x-Intat(exp(tau)/(tau*(-1+exp(tau))^(1/2)), tau = 0)))), 0]

 

 

 

 

Download odetest_fail_when_using_envAllsol_maple_2025_1_oct_21_2025.mw

The nice addition added to Maple 2022 in this  post made it clear that c__1 and _C1 are the same under the cover.

But then why in Maple 2025.1 it does not give this?

I found this when I was trying to find constants of integrations in solution of an ode, and used 

                 indets(sol,And(symbol, suffixed(_C, nonnegint))); 

Which did not find the constants of integration, since I happened to have typed the solution using c__1 and not _C1, but I thought they are the same.

Did something change or I still dont understand well the difference between c__1 and _C1 ?

Worksheet below.

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 29 and is the same as the version installed in this computer, created June 23, 2025, 10:25 hours Eastern Time.`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1881 and is the same as the version installed in this computer, created 2025, October 7, 16:4 hours Pacific Time.`

restart;

sol:= y(x)=-cos(x)/2+sin(x)/2+c__1*exp(-x);
indets(sol,And(symbol, suffixed(_C, nonnegint)));

y(x) = -(1/2)*cos(x)+(1/2)*sin(x)+c__1*exp(-x)

{}

sol:= y(x)=-cos(x)/2+sin(x)/2+c__1*exp(-x);
indets(sol,And(symbol, suffixed(c__, nonnegint)));

y(x) = -(1/2)*cos(x)+(1/2)*sin(x)+c__1*exp(-x)

{c__1}

sol:= y(x)=-cos(x)/2+sin(x)/2+_C1*exp(-x);
indets(sol,And(symbol, suffixed(c__, nonnegint)));

y(x) = -(1/2)*cos(x)+(1/2)*sin(x)+_C1*exp(-x)

{}

sol:= y(x)=-cos(x)/2+sin(x)/2+_C1*exp(-x);
indets(sol,And(symbol, suffixed(_C, nonnegint)));

y(x) = -(1/2)*cos(x)+(1/2)*sin(x)+_C1*exp(-x)

{_C1}

c__1 - _C1

c__1-_C1

addressof(c__1);

36893628553737883996

addressof(_C1);

36893628553623934140

Download why_c1_and_C1_not_same_oct_19_2025.mw

Update

Found out why. This only works if one calls dsolve() first.  Here is an example

sol:=dsolve(diff(y(x),x)=x)

y(x) = (1/2)*x^2+c__1

c__1 - _C1;

0

indets(sol,And(symbol, suffixed(_C, nonnegint)));

{c__1}

restart;

my_sol:=y(x)=(x^2)/2+c__1;

y(x) = (1/2)*x^2+c__1

c__1 - _C1;

c__1-_C1

indets(my_sol,And(symbol, suffixed(_C, nonnegint)));

{}

 

 

Download why_c1_and_C1_not_same_oct_19_2025_V1.mw

But this is really confusing. c__1 before calling dsolve is not the same as c__1 after calling dsolve.

It will be better if Maple is changed such that these work the same all the time without having to call dsolve() first.

With the new ribbon interface (and startup-page disabled) I need to open a new worksheet to make opening files by the recent document menu work.

Can someone reproduce this?

Maple help does not have an example I could find showing the right way to call method, which is meant to be called only from the constructor the object, before the object is fully build.

Help page does not have such example.

This worksheet shows 3 possible ways to do this. All seem to work fine. I am sure one can come up with more variations.

The question is, which one of these calls is the "right" way?

The method called from the constructor in this example is called process_age().

If someone knows an official Maple documentation showing one example of calling  a proc from constructor that will also help.

Version 1

 

restart;

module person()
   option object;

   local _name::string;
   local _age::posint;

   export ModuleCopy::static := proc( _self, proto::person,
        name::string,age::posint,$)
        _name:=name;
        _age:=process_age(age);
   end proc;

   local process_age:=proc(age::posint,$)::posint;
         age+1;
   end proc;

   export get_age::static:=proc(_self,$)::posint;
          _age;
   end proc;
end module;

module person () local _name::string, _age::posint, process_age; option object; end module

o:=Object(person,"me",99);
o:-get_age()

module person () local _name::string, _age::posint, process_age; option object; end module

100

 

 

Version 2

 

restart;

module person()
   option object;

   local _name::string;
   local _age::posint;

   export ModuleCopy::static := proc( _self, proto::person,
        name::string,age::posint,$)
        _name:=name;
        _age:=process_age(age);
   end proc;

   local process_age::static:=proc(age::posint,$)::posint;
         age+1;
   end proc;

   export get_age::static:=proc(_self,$)::posint;
          _age;
   end proc;
end module;

module person () local _name::string, _age::posint; option object; end module

 

o:=Object(person,"me",99);
o:-get_age()

module person () local _name::string, _age::posint; option object; end module

100

 

 

Version 3

 

restart;

module person()
   option object;

   local _name::string;
   local _age::posint;

   export ModuleCopy::static := proc( _self, proto::person,
        name::string,age::posint,$)
        _name:=name;
        _age:=_self:-process_age(age);
   end proc;

   local process_age::static:=proc(_self,age::posint,$)::posint;
         age+1;
   end proc;

   export get_age::static:=proc(_self,$)::posint;
          _age;
   end proc;
end module;

module person () local _name::string, _age::posint; option object; end module

 

 

o:=Object(person,"me",99);
o:-get_age()

module person () local _name::string, _age::posint; option object; end module

100

 

 

Download correct_way_to_call_method_from_constructor_oct_17_2025.mw

Help page for structured types shows examples where they add delayed quotes around things. For example

So I started writing  'specfunc(anything,y)' instead of just  specfunc(anything,y). Only to find this breaks things when used inside a proc.

Here is an example.

restart;

#here it worksheetdir
IC:=y(x)=0;
indets(IC,'specfunc(anything,y)');      

y(x) = 0

{y(x)}

#inside proc, same code fail
foo:=proc(func::function(name),IC::`=`)
    local y::symbol:=op(0,func);
    indets(IC,'specfunc(anything,y)');
end proc:
 

foo(y(x),y(x)=0)

{}

 

 

Removing the quotes, it now works

restart;

#here it worksheetdir
IC:=y(x)=0;
indets(IC,'specfunc(anything,y)');      

y(x) = 0

{y(x)}

#inside proc, same code fail
foo:=proc(func::function(name),IC::`=`)
    local y::symbol:=op(0,func);
    indets(IC,specfunc(anything,y));
end proc:
 

foo(y(x),y(x)=0)

{y(x)}

 

 

Download delayed_vs_not_v2.mw

Download delayed_vs_not.mw

It took me 2 hrs debugging to find this, as when I copied code which was working in my worksheet to my function, it stopped working and did not know why.

So for now, I will not use quotes around specfunc or any others like the help page shows in its examples.

Is there a rule of thumb to follow here? The help page is very inconsistent. It shows some examples with quotes around and some without. Makes it hard to know why and when to add the delayed quotes. It seems arbitrary.

I gave up on this. I know how to find all normal derivatives such as diff(y(x),x) and diff(y(x),x$2) so on in expression. 

But now I want to find all those used for initial conditions, which do not have x in them. This makes it harder.

These have the form   D(y)(0) or (D@@2)(y)(1) and so on.

I tried indets and select and many other things, but can't figure how to tell Maple to find these in expression. Here is an example.

Given

expr:=y(3)+y(8)+5*(D@@2)(y)(4)+Pi+3*exp(2)+77*D(y)(0)+1/(D@@4)(y)(7);

I'd like to get list that has in it only the derivatives and nothing else, anywhere they show, which will be

{(D@@2)(y)(4) , D(y)(0) , (D@@4)(y)(7) }

some of the things I tried are

indets(expr,'satisfies'(s->op(0,s)=(D@@n)(y) and n::integer) );
indets(expr,'specfunc(anything, D)');
indets(expr,'specfunc(anything, (D@@anything)(y))');

And many more. I still struggle with structured types in Maple.

In the above, we can assume the dependent variable is always same which is the 'y' symbol.

I can do the above using patmatch. But I am trying to move away from that in Maple and use types.

For reference, this is what I do using another software. I am trying to do the same in Maple, but using structured types and not patmatch.

Iam sure there is a way to do this in Maple using structured types, but so far not able to figure the syntax needed.

Maple 2025.1

I use the tab key to control the formatting of lists. 

On my computer the tab key spacing under Maple 2025 is a little more than one inch which is too much. I have been through the Maple Help and cannot find how to change the tab key spacing.

Any help will be greatly appreciated.

My current account email is dead so I can only view answers here.

1 2 3 4 5 6 7 Last Page 1 of 12