Maple 2025 Questions and Posts

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

Hello,

I'm using CodeGeneration:-C in Maple to translate the coefficients of a dynamical model into C++ code. However, I'm running into an issue when trying to assign the output in a way that matches the format of the coef vector used in the main C++ file (which is set up to simulate any 3D quadratic model).

For context, ans is a Maple vector containing all 30 coefficients.
Taking ans[12] as an example:

ans := [0, -sigma, xi[1, 2], xi[1, 3], 0, 0, 0, 0, 0, 0, 0, -sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)*rho*sigma/(2*xi[1, 2]) + sigma*rho/(2*xi[1, 2]), -sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)*beta/2 + sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)/2 - beta/2 - 1/2, -sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)*beta*xi[1, 3]/(2*xi[1, 2]) + sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)*xi[1, 3]/(2*xi[1, 2]) + beta*xi[1, 3]/(2*xi[1, 2]) - xi[1, 3]/(2*xi[1, 2]), 0, xi[2, 5], -sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)/(2*xi[1, 2]^2) + xi[1, 3]*xi[2, 5]/xi[1, 2] + 1/(2*xi[1, 2]^2), 0, 0, 0, 0, sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)*rho*sigma/(2*xi[1, 3]) + sigma*rho/(2*xi[1, 3]), sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)*beta*xi[1, 2]/(2*xi[1, 3]) - sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)*xi[1, 2]/(2*xi[1, 3]) + beta*xi[1, 2]/(2*xi[1, 3]) - xi[1, 2]/(2*xi[1, 3]), sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)*beta/2 - sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)/2 - beta/2 - 1/2, 0, -xi[1, 2]*xi[2, 5]/xi[1, 3] - sqrt(-4*xi[1, 3]^2*xi[1, 2]^2 + 4*xi[1, 2]*xi[1, 3]*xi[2, 5] + 1)/(2*xi[1, 3]^2) - 1/(2*xi[1, 3]^2), -xi[2, 5], 0, 0, 0]

When I run the command:

CodeGeneration:-C(ans[12],resultname="coef21");

the output is:

coef21 = -0.1e1 / (double) xi[0][1] * sqrt((double) (-4 * xi[0][2] * xi[0][2] * xi[0][1] * xi[0][1] + 4 * xi[0][1] * xi[0][2] * xi[1][4] + 1)) * rho * sigma / 0.2e1 + 0.1e1 / (double) xi[0][1] * sigma * rho / 0.2e1;

This is syntactically fine, but what I actually need is an assignment to coef[21] instead of coef21, to be consistent with the structure in my C++ code.

To clarify, the resultname must reflect an offset: ans[12] should become coef[12 + 9], ans[1] becomes coef[1 + 9], and so on. I realize this isn’t ideal, but the current C++ code has been working reliably for years, and adapting it would require unnecessary refactoring.

Do you have any suggestions on how to direct CodeGeneration:-C to generate the assignment with coef[21] as the left-hand side?

Many thanks in advance!

Ed

P.S. Using CodeGeneration:-C(ans[i], resultname = sprintf("coef%d", i + 9)) displays the coefficients on the screen as needed, but they still require some additional editing.

Should maple have given solution to x as zero in the following?

solve(x^n=0,x)

What if n is zero? what if n is negative?  

Another program I tried this on gives

Maple 2025

Hello,

I am working with the following overdetermined system of nonlinear equations in Maple and attempting to solve it for the unknowns xi[3] and xi[8].

 [sqrt(beta*rho*xi[8]^2 - beta*xi[8]^2)/xi[8] = sqrt(beta*rho - beta), (-rho + 1 + sqrt(beta*rho*xi[8]^2 - beta*xi[8]^2))/(xi[3]*xi[8] - 1) = sqrt(beta*rho - beta), -(-rho*xi[3]*xi[8] + sqrt(beta*rho*xi[8]^2 - beta*xi[8]^2) + xi[3]*xi[8])/(xi[8]*(xi[3]*xi[8] - 1)) = rho - 1]

Maple returns the following solution:

