Maple 2024 Questions and Posts

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

Whenever I have local proc inside a proc, and use local variables from the outer proc inside it, Mint tells me that the variables are not used.

This can't be right. Why does it say that? Here is MWE. I have this foo.mpl file

foo := proc()

local C1;
local y,x;

    proc()
        C1:= `tools/genglobal`(_C); 
        sol:=y(x)=  C1; 
    end proc();

end proc;

We see clearly that C1 is used, also x and y are used. There can be more code using these inside the inner proc. But this is what mint says

"C:\Program Files\Maple 2024\bin.X86_64_WINDOWS\mint.exe" foo.mpl

    |\^/|      Maple 2024 Diagnostic Program
._|\|   |/|_.  Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2024
 \  MINT   /   All rights reserved. Maple is a trademark of
 <____ ____>   Waterloo Maple Inc.
      |
Procedure foo() on lines 1 to 11
  These local variables were never used:  C1, x, y

Any idea why it says these are not used?

Also, I noticed it did not warn me that variable sol is global inside the proc. i.e. I was expecting something like this 

          These names were used as global names but were not declared: sol

Which is typical message mint gives when using a name inside a proc which was not declared,

Maple 2024.2 on Windows

I have a square matrix of data points. Each point is between 0 to 0.2. I wish to plot it and set the axes to values from 0 to 1. I want the 3D plot to be plotted with a constrained scaling. The two options I have are plots:-matrixplot and plots:-surfdata. 

* matrixplot can constrain the data, but it isn't obvious how to change the axes so that it shows from 0 to 1 in both directions. 

* In surfaceplot, it is easy to adjust the axes values, but scaling=constrained does nothing. 

(I assume someone else might also appreciate the answer. So, instead of me continuing to struggle, I post here and hope someone can answer without the use of many brain cells.) 

Example attached.

restart; N := 20; M := LinearAlgebra:-RandomMatrix(N, generator = rand(0 .. .2))

 

Scaling can be easily controlled, but labels are bad

plots:-matrixplot(N*M, labels = ["x", "y", "V"], scaling = constrained, axis = [tickmarks = [seq(0 .. 1, numelems = 10)]], size = [600, 600])

 

Axes are shown nicely, but scaling cannot be constrained.

plots:-surfdata(M, 0 .. 1, 0 .. 1, labels = ["x", "y", "V"], scaling = constrained, size = [600, 600])

 
 

NULL

Download Scaled_matrix_plot_with_axes.mw

 always i try to apply a technique like long wave limit to get my result, but this time when i do i reach zero so the author try to use another method which really i can't reach how they did and some term are dispear and some are remain , it about substituting and apply epsilon go to zero which i don't know how they apply, anyone can figure out how they reach the result, and maybe my letter and paper are not same about small and capital but it is so clear 

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

_local(gamma)

declare(u(x, y, z, t))

u(x, y, z, t)*`will now be displayed as`*u

(2)

declare(f(x, y, z, t))

f(x, y, z, t)*`will now be displayed as`*f

(3)

NULL

pde := diff(diff(u(x, y, z, t), t)+6*u(x, y, z, t)*(diff(u(x, y, z, t), x))+diff(u(x, y, z, t), `$`(x, 3)), x)-lambda*(diff(u(x, y, z, t), `$`(y, 2)))+diff(alpha*(diff(u(x, y, z, t), x))+beta*(diff(u(x, y, z, t), y))+gamma*(diff(u(x, y, z, t), z)), x)

diff(diff(u(x, y, z, t), t), x)+6*(diff(u(x, y, z, t), x))^2+6*u(x, y, z, t)*(diff(diff(u(x, y, z, t), x), x))+diff(diff(diff(diff(u(x, y, z, t), x), x), x), x)-lambda*(diff(diff(u(x, y, z, t), y), y))+alpha*(diff(diff(u(x, y, z, t), x), x))+beta*(diff(diff(u(x, y, z, t), x), y))+gamma*(diff(diff(u(x, y, z, t), x), z))

(4)

pde_linear, pde_nonlinear := selectremove(proc (term) options operator, arrow; not has((eval(term, u(x, y, z, t) = a*u(x, y, z, t)))/a, a) end proc, expand(pde))

diff(diff(u(x, y, z, t), t), x)+diff(diff(diff(diff(u(x, y, z, t), x), x), x), x)-lambda*(diff(diff(u(x, y, z, t), y), y))+alpha*(diff(diff(u(x, y, z, t), x), x))+beta*(diff(diff(u(x, y, z, t), x), y))+gamma*(diff(diff(u(x, y, z, t), x), z)), 6*(diff(u(x, y, z, t), x))^2+6*u(x, y, z, t)*(diff(diff(u(x, y, z, t), x), x))

(5)

lambda := 1; alpha := 1; beta := 1; gamma := 1

1

 

1

 

1

 

1

(6)

NULL

thetai := t*w[i]+x*k[i]+y*l[i]+z*r[i]

t*w[i]+x*k[i]+y*l[i]+z*r[i]

(7)

NULL

