nm

12418 Reputation

20 Badges

14 years, 124 days

MaplePrimes Activity


These are questions asked by nm

Is this a bug in Maple?  it gives error in Maple 2026.2 and also Maple 2025.2

restart;

ode:=-1/diff(Y(X),X)^3*diff(diff(Y(X),X),X)+4*X = piecewise(0 <= Y(X) and Y(X) < Pi,0,Pi <= Y(X) and Y(X) < 2*Pi,10,2*Pi <= Y(X),0);

solve(ode,diff(Y(X),X$2))

workaround is to use isolate instead of solve or Solve:

 

 

But why solve fails just because RHS is piecewise ?

Wanted to check before sending bug report in case it is by design.

Consider these two output, both for solving system of 2 first order different equations.

Why is the first result is put in a list, then each solution is in a set inside the list, while the second one is just a set of the two solutions?

My guess is that because the first system is non-linear.  Is this why?

This makes it little harder to parse the result later on, as it can change each time. 

Is there a way to get same output for the first example as in the second example?

Mapkle 2026.1

ode:=diff(x(t),t) = x(t)^2, diff(y(t),t) = exp(t);
sol:=dsolve([ode],[x(t),y(t)])

ode:=diff(x(t),t) = x(t), diff(y(t),t) = t;
sol:=dsolve([ode],[x(t),y(t)])

ps. the ode's are not even coupled in these example. So each can be solved on its own if needed.

And if there is one ode with multiple solutions, now dsolve returns expression sequence. No set, no list.

ode:=2*x*diff(y(x),x)*diff(diff(y(x),x),x) = -1+diff(y(x),x)^2; 
dsolve(ode,y(x));

This whole thing is a mess. 

There should be one consistent way to return solutions for all cases. 

Regadless if it is one ode with one solution, or one ode with mutliple solutions, or coupled systems of odes, linear or not and so on.

The output should be the same form in all cases. A list of lists or list of sets or whatever it is decided on.

But it should not change.

I was trying to use the debugger into a proc that has this call

P:=plots:-contourplot(RHS,':-colorbar' = false,':-contours' = L):

Even though the proc has : at its end, and the above call to plots also ends with :, the debugger insists in printing to the debugger window the contour cuves lines. i.e the value of P

Is there a way to tell the debugger not to do this? i.e. not show the value of P. It seems it does that automatically.

Here is the worksheet. Simply evaluate the call foo(); this will open a debugger windows. Then click on next button and now debugger will print  the output of plots:-contourplot(RHS,':-colorbar' = false,':-contours' = L): 

> 

restart;

> 

kernelopts('assertlevel'=2):
kernelopts(numcpus=1);

32

> 

interface(version);

`Standard Worksheet Interface, Maple 2026.1, Windows 10, April 28 2026 Build ID 2011354`

> 

foo:=proc()
local L := [$ -4 .. 4]:
local RHS:=y/tan(x):
local P,T:

DEBUG();
P:=plots:-contourplot(RHS,':-colorbar' = false,':-contours' = L):
T:= timelimit(60,plottools:-getdata(P,'rangesonly')):
end proc:

 
> 

foo();  #this will open a debugger window

 

Download hang_maple_2026_1_on_timelimit.mw

Here is screen shot

In my main actual code, the output was so large that it hanged Maple UI when stepping into the debugger and hitting that line.  I had to kill Maple from task manager as Java UI got stuck due to large output.

Why is it showing value of P when I have : at the end? Is there an option to turn automatic display of variables in debugger as one steps in?

Any one knows a trick to help Maple obtain this much simpler solution to this ode obtained using AI?

ode := 4*(-1 + sqrt(1 - 1/x^2)*x^2)*sec(4 + 4*x + 4*arccsc(x))^2 - sqrt(1 - 1/x^2)*x^2*diff(f(x), x) = 0
> 

ode:= 4*(-1 + sqrt(1 - 1/x^2)*x^2)*sec(4 + 4*x + 4*arccsc(x))^2 - sqrt(1 - 1/x^2)*x^2*diff(f(x), x) = 0;

4*(-1+(1-1/x^2)^(1/2)*x^2)*sec(4+4*x+4*arccsc(x))^2-(1-1/x^2)^(1/2)*x^2*(diff(f(x), x)) = 0

> 

maple_sol:=dsolve(ode);

f(x) = c__1+Int(8*(-1+(1-1/x^2)^(1/2)*x^2)*x^6/((1-1/x^2)^(1/2)*(-8*((x^2-1)/x^2)^(1/2)*x^7*sin(8+8*x)+x^8*cos(8+8*x)+x^8+80*((x^2-1)/x^2)^(1/2)*x^5*sin(8+8*x)-32*x^6*cos(8+8*x)-192*((x^2-1)/x^2)^(1/2)*x^3*sin(8+8*x)+160*x^4*cos(8+8*x)+128*((x^2-1)/x^2)^(1/2)*x*sin(8+8*x)-256*cos(8+8*x)*x^2+128*cos(8+8*x))), x)

> 

odetest(maple_sol,ode);

0

> 

AI_sol:=f(x)=_C1+tan(4*(1+x+arccsc(x)));

f(x) = c__1+tan(4+4*x+4*arccsc(x))

> 

odetest(AI_sol,ode)

0

 

 

Download AI_sol.mw

given

ode:=2*x^(1/2)*diff(y(x),x)-y(x) = -sin(x^(1/2))-cos(x^(1/2)); 
ic:=y(infinity) = y__0; 
sol:=dsolve([ode,ic]);

It gives  

This solution satisfies the ode itself. Now cos(sqrt(x)) when x=infinity is  -1..+1

But IC says y(infinity)=y0  so odetest do not verify the IC and gives this

odetest(sol,[ode,ic]);

I think dsolve should not have returned a solution at all. 

What do the experts here think of this result?

Maple 2026.1 on windows 10

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