{xi[3] = (-rho + sqrt(beta*(rho - 1)) + 1)/sqrt(beta*(rho - 1)), xi[8] = -(-rho + sqrt(beta*(rho - 1)) + 1)/(rho - 1)}

However, when I substitute the solution back into the original equations, the left-hand side should equal the right-hand side. Yet, using simplify(subs(solution, equation)) does not reduce the expression sufficiently to verify the equality.

Am I missing something in the simplification process?

Many thanks,

Ed

Hello,

i try to create a quiz. Is it possible to set a comlex math expression like the first expression in my document for a choice? In the Helppage I did not see the oppertunity to use an Integral expression for example. Or is it posssible to use 2D Math Input for the choices ? 

int(diff(u, t), s = A .. E)+(1/2)*u__E^2"+(∫)[A]^(E)(1)/(`ϱ`)(ⅆ)/(ⅆ s)p ⅆs+`ϕ__E`=(1)/(2)(`u__A`)^(2)+`ϕ__A`;"

Error, (in int) wrong number (or type) of arguments: invalid options or option values passed to definite integration.

 

Error, (in int) wrong number (or type) of arguments: invalid options or option values passed to definite integration.

 

with(Grading)

A := Array()

A(1) := Grading:-Quiz("Welche der folgenden Varianten der Bernoullischen Gleichung sind korrekt?", 3, ["A", "B", "C"], 'style' = multiplechoice, 'output' = `module`)

Grading:-Quiz(A, numberformat = lowercaseroman, numberprefix = "Frage 1.", border = true)

 

``

Download 1.mw

Should solution to a first order ode with IC not have any constant of integration in it? This is what the teacher said at school.

But Maple in this example returns a solution to first order Riccati ode with c1 still in the solution even though it is given IC.

How is this possible? This is problem from Differential equations and their applications, 3rd ed., M. Braun, Section 1.10. Page 80, problem #5

If dsolve was not able to resolve c1 from IC for some reason, should it not have returned any solution in this case? 

btw, I could not verify the solution on the ode itself using odetest, but may be assumptions are needed. Will try and see...

restart;

interface(version);

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

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 19 and is the same as the version installed in this computer, created May 21, 2025, 13:44 hours Eastern Time.`

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.`

restart;

libname;

"/home/me/maple/toolbox/2025/Physics Updates/lib", "/home/me/maple/toolbox/2025/Maple Customer Support Updates/lib", "/home/me/maple2025/lib"

ode:=diff(y(x),x)=1+y(x)+y(x)^2*cos(x);
IC:=y(0)=0;
maple_sol:=dsolve([ode,IC]);

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

y(0) = 0

y(x) = -(1/2)*csgn(sin((1/2)*x))*(MathieuS(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))*c__1+4*MathieuS(-1, -2, arccos(cos((1/2)*x)))*cos(x)*c__1-MathieuSPrime(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))*c__1-c__1*MathieuS(-1, -2, arccos(cos((1/2)*x)))+c__1*MathieuSPrime(-1, -2, arccos(cos((1/2)*x)))-MathieuCPrime(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))+MathieuC(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))+4*MathieuC(-1, -2, arccos(cos((1/2)*x)))*cos(x)+MathieuCPrime(-1, -2, arccos(cos((1/2)*x)))-MathieuC(-1, -2, arccos(cos((1/2)*x))))/((c__1*MathieuS(-1, -2, arccos(cos((1/2)*x)))-c__1*MathieuSPrime(-1, -2, arccos(cos((1/2)*x)))-MathieuCPrime(-1, -2, arccos(cos((1/2)*x)))+MathieuC(-1, -2, arccos(cos((1/2)*x))))*cos(x))

lprint(maple_sol);