eqw := w[i] = -(k[i]^4+k[i]^2+k[i]*l[i]+k[i]*r[i]-l[i]^2)/k[i]

w[i] = -(k[i]^4+k[i]^2+k[i]*l[i]+k[i]*r[i]-l[i]^2)/k[i]

(8)

NULL

Bij := proc (i, j) options operator, arrow; (3*k[i]^4*k[j]^2-6*k[i]^3*k[j]^3+(3*k[j]^4+l[j]^2)*k[i]^2-2*k[i]*k[j]*l[i]*l[j]+k[j]^2*l[i]^2)/(3*k[i]^4*k[j]^2+6*k[i]^3*k[j]^3+(3*k[j]^4+l[j]^2)*k[i]^2-2*k[i]*k[j]*l[i]*l[j]+k[j]^2*l[i]^2) end proc

proc (i, j) options operator, arrow; (3*k[i]^4*k[j]^2-6*k[i]^3*k[j]^3+(3*k[j]^4+l[j]^2)*k[i]^2-2*k[i]*k[j]*l[i]*l[j]+k[j]^2*l[i]^2)/(3*k[i]^4*k[j]^2+6*k[i]^3*k[j]^3+(3*k[j]^4+l[j]^2)*k[i]^2-2*k[i]*k[j]*l[i]*l[j]+k[j]^2*l[i]^2) end proc

(9)

NULL

eij := (3*k[i]^4*k[j]^2-6*k[i]^3*k[j]^3+(3*k[j]^4+l[j]^2)*k[i]^2-2*k[i]*k[j]*l[i]*l[j]+k[j]^2*l[i]^2)/(3*k[i]^4*k[j]^2+6*k[i]^3*k[j]^3+(3*k[j]^4+l[j]^2)*k[i]^2-2*k[i]*k[j]*l[i]*l[j]+k[j]^2*l[i]^2)

(3*k[i]^4*k[j]^2-6*k[i]^3*k[j]^3+(3*k[j]^4+l[j]^2)*k[i]^2-2*k[i]*k[j]*l[i]*l[j]+k[j]^2*l[i]^2)/(3*k[i]^4*k[j]^2+6*k[i]^3*k[j]^3+(3*k[j]^4+l[j]^2)*k[i]^2-2*k[i]*k[j]*l[i]*l[j]+k[j]^2*l[i]^2)

(10)

eval(eij, k[j] = b*k[i]); series(%, k[i], 3); convert(%, polynom); eval(%, b = k[j]/k[i]); Bij := (%-1)/(k[i]*k[j])

(3*k[i]^6*b^2-6*k[i]^6*b^3+(3*b^4*k[i]^4+l[j]^2)*k[i]^2-2*k[i]^2*b*l[i]*l[j]+b^2*k[i]^2*l[i]^2)/(3*k[i]^6*b^2+6*k[i]^6*b^3+(3*b^4*k[i]^4+l[j]^2)*k[i]^2-2*k[i]^2*b*l[i]*l[j]+b^2*k[i]^2*l[i]^2)

 

series(1+O(k[i]^4),k[i],4)

 

1

 

1

 

0

(11)

NULL


Download transformation.mw

If I understand right, in the following calling an exception should be raised since the return value of the matching coercion procedure is of course not of type “set”: 

restart;
foo := (x::coerce(set, (y::rtable) -> convert(y, list))) -> x:
foo(<0>);
 = 
                              [0]

Did I miss something?

I want to remove the Lambert function (LambertW) from my equation, but I don't know how. I tried using the explicit option, but it didn't work. How can I express the equation without LambertW?

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

declare(u(x, y, z, t))

u(x, y, z, t)*`will now be displayed as`*u

(2)

declare(f(x, y, z, t))

f(x, y, z, t)*`will now be displayed as`*f

(3)

pde := diff(diff(u(x, y, z, t), t)+6*u(x, y, z, t)*(diff(u(x, y, z, t), x))+diff(u(x, y, z, t), `$`(x, 3)), x)-lambda*(diff(u(x, y, z, t), `$`(y, 2)))+diff(alpha*(diff(u(x, y, z, t), x))+beta*(diff(u(x, y, z, t), y))+gamma*(diff(u(x, y, z, t), z)), x)

diff(diff(u(x, y, z, t), t), x)+6*(diff(u(x, y, z, t), x))^2+6*u(x, y, z, t)*(diff(diff(u(x, y, z, t), x), x))+diff(diff(diff(diff(u(x, y, z, t), x), x), x), x)-lambda*(diff(diff(u(x, y, z, t), y), y))+alpha*(diff(diff(u(x, y, z, t), x), x))+beta*(diff(diff(u(x, y, z, t), x), y))+gamma*(diff(diff(u(x, y, z, t), x), z))

(4)

pde_nonlinear, pde_linear := selectremove(proc (term) options operator, arrow; not has((eval(term, u(x, y, t) = a*u(x, y, t)))/a, a) end proc, expand(pde))

