Maple 2025 Questions and Posts

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

A colleage asked me for the solution of an elementary boundary value problem for an ODE that models the steady-state temperature distribution in a nonhomogeneous rod.  I solved it in Maple and passed the solution on to her without checking the result.  She struggled for a day or two, attempting to "debug" her finite element code whose result was not agreeing with Maple's.

Upon closer inspection, it turned out that her code was correct and the solution returned by Maple was not.  Here are the details.  I can't tell whether Maple's dsolve can be improved to provide correct solutions to this and similar problems.

Problem with dsolve()

restart;

kernelopts(version);

`Maple 2025.0, X86 64 LINUX, Mar 24 2025, Build ID 1909157`

A boundary value problem for an ODE

 

Let's solve the following boundary value problem:

de := Diff(a(x)*Diff(u(x),x),x) = -1;

Diff(a(x)*(Diff(u(x), x)), x) = -1

bc := u(-1)=0, u(1)=0;

u(-1) = 0, u(1) = 0

Maple's dsolve() fails to find a solution:

dsolve({de,bc});

 

Solution obtained by hand

 

The solution may be obtained by hand, as follows.

 

Integrate the DE once

a(x)*(diff(u(x), x)) = c-x.

where c is the integration constant.  Therefore

diff(u(x), x) = (c-x)/a(x) and (c-x)/a(x) = c/a(x)-x/a(x).

To determine the value of the constant c, integrate the above over [-1, 1]

and apply the boundary conditions:

c*(int(1/a(x), x = -1 .. 1))+int(x/a(x), x = -1 .. 1) = u(1)-u(-1) and u(1)-u(-1) = 0

whence
c = (int(x/a(x), x = -1 .. 1))/(int(1/a(x), x = -1 .. 1)).

Having thus determined c, we integrate the expression for diff(u(x), x) obtained above, and arrive at the solution
u(x) = int((c-xi)/a(xi), xi = -1 .. x).

Remark: The solution obtained here is valid for any a(x) as long as

the integrals encountered above make sense.  Note that there is
no requirement on the differentiability or even continuity of a(x).

Technically, a(x) can be any function such that 1/a(x) is integrable.

 

 

Wrong solution returned by dsolve()

 

Let us consider a special choice of the coefficient a(x):

a := x -> 1 + 2*Heaviside(x);

proc (x) options operator, arrow; 1+2*Heaviside(x) end proc

According the the calculations above, we have:

c := int(x/a(x),x=-1..1) / int(1/a(x),x=-1..1) ;

-1/4

and therefore the correct solution is

int((c-xi)/a(xi), xi=-1..x):
sol := u(x) = collect(%, Heaviside);

u(x) = ((1/6)*x+(1/3)*x^2)*Heaviside(x)-(1/4)*x-(1/2)*x^2+1/4

Here is what the solution looks like:

plot(rhs(sol), x=-1..1, color=blue, thickness=3);

Let's attempt to solve the same boundary value problem with Maple's dsolve().

dsolve({de,bc}):
bad_sol := collect(%, Heaviside);

u(x) = ((1/3)*x^2+x/(3*exp(-2)+3)-exp(-2)*x/(3*exp(-2)+3))*Heaviside(x)-(1/2)*x^2-x/(3*exp(-2)+3)+(3*exp(-2)+1)/(6*exp(-2)+6)

That's very different from the correct solution obtained above.   To see the problem with it, let's recall that according to the DE, the expression a(x)*(diff(u(x), x))NULLshould evaluate to  c-x for some constant c,  but what we get through bad_sol is nothing like c-x;  in fact, it's not even continuous:

a(x)*diff(rhs(bad_sol), x):
collect(%, Heaviside, simplify);
plot(%, x = -0.5 .. 0.5);

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

It appears that dsolve goes astray by attempting to expand the expression diff(a(x)*(diff(u(x), x)), x).   It shouldn't.

 

 

Download dsolve-bug.mw

 

Hi.

So I get this ->

int(x^2, x = 0 .. a)

(1/3)*a^3

(1)

NULL