y(x) = -1/2*csgn(sin(1/2*x))/(c__1*MathieuS(-1,-2,arccos(cos(1/2*x)))-c__1*
MathieuSPrime(-1,-2,arccos(cos(1/2*x)))-MathieuCPrime(-1,-2,arccos(cos(1/2*x)))
+MathieuC(-1,-2,arccos(cos(1/2*x))))*(MathieuS(-1,-2,arccos(cos(1/2*x)))*csgn(
sin(1/2*x))*c__1+4*MathieuS(-1,-2,arccos(cos(1/2*x)))*cos(x)*c__1-MathieuSPrime
(-1,-2,arccos(cos(1/2*x)))*csgn(sin(1/2*x))*c__1-c__1*MathieuS(-1,-2,arccos(cos
(1/2*x)))+c__1*MathieuSPrime(-1,-2,arccos(cos(1/2*x)))-MathieuCPrime(-1,-2,
arccos(cos(1/2*x)))*csgn(sin(1/2*x))+MathieuC(-1,-2,arccos(cos(1/2*x)))*csgn(
sin(1/2*x))+4*MathieuC(-1,-2,arccos(cos(1/2*x)))*cos(x)+MathieuCPrime(-1,-2,
arccos(cos(1/2*x)))-MathieuC(-1,-2,arccos(cos(1/2*x))))/cos(x)

 

 

Download why_c_in_solution_may_23_2025.mw

Update

Looked up the textbook, it says solution exist and unique over 0<=x<=1/3, using these now Maple verifies the ode itself, but does not verify the IC (because c__1 is there). Here is updated worksheet. The bottom line, I think the solution is wrong as it should not have any constant of integration in it. Textbook also does say what the solution should be.

restart;

interface(version);

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

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 20. The version installed in this computer is 19 created May 21, 2025, 13:44 hours Eastern Time, found in the directory /home/me/maple/toolbox/2025/Maple Customer Support Updates/lib/Maple`

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.`

restart;

libname;

"/home/me/maple/toolbox/2025/Physics Updates/lib", "/home/me/maple/toolbox/2025/Maple Customer Support Updates/lib", "/home/me/maple2025/lib"

ode:=diff(y(x),x)=1+y(x)+y(x)^2*cos(x);
IC:=y(0)=0;
maple_sol:=dsolve([ode,IC]):
simplify(maple_sol) assuming x>=0 and x<=1/3;

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

y(0) = 0

y(x) = (2*c__1*MathieuS(-1, -2, (1/2)*x)+2*MathieuC(-1, -2, (1/2)*x))/(c__1*MathieuSPrime(-1, -2, (1/2)*x)-c__1*MathieuS(-1, -2, (1/2)*x)+MathieuCPrime(-1, -2, (1/2)*x)-MathieuC(-1, -2, (1/2)*x))

odetest(%,[ode,IC]);

[0, -2/(c__1-1)]

 

 

Download why_c_in_solution_may_23_2025_v2.mw

Hello,

I have a few questions.

  1. When using ordered list, it keeps getting out of order. It will do 1, 2, then 5, 6 sometimes. If I tried to delete incorrectly numbered list, instead of restarting from the correct order, it will keep incrementing.
  2. How do I create a indented bullet list?
  3. Documentation for Maple 2025 doesn't seem to be up to date. I am looking to use "Tabkey" to indent text. It seems really difficult to get it done. Where do I find "Format>Tab Navigation"?
    1. https://www.maplesoft.com/support/help/Maple/view.aspx?path=worksheet/documenting/tabkey

Thanks for the help.

Same exact code. When adding Physics:-Setup(assumingusesAssume = true):  before, now pdsolve do not give solution.

Removing Physics:-Setup(assumingusesAssume = true): now it works.