0, diff(diff(u(x, y, z, t), t), x)+6*(diff(u(x, y, z, t), x))^2+6*u(x, y, z, t)*(diff(diff(u(x, y, z, t), x), x))+diff(diff(diff(diff(u(x, y, z, t), x), x), x), x)-lambda*(diff(diff(u(x, y, z, t), y), y))+alpha*(diff(diff(u(x, y, z, t), x), x))+beta*(diff(diff(u(x, y, z, t), x), y))+gamma*(diff(diff(u(x, y, z, t), x), z))

(5)

thetai := t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i]; eval(pde_linear, u(x, y, z, t) = exp(thetai)); eq15 := isolate(%, w[i])

t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i]

 

w[i]*k[i]*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])+12*k[i]^2*(exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i]))^2+k[i]^4*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])-lambda*l[i]^2*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])+alpha*k[i]^2*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])+beta*k[i]*l[i]*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])+gamma*k[i]*r[i]*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])

 

w[i] = -(t*k[i]^4+gamma*t*k[i]*r[i]+alpha*t*k[i]^2+beta*t*k[i]*l[i]-lambda*t*l[i]^2+LambertW(12*t*k[i]*exp(-(t*k[i]^4+alpha*t*k[i]^2+beta*t*k[i]*l[i]+gamma*t*k[i]*r[i]-lambda*t*l[i]^2-x*k[i]^2-y*k[i]*l[i]-z*k[i]*r[i]-eta[i]*k[i])/k[i]))*k[i])/(t*k[i])

(6)

sol := solve(eq15, w[i], explicit)

-(t*k[i]^4+gamma*t*k[i]*r[i]+alpha*t*k[i]^2+beta*t*k[i]*l[i]-lambda*t*l[i]^2+LambertW(12*t*k[i]*exp(-(t*k[i]^4+alpha*t*k[i]^2+beta*t*k[i]*l[i]+gamma*t*k[i]*r[i]-lambda*t*l[i]^2-x*k[i]^2-y*k[i]*l[i]-z*k[i]*r[i]-eta[i]*k[i])/k[i]))*k[i])/(t*k[i])

(7)
 

NULL

Download remove.mw

How i can add lebel inside graph  like this picture for some graph , in somecoding i have but i can't how it work i want add to  my code but i can't do the same as paper did

label.mw

I never used Physics:-Setup before. But I just found that adding

            Physics:-Setup(assumingusesAssume = true):

Makes a big difference in Maple's result. The question I have is this: Since help says that default is true for the above option, then why calling this command explicitly makes a difference? Should not result be the same regadless?

Below is one example showing the difference. I have more if needed. This is taken from old question here

Another example showing adding this makes big difference in how Maple work is here

Or may be help means that calling Physics:-Setup(assumingusesAssume) is the same as if one did Physics:-Setup(assumingusesAssum=true) ?  I understood help to mean that this option is already set to true by default when starting Maple and one does not need to do anything else.

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1845 and is the same as the version installed in this computer, created 2025, February 26, 9:46 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

expr := Sum((-1)^n - 1, n = 1 .. infinity):
simplify(op(1,expr)) assuming n::even;

(-1)^n-1

restart;

Physics:-Setup(assumingusesAssume = true):
expr := Sum((-1)^n - 1, n = 1 .. infinity):
simplify(op(1,expr)) assuming n::even;

0

 

 

Download physics_setup_feb_28_2025.mw

Question: Should one then always add explicit call to Physics:-Setup(assumingusesAssume = true): at start of code as this seems to change Maple results.

Hi! A basic issue.

Why view=[-2 ..1, -2 ..5]  is not useful here? According to the output, only the green line meets the view settings. I want to extend the left side of these three lines appropriately (show the intersection)

with(plots)

l := 2*x+y+1 = 0; l1 := 4*x+2*y+2 = 0; l2 := 4*x+2*y-2 = 0; l3 := 4*x-2*y+6 = 0

2*x+y+1 = 0

 

4*x+2*y+2 = 0

 

4*x+2*y-2 = 0

 

4*x-2*y+6 = 0

(1)

 

display({implicitplot(l, color = black, legend = l, thickness = 5, view = [-2 .. 1, -2 .. 5])}, {implicitplot(l1, color = red, legend = l1, view = [-2 .. 1, -2 .. 5])}, {implicitplot(l2, color = blue, legend = l2, view = [-2 .. 1, -2 .. 5])}, {implicitplot(l3, color = green, legend = l3, view = [-2 .. 1, -2 .. 5])})

 
 

NULL

Download The_intersection_parallelism_and_coincidence_of_two_straight_lines.mw

Executive summary of the problem:

Adding assuming y(x)::positive to the first odetest() call, makes the second odetest timeout. 

Removing assuming y(x)::positive from the first odetest() call, makes the second odetest return 0 very quickly.

These are two unrelated ode's and solutions but both use the same dependent function y(x).

And this is all using Physics update starting with version 1841 only.

I also found that adding Physics:-Setup(assumingusesAssume = true): which I never used before, fixes everything! Now the first odetest does not even timeout and the second odetest returns 0 even when using y(x)::positive.

What is strange by this workaround, is that help says that default for assumingusesAssume is true ! so why is adding  Physics:-Setup(assumingusesAssume = true): made difference??  May be I should ask separate question on this.