But i would like this ->

Download 5.3-Definite-Integral.mw

 

And maybe something similar for indefinite integrals.

This would really help me with education in calculus so thanks everybody.

It would appear being able to run Mapleflow worksheets in Maple is only useful to those who have Mapleflow.

Just wondering without being able to see what variables are in the mapleflow worksheet how would I know what values to pass to it?

Hi.

I have been learning Integration for calculus. I came about on output that i not know what it means.

See for yourself. ->
If anyone can help make this mess.

Thanks in advance.

sum((-2)^j/(j-2)^2, j = 3 .. n)

4*polylog(2, -2)+2^(n+1)*(1+(-2*n^2+4*n-2)*LerchPhi(-2, 2, n))*(-1)^n/(-1+n)^2

(1)

NULL

Download ex5sigma.mw

In the screen shot below taken from a 3D animation I want to vastly shrink the area I have stippled with spots (it's actually white on the worksheet).  It's outside the cube defining the 3D animation and inside the square that defines the part of the worksheet used for an image.

I get this ->

sum(i^2, i = 1 .. 5)

55``

(1)

 

But would like this ->

First impressions, I have mixed feelings - one being it's cool and new, the other feeling that it's a bit clunky.

In my opinion Maple is starting to look like the interface is being modelled after Microsoft Office, or like the ribbon toolbars of AutoCad or Inventor.  Maple's "uniqueness" is disappearing.  I rather liked the old interface. 

The toolbar icons are larger, taking up more space.

The toolbar layout is indeed simpler, but also less efficient maybe.  I mean there were more useful available icons at once before, more functional is the word I guess.  Now it might be a couple of clicks away to pull up your favorite icon(s).  The icons all look very nice, that's a plus but they could be smaller.  

Perhaps we could make a customized menu toolbar?  That is, allow users to put all the most useful icons we use or would like the most to be displayed?  This would help some of the strange organization of some of the icons and allow us to make our maple "sandbox" feel more at home. 

Where have all the tools options display / interface / Precision tabs all gone?  That is typsetting (extended or Maple standard) options
plot or font anti-aliasing (Enabled Disabled) options
plot dislpay (inline window) options
Precision (limit expression length to etc...)

What is the installation time for Maple 2025?

I looked up the installation times for Matlab and Mathematica.  The AI assistant in google says Matlab takes several minutes to an hour, for Mathematica 20 minutes to an hour, for Maple it said around 15 minutes -  Is that about right? 

It is very strange, but I cannot find in v. 2025 shortcut or a button for stoping current evaluation.

I had no problem with this in previous version, but now the absence of immediate stoping make troubles for me,

(1) The gray line above the working area is redundant.

(2) Line Style, Color, and the "Delete" key function to delete object are not working properly.

(3) IdentifySequence([1,3,5,7,9]) without the second argument does not work.

(4) IdentifySequence should first identify simple patterns (Arithmetic Progression, Geometric Progression, Arithmetic-Geometric Progression, Harmonic Progression) before attempting to find a more complex formula for the nth term of the sequence.

(5) It would be beneficial if IdentifySequence recognized sequences involving rational, irrational and symbolic numbers.

Hello,

I need to sort a list of monomials in a custom order based on two criteria:

  1. Increasing total degree (e.g., x<x^2)

  2. Lexicographic order within the same degree, using a specified variable order such as x<y<z.

For example, given the list:

L := [z^2, y*z, x*z, z, y^2, x*y, y, x^2, x, 1] 

and the variable order (which can be changed by the user):

vars := [x, y, z]; 

I would like the output to be:

[1, x, y, z, x^2, x*x, x*y, x*z, y^2, y*z, z^2]

Is there a built-in function or a recommended way to achieve this in Maple?

Thank you!

Wondering what the experts here think of this. Should not simplify have worked on this automatically? By trial and error, found that combine command is what simplified it the best.

But I think simplify should also have done the same.  

Interested to hear what others think, and why simplify (even using trig option) did not do it.   

The issue is that this is done in code, without lookin at the screen and deciding what to do based on what the expression "looks like".

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

A:=(((sin(sqrt(3)/2)*sqrt(3) - 3*cos(sqrt(3)/2))*cos(sqrt(3)*x/2) - sin(sqrt(3)*x/2)*(sqrt(3)*cos(sqrt(3)/2) + 3*sin(sqrt(3)/2)))*exp(-1/2 + x/2))/3 ;

(1/3)*((sin((1/2)*3^(1/2))*3^(1/2)-3*cos((1/2)*3^(1/2)))*cos((1/2)*3^(1/2)*x)-sin((1/2)*3^(1/2)*x)*(3^(1/2)*cos((1/2)*3^(1/2))+3*sin((1/2)*3^(1/2))))*exp(-1/2+(1/2)*x)

B:=- exp(-1/2 + x/2)*(sqrt(3)*sin(sqrt(3)*(x - 1)/2) + 3*cos(sqrt(3)*(x - 1)/2))/3;

-(1/3)*exp(-1/2+(1/2)*x)*(3^(1/2)*sin((1/2)*3^(1/2)*(x-1))+3*cos((1/2)*3^(1/2)*(x-1)))

simplify(A-B); #show these are same

0

simplify(A,trig)

-(1/3)*((-sin((1/2)*3^(1/2))*3^(1/2)+3*cos((1/2)*3^(1/2)))*cos((1/2)*3^(1/2)*x)+sin((1/2)*3^(1/2)*x)*(3^(1/2)*cos((1/2)*3^(1/2))+3*sin((1/2)*3^(1/2))))*exp(-1/2+(1/2)*x)

simplify(A)

-(1/3)*((-sin((1/2)*3^(1/2))*3^(1/2)+3*cos((1/2)*3^(1/2)))*cos((1/2)*3^(1/2)*x)+sin((1/2)*3^(1/2)*x)*(3^(1/2)*cos((1/2)*3^(1/2))+3*sin((1/2)*3^(1/2))))*exp(-1/2+(1/2)*x)

simplify(A,size)

-(1/3)*((-sin((1/2)*3^(1/2))*3^(1/2)+3*cos((1/2)*3^(1/2)))*cos((1/2)*3^(1/2)*x)+sin((1/2)*3^(1/2)*x)*(3^(1/2)*cos((1/2)*3^(1/2))+3*sin((1/2)*3^(1/2))))*exp(-1/2+(1/2)*x)

simplify(normal(A))

-(1/3)*((-sin((1/2)*3^(1/2))*3^(1/2)+3*cos((1/2)*3^(1/2)))*cos((1/2)*3^(1/2)*x)+sin((1/2)*3^(1/2)*x)*(3^(1/2)*cos((1/2)*3^(1/2))+3*sin((1/2)*3^(1/2))))*exp(-1/2+(1/2)*x)

combine(A); #finally

(-(1/3)*3^(1/2)*sin((1/2)*3^(1/2)*(x-1))-cos((1/2)*3^(1/2)*(x-1)))*exp(-1/2+(1/2)*x)

 

 

Download simplify_vs_combine_june_4_2025.mw

This could be unrelated to V 26 of support tools and it could be a bug that existed in Maple before.

But no time for me to check now. Thought to ask about it before I forget.

When adding Physics:-Setup('assumingusesAssume'=true):  Maple generated internal error that can not be cought.

This is using latest V 26 of support tools

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

SupportTools:-Version();

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

restart;

ode:=diff(y(x),x) = (ln(y(x))^2+2*_C1)^(1/2)*y(x);
sol:=y(x) = exp((-2*_C1)^(1/2));
try
   timelimit(30,(odetest(sol,ode) assuming positive));
catch:
   print("cought error ok");
end try;

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

y(x) = exp((-2*_C1)^(1/2))

-(ln(exp(I*2^(1/2)*_C1^(1/2)))^2+2*_C1)^(1/2)*exp(I*2^(1/2)*_C1^(1/2))

restart;

ode:=diff(y(x),x) = (ln(y(x))^2+2*_C1)^(1/2)*y(x);
sol:=y(x) = exp((-2*_C1)^(1/2));
Physics:-Setup('assumingusesAssume'=true):
try
   timelimit(30,(odetest(sol,ode) assuming positive));
catch:
   print("cought error ok");
end try;

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

y(x) = exp((-2*_C1)^(1/2))

Error, (in type/complex) too many levels of recursion

 

 

Download type_complex_recursion_june_4_2025_V26_support.mw

I was debugging another Maple problem and found this.

According to help, it says

Computations performed using assuming do not affect computations performed before or after calling assuming.

But this example below shows this is not the case at all.

I used hasassumptions(y(x)); before calling a command that uses assuming, and it gave false as expected since there are no assumption put on y(x).

After the command is complete, now I find that  hasassumptions(y(x)); returns true  which is wrong. 

This only happens when adding Physics:-Setup('assumingusesAssume'=true); and also when the command that uses assuming timesout.

But from help, this should not cause this. Here is the help on this

assumingusesAssume
  true or false.

The default for this option is true, so that, when Physics is loaded, the Maple assuming command uses Physics:-Assume to place temporary assumptions. This makes the assuming command fully compatible with the Physics, DifferentialGeometry, DifferentialAlgebra and VectorCalculus packages. It is recommended to not change this setting. If assumingusesAssume is set to false, temporary assumptions placed by assuming are placed using the assume command, which redefines the variables receiving assumptions, so that, depending on the computation, the commands of these packages mentioned will fail in recognizing them within expressions (for example: when placing assumptions on the coordinates and computing with the spacetime metric).

Could someone please explain in very simple terms (as I find all this very confusing), why that after calling a command which uses assuming, I find my variables have assumption still attached to them? 

Because of this, commands that uses these variables after this will and could fail depending on what command is used.

This explains many of the problems I am seeing when using assuming command.  

My question is simple: Should any variable which did not have assumptions on it, still not have assumptions on it after using assuming regadless if the command that uses assuming timedout or not?

Notice that I am not even using the Physics package explicitly anywhere in the following. I am just called odetest with timeout.

Here is worksheet to illustrate this.

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

SupportTools:-Version();

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

restart

 

#this shows no assumptions on y(x);
ode:=y(x)*sqrt(1 + diff(y(x), x)^2) - a*y(x)*diff(y(x), x) - a*x = 0:
sol:=-_C4^2 + (-y(x)*sqrt(_C4^2/y(x)^2) + a*x)^2/a^2 + y(x)^2 = 0;
hasassumptions(y(x));
getassumptions(y(x));

-_C4^2+(-y(x)*(_C4^2/y(x)^2)^(1/2)+a*x)^2/a^2+y(x)^2 = 0

false

{}

#now use a command that uses assuming
Physics:-Setup('assumingusesAssume'=true):
timelimit(10,(odetest(sol,ode,y(x)) assuming integer)):

Error, (in simplify/sqrt/local) time expired

 

#this shows that y(x) has assumptions still stuck on it.

hasassumptions(y(x));
getassumptions(y(x));

true

{a::integer, x::integer, (-(-csgn(1/y(x))*a*x+(y(x)^2*a^4+csgn(1/y(x))^2*a^2*x^2+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)+x)::0, ((csgn(1/y(x))*a*x-(y(x)^2*a^4+csgn(1/y(x))^2*a^2*x^2+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)-x)::0, ((csgn(1/y(x))*a*x+(y(x)^2*a^4+csgn(1/y(x))^2*a^2*x^2+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)-x)::0, ((csgn(1/y(x))*a*x+(y(x)^2*a^4+csgn(1/y(x))^2*a^2*x^2+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)+x)::0}

 

 

Download why_variable_have_assumption_june_3_2025.mw

My quess is this: Because the command that uses assuming timedout, Maple failed to remove/clear any temporary assumptions it added to the variables involved.   But this only happens when using Physics:-Setup('assumingusesAssume'=true):

If the command did not timeout, this does not happen. At least on some examples I tried this on.

1 2 3 4 5 6 7 Page 1 of 7