Why? Should not solution be returned in both cases?

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 1872 and is the same as the version installed in this computer, created 2025, May 17, 22:58 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 17 and is the same as the version installed in this computer, created May 5, 2025, 12:37 hours Eastern Time.`

restart;

Example 1. Adding Physics:-Setup(assumingusesAssume = true): makes pdsolve fail

 

Physics:-Setup(assumingusesAssume = true):

pde := diff(u(r, t), t) = k*diff(u(r, t), r$2):
ic  := u(r,0)=r*f(r):
bc  := u(0,t)=0,u(a,t)=a*phi(t):
sol:= pdsolve({pde, ic, bc}, u(r, t));

 

 

Example 2. Same code but removing Physics:-Setup(assumingusesAssume = true): makes it work

 

restart;

pde := diff(u(r, t), t) = k*diff(u(r, t), r$2):
ic  := u(r,0)=r*f(r):
bc  := u(0,t)=0,u(a,t)=a*phi(t):
sol:= pdsolve({pde, ic, bc}, u(r, t));

u(r, t) = Sum(2*sin(n*Pi*r/a)*exp(-k*Pi^2*n^2*t/a^2)*(Int(r*(-phi(0)+f(r))*sin(n*Pi*r/a), r = 0 .. a))/a, n = 1 .. infinity)+Int(Sum(2*sin(n*Pi*r/a)*exp(-k*Pi^2*n^2*(t-tau)/a^2)*(diff(phi(tau), tau))*a*(-1)^n/(n*Pi), n = 1 .. infinity), tau = 0 .. t)+r*phi(t)

 


 

Download pdsolve_fail_when_adding_assuming.mw

This below shows strange side effect of calling latex(sol,'output'='string'):

calling pdsolve on one pde, followed by latex() call, cause the next call after that to pdsolve to fail.

Any idea why this happens and any workaround so code can call latex in between without getting this error?

i.e.   sol:=pdsolve(...);  sol:=pdsolve(...);  WORKS

But    sol:=pdsolve(...); latex(sol,output=string);   sol:=pdsolve(...);  FAIL

Clearly there is some global/buffering issue somewhere. Why is calling latex makes pdsolve fail?

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 1871 and is the same as the version installed in this computer, created 2025, May 15, 11:28 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 17 and is the same as the version installed in this computer, created May 5, 2025, 12:37 hours Eastern Time.`

restart;

pde :=  diff(u(x,t),t)=k*diff(u(x,t),x$2)+(exp(-c*t)*sin(2*Pi*x/L));
ic  :=  u(x,0)=f(x);
bc  :=  D[1](u)(0,t)=0, D[1](u)(L,t)=0;
sol:=pdsolve([pde,ic,bc],u(x,t)) assuming L>0,t>0,k>0:

diff(u(x, t), t) = k*(diff(diff(u(x, t), x), x))+exp(-c*t)*sin(2*Pi*x/L)

u(x, 0) = f(x)

(D[1](u))(0, t) = 0, (D[1](u))(L, t) = 0

the_latex:=latex(sol,'output'='string'): #THIS CAUSE ERROR in next command, if this was not here, next call works

pde := diff(u(x,t),t)=k*diff(u(x,t),x$2)-beta*u(x,t);
bc:= D[1](u)(0,t)=0,D[1](u)(Pi,t)=0;
ic  := u(x,0)=x;
sol:=pdsolve([pde,bc,ic],u(x,t)) assuming beta>0;

diff(u(x, t), t) = k*(diff(diff(u(x, t), x), x))-beta*u(x, t)

(D[1](u))(0, t) = 0, (D[1](u))(Pi, t) = 0

u(x, 0) = x

Error, (in assuming) when calling 'unknown'. Received: 'invalid input: diff received Pi, which is not valid for its 2nd argument'

 


 

Download strange_latex_effect.mw

 

This simple expression (from a recent post) crashes Maple:

simplify(tan(Pi/5) + sin(Pi/15) - sqrt(15));

In Maple 2025, in a new worksheet, this command crashes Maple; it is not possible to interrupt the computation (with the "Stop" button) and the worksheet must be closed.
In Maple 2024, the computation can be interrupted, but after repeating (maybe twice) the command, the interruption becomes impossible.

Question: is there a simpler command which crashes Maple?

How to replace the symbols “true” with t and “false” with f in the output of the following code:

with(Logic);

TruthTable(a &xor b)

I tried the following but it didn't work.
subs([true = t, false = f], TruthTable(a &xor b));

This solution by dsolve is correct. I get same solution. The problem is odetest does not give zero.