May be this will help Maplesoft find the problem.

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

This is a good example showing that Maple 2024 still have internal problems when it comes to handling memory cache and remember tables (or for some other reasons other than this) since it gives different results based on order.

I have two odes and solution for each.

If I do odetest(ode_1) followed by odetest(ode_2) then ode_2 test timeouts and fails to verify.

But if I do odetest(ode_2) followed by odetest(ode_1) then now ode_2 test does not timeout.

It took me many hrs to find this. I was running a test on number of ode's in a list. When I noticed if I change the order of ode's in the list, I get different result !

These are the kind of problems I've been having with Maple for years with no solution in sight.

Why would the order makes a difference? What can one do to insure there is no internal cache issues like this each time when using Maple? Why changing the order of using odetest make a difference on its result? Is there a way to tell Maple not to remember ANYTHING internally? I can not do restart in the middle of a loop.

I hope Maplesoft does not release Maple 2025 before fixing such serious problems. The order of calling Maple commands should not make them change the result they produce.

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1844 and is the same as the version installed in this computer, created 2025, January 25, 22:5 hours Pacific Time.`

restart;

ode_1 followed by ode_2 makes ode_2 fail to verify

 

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive,y(x)::positive));

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

Error, (in simplify) time expired

 

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30,(odetest(sol_2,ode_2) assuming positive,y(x)::positive));

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

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

Error, (in is/internal/rename) time expired

 

 

 

Now change the order. Call ode_2 before ode_1. Now ode_2  passes

 

restart;

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30,(odetest(sol_2,ode_2) assuming positive,y(x)::positive));

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

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

0

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive,y(x)::positive));

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

Error, (in simplify) time expired

 

 

Download order_of_odetest_makes_difference_feb_25_2025.mw

Update

I also tried calling forget(all) between each call to odetest. but this had no effect. Also tried forget(all,forgetpermanent = true,reinitialize=true); and no effect. 

I also tried kernelopts(cacheclearlimit=0); and kernelopts(numcpus=1); but no change. I also tried calling gc(); before the second odetest, no effect.

So there is something else that causes this. If someone can suggest other things to try, that will be great.

Only way to get same result each time is to do restart between each call to odetest, but this is not possible to do since this is run in a loop. 

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1844 and is the same as the version installed in this computer, created 2025, January 25, 22:5 hours Pacific Time.`

restart;

ode_1 followed by ode_2 makes ode_2. calling forget(all) has no effect

 

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive,y(x)::positive));

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

Error, (in simplify) time expired

forget(all); #An attempt to clear remember tables, but had no effect

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30,(odetest(sol_2,ode_2) assuming positive,y(x)::positive));

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

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

Error, (in is/internal/rename) time expired

 

 

 

Now change the order. Call ode_2 before ode_1. Now ode_2  passes

 

restart;

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30,(odetest(sol_2,ode_2) assuming positive,y(x)::positive));

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

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

0

forget(all);

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive,y(x)::positive));

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

Error, (in simplify) time expired

 

 

Download order_of_odetest_makes_difference_feb_25_2025_with_forgetall.mw

Update

Found the cause !

By removing Physics update form libname, then now odetest works regardless of order.

So something in Physics update is causing this. Why? Is it safe to remove Physics update from libname?  Since it has bug fixes for other things and if I remove Physics update from libname, I will lose these bug fixes.

May be this will help someone find the cause, since it is due to use Physics update for sure. I wonder which version of Physics update caused this problem.

interface(version);

Physics:-Version();

printlevel:=0;

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

[libname][2]

"C:\Program Files\Maple 2024\lib"

restart;

ode_1 followed by ode_2 makes ode_2. Removing Physics update from path, now it works as expected!

 

libname:=[libname][2];

"C:\Program Files\Maple 2024\lib"

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive,y(x)::positive));

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

Error, (in simplify) time expired

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30,(odetest(sol_2,ode_2) assuming positive,y(x)::positive));

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

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

0

 

 

Download order_of_odetest_makes_difference_feb_25_2025_physics_update.mw

Update

I found the Physics version which causes this problem. Version 1840 Works OK. i.e. second ode validate ok and does not timeout. Using version 1841, it fails. Same code, difference is the Physics version,

So the bug is in version 1841 of Physics.  Below two worksheet showing this.  Here is version 1841 where it fails. For me, this is serious bug. 

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1844. The version installed in this computer is 1841 created 2025, January 3, 8:59 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

Physics version 1841 shows the problem. Now second ode do not validate

 

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive,y(x)::positive));

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

Error, (in simplify) time expired

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30,(odetest(sol_2,ode_2) assuming positive,y(x)::positive));

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

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

Error, (in is/internal/rename) time expired

 

 

 

 

Download order_of_odetest_makes_difference_feb_25_2025_physics_update_1841.mw

And here is version 1840 where second ode verifies OK.

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1844. The version installed in this computer is 1840 created 2024, December 26, 12:58 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

With Physics version 1840, it worked as expected. Second ode verifies OK

 

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive,y(x)::positive));

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

Error, (in simplify) time expired

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30,(odetest(sol_2,ode_2) assuming positive,y(x)::positive));

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

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

0

 

 

 

 

 

 

Download order_of_odetest_makes_difference_feb_25_2025_physics_update_1840.mw

Important update FEB 27, 2 AM

Just Found what causes this difference in behaviour. This is all using latest Physics update.

When  adding y(x)::positive to assuming in the first odetest call, now the second odetest timesout. Even if the second odetest call does not use y(x)::positive in its assuming.

Removing y(x)::positive from assuming on first odetest, now the second odetest returns 0 very quickly !

Everything else is the same. So the problem has to do with using y(x)::positive in assuming.

I thought that assuming added to end of a Maple command only affects the single command it is used on. But it seems assuming have global side effects that remains after the call is completed.

This only happens when using y(x)::positive. Using just assuming positive does not have such effect.

All the above happens ONLY when using latest Physics update.  And starting from V 1841.

For now, to be able to use latest Physics update, I will remove all places where I have assuming y(x)::positive and assuming y(x)::negative from my code. I added these sometime ago to help odetest verify solutions.

But this is real problem. Maple should not behave this way, and why it happens only when using Physics update starting at V 1841 is another mystery. 

Here is worksheet.
 

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1845 and is the same as the version installed in this computer, created 2025, February 26, 9:46 hours Pacific Time.`

when removing assuming y(x)::positive on first odetest, no hang in second odetest

 

restart;

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive)); #DO NOT USE y(x)::positive in assumption

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

Error, (in simplify) time expired

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30, (odetest(sol_2,ode_2) assuming positive));

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

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

0

Adding assuming y(x)::positive on first odetest, now second odetest timesout

 

restart;

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive, y(x)::positive)); #notice adding y(x)::positive is cause of problem

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

Error, (in simplify) time expired

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30, (odetest(sol_2,ode_2) assuming positive));

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

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

Error, (in is/internal/rename) time expired

 

 

 

 

Download order_of_odetest_makes_difference_assuming_issue.mw

Update FEB 27, 2025 3AM

This below shows that adding Physics:-Setup(assumingusesAssume = true): fixes everything. So this tells me something changed starting Physics update V 1841 related to this.

I will add Physics:-Setup(assumingusesAssume = true): to my code. I never used this before, but since it seems to fix things, will use it. I have to do more testing.

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1845 and is the same as the version installed in this computer, created 2025, February 26, 9:46 hours Pacific Time.`

when adding Physics:-Setup(assumingusesAssume = true): eveything works OK now.

 

restart;

Physics:-Setup(assumingusesAssume = true):

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive,y(x)::positive)): #no timeout but outout too large

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30, (odetest(sol_2,ode_2) assuming positive));

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

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

0

Removing Physics:-Setup(assumingusesAssume = true): now second odetest timesout

 

restart;

ode_1:=y(x)=x*(diff(y(x),x)+a*sqrt(1+diff(y(x),x)^2));
sol_1:=y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-1/2*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2));
timelimit(30,(odetest(sol_1,ode_1) assuming positive, y(x)::positive)); #notice adding y(x)::positive is cause of problem

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

y(x) = x*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)+a*(RootOf(_Z^2-exp(RootOf(-sinh(-(1/2)*a*_Z+a*ln(1/x)+_C1)^2+exp(_Z)-1))+1)^2+1)^(1/2))

Error, (in simplify) time expired

ode_2:=y(x)=x*diff(y(x),x)^(1/2)+diff(y(x),x);
sol_2:=y(x) = x*((exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1)^2)^(1/2)+exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)^2+2*exp(LambertW(1/2*(x+2)*exp(1/2*_C1-1/2*x))-1/2*_C1+1/2*x)+1;
timelimit(30, (odetest(sol_2,ode_2) assuming positive));

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

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

Error, (in is/internal/rename) time expired

 

 

 


 

Download order_of_odetest_makes_difference_assuming_issue_V2.mw

 

This first order ode diff(y(x),x)=sqrt(x*y(x)+x); generates internal dsolve exception when called with IC y(0)=1