All my simplification attempts failed and adding assumptions to call to odetest does not change anything for what I tried. i.e. could not make Maple show that the result of odetest is zero.

Any one can come up with smart way to verify this solution is correct? 

interface(version);

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

restart;

ode:=diff(y(x),x)*(x-ln(diff(y(x),x))) = 1;
maple_sol:=dsolve(ode);

(diff(y(x), x))*(x-ln(diff(y(x), x))) = 1

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

the_residue:=odetest(maple_sol,ode);

(-x+ln(-1/LambertW(-1/exp(x)))-LambertW(-1/exp(x)))/LambertW(-1/exp(x))

Digits:=100;
plot(the_residue,x=0..10)

100

 

 

Download odetest_challange_may_15_2025.mw

Note that coulditbe(the_residue=0) gives true, but this is not reliable way to check, so this method does not coumt.

Hello,

With the new version 2025, double-clicking a file opens a second instance of Maple.

How can I make this open a new tab in the active instance, as it did with version 2024?

Thank you.

Bests regards.

I wanted to try this simplification in Maple 2025, only to find timelimit hangs.

Waited 3 hrs when timelimit was 30 second. It seems simplify got locked up and timelimit does not work.

Not only that, Maple itself hangs and clicking on retsrat kernel or red small bottom at lower level corner in Maple 2025 has no effect at all.  

Only way is to kill all of Maple from command line.

Make sure to save all your work before trying.

There are two bugs here: First is that timelimit still hangs (even though Maplesoft claimed it is fixed almost 5 years ago)

https://www.mapleprimes.com/maplesoftblog/213986-Introducing-Maple-Learn-officially

You will also be pleased to know that Maple 2021 addresses the timelimit() issue that you mentioned.

The second issue is that one can not close the kernel from frontend. (well, this is because kernel hanged)

Note that closing Maple works using File->EXIT but this leaves the Maple kernel/mserver  running  in background!

So had to go kill that process from command line manually also.

So make sure to do this, else you will end up with many mserver processes running in background after maple is closed if you try this more than one time.

Any one knows why this happens for this example? Should not timelimit have finally been fixed in Maple 2025?

I have been complaining about timelimit not always working for ages. Have no idea why Maplesoft can't figure solution to this problem for good. 

timelimit is the most important command for me, as without it, my program will never work and will just keep hanging.

I spend 50% of my time finding worarounds around Maple bugs instead of what I should be doing which is write more code.

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 1869. The version installed in this computer is 1866 created 2025, May 6, 10:52 hours Pacific Time, found in the directory /home/me/maple/toolbox/2025/Physics Updates/lib/`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 17 and is the same as the version installed in this computer, created May 5, 2025, 12:37 hours Eastern Time.`

restart;