Attached worksheet. No error if no IC is used. tracelast is shown also.

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1844 and is the same as the version installed in this computer, created 2025, January 25, 22:5 hours Pacific Time.`

restart;

ode:=diff(y(x),x)=sqrt(x*y(x)+x);

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

IC:=y(0)=1;

y(0) = 1

dsolve(ode)

x^2/((-x^2+3*(x*y(x)+x)^(1/2))*(-x^3+9*y(x)+9))+3*(x*y(x)+x)^(1/2)/((-x^2+3*(x*y(x)+x)^(1/2))*(-x^3+9*y(x)+9))-c__1 = 0

dsolve([ode,IC])

Error, (in dsolve) invalid input: convert expects 2 or more arguments, but received 1

tracelast

 dsolve called with arguments: [diff(y(x), x) = (x*y(x)+x)^(1/2), y(0) = 1], arbitraryconstants = subscripted, atomizenames = true, build = false, numeric = false, type = none
 #(dsolve,80): error

 \`dsolve/IC\` called with arguments: [diff(y(x), x) = (x*y(x)+x)^(1/2), y(0) = 1], {y(x)}, skipimplicit = false, skippparticularsolforlinearODEs = true, solution = {}, usesolutions = particular and general
 #(\`dsolve/IC\`,64): draft := procname(_passed,':-usesolutions = "general"');

 \`dsolve/IC\` called with arguments: [diff(y(x), x) = (x*y(x)+x)^(1/2), y(0) = 1], {y(x)}, skipimplicit = false, skippparticularsolforlinearODEs = true, solution = {}, usesolutions = general
 #(\`dsolve/IC\`,229): ANS := \`dsolve/IC/implicit\`(ODEs,funcs,ICs,_rest,zz,':- computedgeneralsolution' = computedgeneralsolution);

 \`dsolve/IC/implicit\` called with arguments: {diff(y(x), x) = (x*y(x)+x)^(1/2)}, {y(x)}, [{y(0) = 1}], computedgeneralsolution = computedgeneralsolution, skippparticularsolforlinearODEs = true, solution = {}, usesolutions = general
 #(\`dsolve/IC/implicit\`,126): error

Error, (in dsolve) invalid input: convert expects 2 or more arguments, but received 1

 locals defined as: C_val = {_C1 = 1/18}, Y = y(x), extra = [implicit, singsol = all], ode = diff(y(x), x)-(x*y(x)+x)^(1/2), sol = (Array(1..1, {(1) = x^2/((-x^2+3*(x*y(x)+x)^(1/2))*(-x^3+9*y(x)+9))+3*(x*y(x)+x)^(1/2)/((-x^2+3*(x*y(x)+x)^(1/2))*(-x^3+9*y(x)+9))-_C1 = 0})), y = y, x = x, zz = {}, n = 1, N = 1, ans = (Array(1..1, {(1) = })), return_implicit = false, unable_to_make_explicit = (Array(1..1, {(1) = })), x0 = 0, soln = (y(x) = (1/9)*x^3-(2/3)*2^(1/2)*x^(3/2)+1, y(x) = (1/9)*x^3+(2/3)*2^(1/2)*x^(3/2)+1), max_DY = diff(y(x), x), CYn = CYn, Zn_or_NNn = {}, diff_ord = 1, high_degree = FAIL, indets_ode_Cn = {}, j = j, radical_solutions = radical_solutions, outputcontainsgeneralsolution = true, indicated_integrator = (), Ints = {}, integrator = integrator, implicit_soln = [x^2/((-x^2+3*(x*y(x)+x)^(1/2))*(-x^3+9*y(x)+9))+3*(x*y(x)+x)^(1/2)/((-x^2+3*(x*y(x)+x)^(1/2))*(-x^3+9*y(x)+9))-1/18 = 0], radicals_of_Y_in_implicit_soln = {(x*y(x)+x)^(1/2)}, SOL = SOL, assumptions = assumptions, covered = covered, evaluation_points_and_difford = [0, 0], k = k, previous_region = previous_region, region = region, series_solution = (), soln_series = soln_series, valid_solution = valid_solution

 


 

Download dsolve_internal_error_convert_feb_25_2025.mw

 

Hi,

I'm trying to use the Explore command to examine the effect of two parameters (mu and sigma) on the density function curve. The visualization isn't very optimal, especially with the mu parameter, and it's difficult to add options (range, color, gridlines, etc.). Any suggestions to optimize this idea? Thanks for your insights!

Q_Explore.mw

when we have ode equation we say what is type of equation then  i want solve by this method say the name of method and if possible i want to solve this equation by the method step by step too, maple can do that? also can we plot the solution or any geometricall presentation , also i have error in writing exact form of equation

restart

"with(Student[ODEs]): "

with(DETools)

ode1 := diff(y(x), x)+2*x*y(x) = x

diff(y(x), x)+2*x*y(x) = x

(1)

Type(ode1)

{linear, separable}

(2)

W := dsolve(ode1)

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

(3)

odetest(W, ode1)

0

(4)

ODESteps(ode1)

"[[,,"Let's solve"],[,,(&DifferentialD;)/(&DifferentialD;x) y(x)+2 x y(x)=x],["&bullet;",,"Highest derivative means the order of the ODE is" 1],[,,(&DifferentialD;)/(&DifferentialD;x) y(x)],["&bullet;",,"Separate variables"],[,,((&DifferentialD;)/(&DifferentialD;x) y(x))/(2 y(x)-1)=-x],["&bullet;",,"Integrate both sides with respect to" x],[,,&int;((&DifferentialD;)/(&DifferentialD;x) y(x))/(2 y(x)-1) &DifferentialD;x=&int;-x &DifferentialD;x+`c__1`],["&bullet;",,"Evaluate integral"],[,,(ln(2 y(x)-1))/2=-(x^2)/2+`c__1`],["&bullet;",,"Solve for" y(x)],[,,y(x)=((e)^(-x^2+2 `c__1`))/2+1/2]]"

(5)

ode2 := (sin(x)*tan(x)+1)*dx-cos(x)*sec(y(x))^2*dy = 0

(sin(x)*tan(x)+1)*dx-cos(x)*sec(y(x))^2*dy = 0

(6)

Type(ode2)

Error, (in Student:-ODEs:-Type) could not determine the solving variable. Please specify it as an extra argument in the form: y(x)

 
 

NULL

Download ode-example.mw

i want try all number to my parameter for check the shape of plot there is any way for doing that?

restart

with(plots)

M := 4*b^2*beta*((a*y-2*alpha*t+x)*b^2+a*(-2*beta*t+a*(a*y-2*alpha*t+x)))/(-b^6*beta*y^2+(-4*t*y*beta^2+(-2*a^2*y^2+(4*(alpha*t-(1/2)*x))*y*a-4*(alpha*t-(1/2)*x)^2)*beta+3*a)*b^4+(-4*t^2*beta^3+4*a*t*(a*y-2*alpha*t+x)*beta^2-a^2*(a*y-2*alpha*t+x)^2*beta+6*a^3)*b^2+3*a^5)

alpha = 1; beta := 1; a := -1; b := -2; t := 0

alpha = 1

 

1

 

-1

 

-2

 

0

(1)

plots:-contourplot(M, x = -100 .. 100, y = -100 .. 100, title = contour, grid = [100, 100], colorbar = false)

 
 

NULL

Download control-trajectory.mw

THis IC for Abel ode is not valid and should result in no solution. But instead of returning NULL, dsolve throws internal error called Error, (in dsolve) invalid limiting point

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1844 and is the same as the version installed in this computer, created 2025, January 25, 22:5 hours Pacific Time.`

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

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

DEtools:-odeadvisor(ode);
sol:=dsolve([ode,y(1)=1])

[_Abel]

Error, (in dsolve) invalid limiting point

tracelast;

 dsolve called with arguments: [diff(y(x), x)-x^a*y(x)^3+3*y(x)^2-x^(-a)*y(x)-x^(-2*a)+a*x^(-a-1) = 0, y(1) = 1], arbitraryconstants = subscripted, atomizenames = true, build = false, numeric = false, type = none
 #(dsolve,80): error

 \`dsolve/IC\` called with arguments: [diff(y(x), x)-x^a*y(x)^3+3*y(x)^2-x^(-a)*y(x)-x^(-2*a)+a*x^(-a-1) = 0, y(1) = 1], {y(x)}, skipimplicit = false, skippparticularsolforlinearODEs = true, solution = {}, usesolutions = particular and general
 #(\`dsolve/IC\`,64): draft := procname(_passed,':-usesolutions = "general"');

 \`dsolve/IC\` called with arguments: [diff(y(x), x)-x^a*y(x)^3+3*y(x)^2-x^(-a)*y(x)-x^(-2*a)+a*x^(-a-1) = 0, y(1) = 1], {y(x)}, skipimplicit = false, skippparticularsolforlinearODEs = true, solution = {}, usesolutions = general
 #(\`dsolve/IC\`,277): zz := map(op,{\`dsolve/IC/_C\`({ANS[i]},funcs,x,ics)});

 \`dsolve/IC/_C\` called with arguments: {y(x) = -exp(2*x^(-a+1)/(a-1))/(_C[1]-2*2^(2*(a+1)/(a-1))*(1/(-a+1))^((a+1)/(a-1))*(2^(-(5*a-3)/(a-1))*(1/(-a+1))^(-(a+1)/(a-1))*x^(2*a)*(-a+1)^2*(x^(-a+1)/(-a+1))^(1/(a-1))*(-4*x^(-a+1)*a^2/(-a+1)+8*a*x^(-a+1)/(-a+1)-4*x^(-a+1)/(-a+1)+2*a-2)*WhittakerM(-(a+1)/(a-1)+1/(a-1), -1/(a-1)+1/2, 4*x^(-a+1)/(-a+1))*exp(-2*x^(-a+1)/(-a+1))/((a+1)*(-3+a))-2^(-(3*a-1)/(a-1))*(1/(-a+1))^(-(a+1)/(a-1))*x^(2*a)*WhittakerM(-(a+1)/(a-1)+1/(a-1)+1, -1/(a-1)+1/2, 4*x^(-a+1)/(-a+1))*(-a+1)^2*(x^(-a+1)/(-a+1))^(1/(a-1))*exp(-2*x^(-a+1)/(-a+1))/((a+1)*(-3+a)))/(-a+1))^(1/2)+x^(-a)}, {y(x)}, x, [y(1) = 1]
 #(\`dsolve/IC/_C\`,1): ans := \`dsolve/IC/_C/do\`(solns,depvars,t,inits,'evaluated_ans', "default",':-giveup = giveup');

 \`dsolve/IC/_C/do\` called with arguments: {y(x) = -exp(2*x^(-a+1)/(a-1))/(_C[1]-2*2^(2*(a+1)/(a-1))*(1/(-a+1))^((a+1)/(a-1))*(2^(-(5*a-3)/(a-1))*(1/(-a+1))^(-(a+1)/(a-1))*x^(2*a)*(-a+1)^2*(x^(-a+1)/(-a+1))^(1/(a-1))*(-4*x^(-a+1)*a^2/(-a+1)+8*a*x^(-a+1)/(-a+1)-4*x^(-a+1)/(-a+1)+2*a-2)*WhittakerM(-(a+1)/(a-1)+1/(a-1), -1/(a-1)+1/2, 4*x^(-a+1)/(-a+1))*exp(-2*x^(-a+1)/(-a+1))/((a+1)*(-3+a))-2^(-(3*a-1)/(a-1))*(1/(-a+1))^(-(a+1)/(a-1))*x^(2*a)*WhittakerM(-(a+1)/(a-1)+1/(a-1)+1, -1/(a-1)+1/2, 4*x^(-a+1)/(-a+1))*(-a+1)^2*(x^(-a+1)/(-a+1))^(1/(a-1))*exp(-2*x^(-a+1)/(-a+1))/((a+1)*(-3+a)))/(-a+1))^(1/2)+x^(-a)}, {y(x)}, x, [y(1) = 1], evaluated_ans, default, giveup = giveup, usecansolve = false
 #(\`dsolve/IC/_C/do\`,133): Solns := map((u, S) -> map(limit,S,op(u)),csol,Solns);

 limit called with arguments: y(x) = -exp(2*x^(-a+1)/(a-1))/(_C[1]-2*2^(2*(a+1)/(a-1))*(1/(-a+1))^((a+1)/(a-1))*(2^(-(5*a-3)/(a-1))*(1/(-a+1))^(-(a+1)/(a-1))*x^(2*a)*(-a+1)^2*(x^(-a+1)/(-a+1))^(1/(a-1))*(-4*x^(-a+1)*a^2/(-a+1)+8*a*x^(-a+1)/(-a+1)-4*x^(-a+1)/(-a+1)+2*a-2)*WhittakerM(-(a+1)/(a-1)+1/(a-1), -1/(a-1)+1/2, 4*x^(-a+1)/(-a+1))*exp(-2*x^(-a+1)/(-a+1))/((a+1)*(-3+a))-2^(-(3*a-1)/(a-1))*(1/(-a+1))^(-(a+1)/(a-1))*x^(2*a)*WhittakerM(-(a+1)/(a-1)+1/(a-1)+1, -1/(a-1)+1/2, 4*x^(-a+1)/(-a+1))*(-a+1)^2*(x^(-a+1)/(-a+1))^(1/(a-1))*exp(-2*x^(-a+1)/(-a+1))/((a+1)*(-3+a)))/(-a+1))^(1/2)+x^(-a), _C[1] = exp((4*I)*Im(1/(a-1)))*infinity, parametric = false
 #(limit,2): return map(thisproc,_passed)

 limit called with arguments: y(x), _C[1] = exp((4*I)*Im(1/(a-1)))*infinity, parametric = false
 #(limit,33): error "invalid limiting point"

Error, (in dsolve) invalid limiting point

 locals defined as: ddir = ddir, dexpr = y(x), fexpr = fexpr, r = r, x = _C[1], fL = fL, L = exp((4*I)*Im(1/(a-1)))*infinity, efloat = efloat, lfloat = lfloat, ind_dexpr = ind_dexpr, ind_L = ind_L, lexpr = lexpr, t = t, limr = limr, liml = liml, pt = (_C[1] = exp((4*I)*Im(1/(a-1)))*infinity), inertfunctions = {}, limitX = limitX, parameters = parameters, Y = Y, limc = limc, cexpr = cexpr, texpr = texpr, bexpr = bexpr, limt = limt, limb = limb, param = param, c = c, N = N, Z = Z, P = P, o = o, e = e, uneval = uneval, i = i, A = A, cond = cond, ll = ll, rr = rr

 


 

Download internal_error_instead_of_no_solution.mw

Is there an equivalent of currentdir() which instead of returning current working directory, returns the directory of the file being read. So assume I have an ".mm" or ".mpl" file saved in some location and there is another file with a location fixed relative to this file, but not fixed in absolute location on the computer and not fixed relative with current working directory. One natural thing is to have a line in the first file that takes its current location (not current working location of the user!) and then use the fixed relative path info, and then gives the location of the second file to the user. Using currendir won't help here because current working directory is not necessarily the same as the location of the file you are reading, the first file. One may say the user is reading the first file so he knows already its location, right? Well, if the user is also the writer of the file, sure, not a problem, he can manually edit the lines of the file and put that location inside the file instead of using currentdir etc. However, if the user is not the writer and also does not know how to edit or whatever else reason, then the file should be able to inform Maple of its own location, so that's why something like currentdir() but not for the working directory, instead for currently being read file's directory is helpful. I checked FileTools package quickly and couldn't notice anything like what I want. Anyone have any clue on name of such command if exists or any other trick that does what I want (except expecting the user to do something ^_^ so all from the writer's side please ^_^).

2 3 4 5 6 7 8 Last Page 4 of 38