e:= -a*(-1/2*((1/2*x)^a)^4*(2^a)^4*_C8^4*a*x+1/2*((1/2*x)^a)^3*(2^a)^3*(((2^a)^2*((
1/2*x)^a)^2*_C8^2-a^2*b^2+b^2)^2/(2^a)^2/((1/2*x)^a)^2/_C8^2)^(1/2)*_C8^3*x+1/4
*((1/2*x)^a)^2*(2^a)^2*(((2^a)^2*((1/2*x)^a)^2*_C8^2-a^2*b^2+b^2)^2/(2^a)^2/((1
/2*x)^a)^2/_C8^2)^(1/2)*4^(1/2)*(x^2*(((1/2*x)^a)^4*(2^a)^4*_C8^4*a^2+(2^a)^4*(
(1/2*x)^a)^4*_C8^4+2*((1/2*x)^a)^2*(2^a)^2*_C8^2*a^4*b^2-2*((1/2*x)^a)^3*(2^a)^
3*(((2^a)^2*((1/2*x)^a)^2*_C8^2-a^2*b^2+b^2)^2/(2^a)^2/((1/2*x)^a)^2/_C8^2)^(1/
2)*_C8^3*a-4*a^2*b^2*(2^a)^2*((1/2*x)^a)^2*_C8^2+a^6*b^4-2*(1/2*x)^a*2^a*(((2^a
)^2*((1/2*x)^a)^2*_C8^2-a^2*b^2+b^2)^2/(2^a)^2/((1/2*x)^a)^2/_C8^2)^(1/2)*_C8*a
^3*b^2+2*b^2*(2^a)^2*((1/2*x)^a)^2*_C8^2-a^4*b^4+2*(1/2*x)^a*2^a*(((2^a)^2*((1/
2*x)^a)^2*_C8^2-a^2*b^2+b^2)^2/(2^a)^2/((1/2*x)^a)^2/_C8^2)^(1/2)*_C8*a*b^2-a^2
*b^4+b^4)/(a-1)^2/(1+a)^2/_C8^2/((1/2*x)^a)^2/(2^a)^2)^(1/2)*_C8^2*a^2+1/2*a^5*
b^4*x-1/2*(1/2*x)^a*2^a*(((2^a)^2*((1/2*x)^a)^2*_C8^2-a^2*b^2+b^2)^2/(2^a)^2/((
1/2*x)^a)^2/_C8^2)^(1/2)*_C8*a^2*b^2*x-1/4*((1/2*x)^a)^2*(2^a)^2*(((2^a)^2*((1/
2*x)^a)^2*_C8^2-a^2*b^2+b^2)^2/(2^a)^2/((1/2*x)^a)^2/_C8^2)^(1/2)*4^(1/2)*(x^2*
(((1/2*x)^a)^4*(2^a)^4*_C8^4*a^2+(2^a)^4*((1/2*x)^a)^4*_C8^4+2*((1/2*x)^a)^2*(2
^a)^2*_C8^2*a^4*b^2-2*((1/2*x)^a)^3*(2^a)^3*(((2^a)^2*((1/2*x)^a)^2*_C8^2-a^2*b
^2+b^2)^2/(2^a)^2/((1/2*x)^a)^2/_C8^2)^(1/2)*_C8^3*a-4*a^2*b^2*(2^a)^2*((1/2*x)
^a)^2*_C8^2+a^6*b^4-2*(1/2*x)^a*2^a*(((2^a)^2*((1/2*x)^a)^2*_C8^2-a^2*b^2+b^2)^
2/(2^a)^2/((1/2*x)^a)^2/_C8^2)^(1/2)*_C8*a^3*b^2+2*b^2*(2^a)^2*((1/2*x)^a)^2*
_C8^2-a^4*b^4+2*(1/2*x)^a*2^a*(((2^a)^2*((1/2*x)^a)^2*_C8^2-a^2*b^2+b^2)^2/(2^a
)^2/((1/2*x)^a)^2/_C8^2)^(1/2)*_C8*a*b^2-a^2*b^4+b^4)/(a-1)^2/(1+a)^2/_C8^2/((1
/2*x)^a)^2/(2^a)^2)^(1/2)*_C8^2-a^3*b^4*x+1/2*(1/2*x)^a*2^a*(((2^a)^2*((1/2*x)^
a)^2*_C8^2-a^2*b^2+b^2)^2/(2^a)^2/((1/2*x)^a)^2/_C8^2)^(1/2)*_C8*b^2*x+1/2*a*b^
4*x)/(a-1)/(1+a)/_C8^2/(((2^a)^2*((1/2*x)^a)^2*_C8^2-a^2*b^2+b^2)^2/(2^a)^2/((1
/2*x)^a)^2/_C8^2)^(1/2)/((1/2*x)^a)^2/(2^a)^2:

try
  timelimit(30, (simplify(e) assuming real)):
catch:
   print("cought timelimit");
end try:

 

 

Download timelimit_hang_in_maple_2025.mw

is it possible to ask Maple to verify ode solution obtained from book, which is given in parametric form to check if it is correct?

I know odetest supports both explicit and implicit solutions. But parametric solution is neither of these.

The solution in parametric form makes it look simple to look at and understand, but at same time, not practical in terms of obtaining an explicit solution to verify it and to use it.

The book "handbook of exact solution for ordinary differential equations" by Polyanin and Zaitsev have many such solutions.

Here is one such example of many

I can not just give odetest the y(x) solution above, because the right side depends on tau, which is parameter. If I try to solve for tau in terms of x from the first equation it will become so complicated and odetest hangs. So a whole new different approach is needed as brute force method is not practical in most cases.

restart;

ode:=y(x)*diff(y(x),x)-y(x)=A*x+B;
book_sol:=y(x)=_C1*t*exp( - Int( t/(t^2-t-A),t));
eq:=x=_C1*exp(  - Int( t/(t^2-t-A),t))-B/A;

y(x)*(diff(y(x), x))-y(x) = A*x+B

y(x) = _C1*t*exp(-(Int(t/(t^2-A-t), t)))

x = _C1*exp(-(Int(t/(t^2-A-t), t)))-B/A

value(eq):
solve(%,t):
simplify(eval(book_sol,t=%));

y(x) = _C1*exp(-RootOf(4*A*exp(2*_Z)-4*cosh((ln((A*x+B)/(A*_C1))-_Z)*(4*A+1)^(1/2))^2+exp(2*_Z))+Intat(_a/(-_a^2+A+_a), _a = RootOf(-A*exp(2*RootOf(4*A*exp(2*_Z)-4*cosh((ln((A*x+B)/(A*_C1))-_Z)*(4*A+1)^(1/2))^2+exp(2*_Z)))+_Z^2-exp(RootOf(4*A*exp(2*_Z)-4*cosh((ln((A*x+B)/(A*_C1))-_Z)*(4*A+1)^(1/2))^2+exp(2*_Z)))*_Z+1)*exp(-RootOf(4*A*exp(2*_Z)-4*cosh((ln((A*x+B)/(A*_C1))-_Z)*(4*A+1)^(1/2))^2+exp(2*_Z)))))*RootOf(-A*exp(2*RootOf(4*A*exp(2*_Z)-4*cosh((ln((A*x+B)/(A*_C1))-_Z)*(4*A+1)^(1/2))^2+exp(2*_Z)))+_Z^2-exp(RootOf(4*A*exp(2*_Z)-4*cosh((ln((A*x+B)/(A*_C1))-_Z)*(4*A+1)^(1/2))^2+exp(2*_Z)))*_Z+1)

odetest(%,ode); #hangs

Download how_to_verify_parametric_solution_to_ode.mw

Some more examples from the book where solutions are given only in parametrric form

update

inspired by solution below by @acer, I found if I just use Solve on the x equation, in order to find t as function of x, and use that in the y equation, it will automatically return solution using RootOf.

Hence no need to explicitly evaluate the integral or explicity set up the RootOf manually.

Now odetest work. 

restart;

ode:=y(x)*diff(y(x),x)-y(x)=A*x+B;
book_sol:=y(x)=_C1*t*exp( - Int( t/(t^2-t-A),t));
eq:=x=_C1*exp(  - Int( t/(t^2-t-A),t))-B/A;

y(x)*(diff(y(x), x))-y(x) = A*x+B

y(x) = _C1*t*exp(-(Int(t/(t^2-A-t), t)))

x = _C1*exp(-(Int(t/(t^2-A-t), t)))-B/A

PDEtools:-Solve(eq,t);

t = RootOf(c__1*exp(Intat(_a/(-_a^2+A+_a), _a = _Z))*A-A*x-B)

simplify(eval(book_sol,%));

y(x) = RootOf(c__1*exp(Intat(_a/(-_a^2+A+_a), _a = _Z))*A-A*x-B)*(A*x+B)/A

odetest(%,ode);

0

#compare to Maple's
simplify(dsolve(ode,useInt));

y(x) = -RootOf(-Intat(_a/(-_a^2+A-_a), _a = _Z)+Intat(1/_a, _a = A*x+B)+c__1)*(A*x+B)/A

odetest(%,ode);

0

 

 

Download how_to_verify_parametric_solution_to_ode_V2.mw

1 2 3 4 5 6 7 Page 3 of 8