C_R

3412 Reputation

21 Badges

5 years, 311 days

MaplePrimes Activity


These are answers submitted by C_R

Until a fix is provided, you can push on the debug button next to the interrupt button and then quit the debugger.

Or you can use the Maple screen reader version (which I do).

I think this new warning is for the case that more than one mserver.exe are in use. This is already the case when you start Maple. There are two mservers running (whatever they are doing). These will not profit from the fix. Most times this will not matter but theoretically it could if the fix is relevant for these two mservers

You could try solve (I expand here on vv's answer):

P := numer(normal(C1 - C2))/(lambda*varphi):
params:={indets(P)[]};
conds:=seq(i>0, i in %);
solve({P<0,conds});

However, Maple is not comming to an end because too many cases have to be looked at (where cases are relations between the parameters). To better understand the nature of the solutions Maple has to compute below is a much simpler example

NULL

restart;

C1:= -a*x^2+b

-a*x^2+b

(1)

C2:=m*x

m*x

(2)

P:=C1-C2;
params:={indets(P)[]};
conds:=seq(i>0, i in %);

-a*x^2-m*x+b

 

{a, b, m, x}

 

0 < a, 0 < b, 0 < m, 0 < x

(3)

solve({P<0,conds});# all parameters are treated as variables

{0 < a, 0 < b, 0 < m, 0 < x, b < a*x^2+m*x}

(4)

vars:={x}; # only one parameter declared as variable

{x}

(5)

solve({P<0,conds},vars,parameters=params minus vars)

piecewise(0 < a and 0 < m and 0 < b, [[(-m+sqrt(4*a*b+m^2))/(2*a) < x]], [])

(6)

solve({P<0,0 < a, 0 < b, 0 < m},parameters={a,b,m}); # variable x without assumption

piecewise(0 < a and 0 < m and 0 < b, [[x < -(m+sqrt(4*a*b+m^2))/(2*a)], [(-m+sqrt(4*a*b+m^2))/(2*a) < x]], [])

(7)

 

NULL

Download simple.mw

For 1:
I do not understand. Are you talking about lists, sets or sequences? For sets (i.e. formed with {}) Maple orders the output. For list and sequences the order does not change. You can send an example to make it clearer (use the green arrow)

For 2:
You can insert a table with two columns and one row. Leave the first column empty and adjust the width to the indentation you want. In the second column enter the bullet points. If you want more space between the bullets and the text, use three columns.

For 3:
You find Format Tab navigation in the screen reader version of Maple 2025. The Maple documentation is not fully up to date for the new GUI (such things take time). I cannot find Tab Navigation in the new GUI and it might not exist. With the older GUI I could never make Tabs work.

It's this call to genpoly in evala/inv/heuristic which causes the hang. The argument mods(r,n) is effectively a too large integer. genpoly uses GMP because GMP can also deal with integers.

{--> enter \`evala/inv\`, args = RootOf(_Z^31622993-2, index = 1)

 

RootOf(_Z^31622993-2, index = 1)

(1)

restart

stopat(`evala/inv`,10)

[`evala/inv`]

(2)

stopat(`evala/inv/heuristic`,29)

[`evala/inv`, `evala/inv/heuristic`]

(3)

trace(genpoly)

genpoly

(4)

`evala/inv`(RootOf(_Z^31622993 - 2, index = 1));

execute genpoly, args = ...Integer larger than 100*interface(elisiondigitsthreshold)..., 205, i

 

Timelimit is a Maple kernel function. When the kernel calls an external dll the kernel(including timelimit) waits for the external function to finish. Waiting means not doing anything. The kernel is on halt (is inactive) and can therefore not kill/terminate the running dll. Only the operating system can do that. To avoid such situations, I guess, Maple must check the parameters before calling the dll. Not all dlls are the same. Some might be able to communicate from time to time with mserver.exe (i.e. waking mserver.exe up)

That my hypothesis.

Download toxic.mw

What speaks against

simplify((A/B)^2)
                               1

>We can show that B never gets complex.

(is(0 < (-8*x - 16)*exp(x/2) + x^2 + 4*x + 16*exp(x) + 4) assuming real);
                              true

Meaning B is postive for x>0 and negative for x<0. This is the same for A which means that the squaring in simplify((A/B)^2) is not removing a -1 in A or B when A and B are of opposite sign. Correct!?!

Simplify could apply the same piecewise reasoning to (simplify(A/B) assuming real). Below is a sketch of this approach far from beeing a propper solution. For general use a piecewise investigation of the occurence of complex expression and signs must be implemented.

interface(version);

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

(1)

restart;

A:=-x*(x - 4*exp(x/2) + 2);
B:=x*sqrt((-8*x - 16)*exp(x/2) + x^2 + 4*x + 16*exp(x) + 4);

-x*(x-4*exp((1/2)*x)+2)

 

x*((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)

(2)

plots:-display(Array([plot(A,x=-3..3),plot(B,x=-3..3)]))

 

 

 

 

 

 

Digits:=16;
seq(MmaTranslator:-Mma:-Chop(A-B),x=-2..2,.1)

16

 

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

(3)

simplify(A-B);

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

(4)

simplify(A-B) assuming real;

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

(5)

simplify(evala(A-B)) assuming real;

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

(6)

simplify(normal(A-B)) assuming real;

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

(7)

simplify(A-B,exp) assuming real;

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

(8)

simplify(evalc(A-B)) assuming real;

-x*(((-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4)^(1/2)-4*exp((1/2)*x)+x+2)

(9)

chk:=proc(A,B)
if(((is(A>0) assuming positive) and (is(A < 0) assuming negative)) and (is(B>0) assuming positive) and (is(B < 0) assuming negative)) then

   if is(simplify(A^2/B^2)=1) then
      print("A equals B for real valued x")
   else
      print("chk cannot confirm that A=B")
   end if;

end if
end proc:
chk(A,B);

"A equals B for real valued x"

(10)
 

NULL

Download show_same_may_3_2025-1_piecewise.mw

Solve cannot solve for H[j] because Maple does not know for which j a solution is wanted.

Look at this example for N=3 where j can be 1, 2 or 3

``

sum(f[ij]*(H[j]*gamma[j] - PS[j]*alpha[j]), j = 1 .. N);
subs(N=3,%);
expand(%)

sum(f[ij]*(H[j]*gamma[j]-PS[j]*alpha[j]), j = 1 .. N)

 

sum(f[ij]*(H[j]*gamma[j]-PS[j]*alpha[j]), j = 1 .. 3)

 

H[1]*f[ij]*gamma[1]+H[2]*f[ij]*gamma[2]+H[3]*f[ij]*gamma[3]-PS[1]*alpha[1]*f[ij]-PS[2]*alpha[2]*f[ij]-PS[3]*alpha[3]*f[ij]

(1)
 

NULL

Download solve_for_H[j].mw

@GFY 

To avoid a big part of the problems you have encountered a continuous chirp of Ω will not show the transient response you have observed. With that you solve the problem of using results of a former calculation as input for a subsequent calculation. "Stabiltiy" will be reached much faster. With respect to stabilty criteria (and theory) I cannot add more than what has been said already. You need a robust magnitude detector and do statistic within a well chosen timeframe. In Maple there are many ways to do this.

The chirprate will be crucial. If its too fast, "steady state" will not be reached. Attached is a hands on modification of your worksheet that shows quite some similarity to mmcdara sophisticated approach. Since I have applied a linear chirp, the timescale can be reaplaced by a frequency scale.

Edit: ic5 set at t=-100 to dampen the initial transient.

restart

with(DETools); with(plots); with(plottools); with(Typesetting); Settings(typesetdot = true); with(ExcelTools)

eqn1 := diff(x(t), `$`(t, 2))+`&omega;__1`^2*x(t)+2*xi*`&omega;__1`*(diff(x(t), t))-m__1*l*theta(t)*(diff(theta(t), t))^2-F__1*cos(Omega*t) = 0

diff(diff(x(t), t), t)+omega__1^2*x(t)+2*xi*omega__1*(diff(x(t), t))-m__1*l*theta(t)*(diff(theta(t), t))^2-F__1*cos(Omega*t) = 0

(1)

eqn2 := diff(theta(t), `$`(t, 2))+(diff(x(t), `$`(t, 2)))/l+`&omega;__2`^2*theta(t) = 0

diff(diff(theta(t), t), t)+(diff(diff(x(t), t), t))/l+omega__2^2*theta(t) = 0

(2)

NULL

couple := [eqn1, eqn2]

[diff(diff(x(t), t), t)+omega__1^2*x(t)+2*xi*omega__1*(diff(x(t), t))-m__1*l*theta(t)*(diff(theta(t), t))^2-F__1*cos(Omega*t) = 0, diff(diff(theta(t), t), t)+(diff(diff(x(t), t), t))/l+omega__2^2*theta(t) = 0]

(3)

data := xi = 0.25e-1, f = 600, l = 3, g = 9.8, m = 300, M = 300, k = 2000

xi = 0.25e-1, f = 600, l = 3, g = 9.8, m = 300, M = 300, k = 2000

(4)

data1 := evalf(subs(data, [`&omega;__1` = sqrt(k/(M+m)), `&omega;__2` = sqrt(g/l), m__1 = m/(M+m), F__1 = f/(M+m)])[])

omega__1 = 1.825741859, omega__2 = 1.807392228, m__1 = .5000000000, F__1 = 1.

(5)

couple1 := subs(data, data1, Omega = (1/800)*t, couple)

[diff(diff(x(t), t), t)+3.333333336*x(t)+0.9128709295e-1*(diff(x(t), t))-1.500000000*theta(t)*(diff(theta(t), t))^2-1.*cos((1/800)*t^2) = 0, diff(diff(theta(t), t), t)+(1/3)*(diff(diff(x(t), t), t))+3.266666666*theta(t) = 0]

(6)

NULL

ics5 := x(0) = 0.1e-3, (D(x))(0) = 0, theta(0) = 0.1e-3, (D(theta))(0) = 0

x(0) = 0.1e-3, (D(x))(0) = 0, theta(0) = 0.1e-3, (D(theta))(0) = 0

(7)

solu12 := dsolve({ics5, couple1[]}, [x(t), theta(t)], output = procedurelist, numeric, method = rosenbrock, maxfun = -1)

proc (x_rosenbrock) local _res, _dat, _vars, _solnproc, _xout, _ndsol, _pars, _n, _i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; if 1 < nargs then error "invalid input: too many arguments" end if; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then _xout := evalf[_EnvDSNumericSaveDigits](x_rosenbrock) else _xout := evalf(x_rosenbrock) end if; _dat := Array(1..4, {(1) = proc (_x_in) local _x_out, _dtbl, _dat, _vmap, _x0, _y0, _val, _digits, _neq, _nevar, _ndisc, _nevt, _pars, _ini, _par, _i, _j, _k, _src, _t1; option `Copyright (c) 2002 by Waterloo Maple Inc. All rights reserved.`; table( [( "complex" ) = false ] ) _x_out := _x_in; _pars := []; _dtbl := array( 1 .. 4, [( 1 ) = (array( 1 .. 28, [( 1 ) = (datatype = float[8], order = C_order, storage = rectangular), ( 2 ) = (datatype = float[8], order = C_order, storage = rectangular), ( 3 ) = ([0, 0, 0, Array(1..0, 1..2, {}, datatype = float[8], order = C_order)]), ( 4 ) = (Array(1..65, {(1) = 4, (2) = 4, (3) = 0, (4) = 0, (5) = 0, (6) = 0, (7) = 1, (8) = 0, (9) = 0, (10) = 0, (11) = 0, (12) = 0, (13) = 0, (14) = 0, (15) = 0, (16) = 0, (17) = 0, (18) = 1, (19) = 0, (20) = 0, (21) = 0, (22) = 2, (23) = 3, (24) = 0, (25) = 1, (26) = 15, (27) = 1, (28) = 0, (29) = 1, (30) = 3, (31) = 3, (32) = 0, (33) = 2, (34) = 0, (35) = 0, (36) = 0, (37) = 0, (38) = 0, (39) = 0, (40) = 0, (41) = 0, (42) = 0, (43) = 1, (44) = 0, (45) = 0, (46) = 0, (47) = 0, (48) = 0, (49) = 0, (50) = 50, (51) = 1, (52) = 0, (53) = 0, (54) = 0, (55) = 0, (56) = 0, (57) = 0, (58) = 0, (59) = 10000, (60) = 0, (61) = 1000, (62) = 0, (63) = 0, (64) = -1, (65) = 0}, datatype = integer[8])), ( 5 ) = (Array(1..28, {(1) = .0, (2) = 0.10e-5, (3) = .0, (4) = 0.500001e-14, (5) = .0, (6) = 0.19336201260811252e-1, (7) = .0, (8) = 0.10e-5, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = 1.0, (14) = .0, (15) = .49999999999999, (16) = .0, (17) = 1.0, (18) = 1.0, (19) = .0, (20) = .0, (21) = 1.0, (22) = 1.0, (23) = .0, (24) = .0, (25) = 0.10e-14, (26) = .0, (27) = .0, (28) = .0}, datatype = float[8], order = C_order)), ( 6 ) = (Array(1..4, {(1) = 0.10e-3, (2) = .0, (3) = 0.10e-3, (4) = .0}, datatype = float[8], order = C_order)), ( 7 ) = ([Array(1..4, 1..7, {(1, 1) = .0, (1, 2) = .203125, (1, 3) = .3046875, (1, 4) = .75, (1, 5) = .8125, (1, 6) = .40625, (1, 7) = .8125, (2, 1) = 0.6378173828125e-1, (2, 2) = .0, (2, 3) = .279296875, (2, 4) = .27237892150878906, (2, 5) = -0.9686851501464844e-1, (2, 6) = 0.1956939697265625e-1, (2, 7) = .5381584167480469, (3, 1) = 0.31890869140625e-1, (3, 2) = .0, (3, 3) = -.34375, (3, 4) = -.335235595703125, (3, 5) = .2296142578125, (3, 6) = .41748046875, (3, 7) = 11.480712890625, (4, 1) = 0.9710520505905151e-1, (4, 2) = .0, (4, 3) = .40350341796875, (4, 4) = 0.20297467708587646e-1, (4, 5) = -0.6054282188415527e-2, (4, 6) = -0.4770040512084961e-1, (4, 7) = .77858567237854}, datatype = float[8], order = C_order), Array(1..6, 1..6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = 1.0, (2, 1) = .25, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = 1.0, (3, 1) = .1875, (3, 2) = .5625, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = 2.0, (4, 1) = .23583984375, (4, 2) = -.87890625, (4, 3) = .890625, (4, 4) = .0, (4, 5) = .0, (4, 6) = .2681884765625, (5, 1) = .1272735595703125, (5, 2) = -.5009765625, (5, 3) = .44921875, (5, 4) = -0.128936767578125e-1, (5, 5) = .0, (5, 6) = 0.626220703125e-1, (6, 1) = -0.927734375e-1, (6, 2) = .626220703125, (6, 3) = -.4326171875, (6, 4) = .1418304443359375, (6, 5) = -0.861053466796875e-1, (6, 6) = .3131103515625}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .386, (3) = .21, (4) = .63, (5) = 1.0, (6) = 1.0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .25, (2) = -.1043, (3) = .1035, (4) = -0.362e-1, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, 1..5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (2, 1) = 1.544, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (3, 1) = .9466785280815533, (3, 2) = .25570116989825814, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (4, 1) = 3.3148251870684886, (4, 2) = 2.896124015972123, (4, 3) = .9986419139977808, (4, 4) = .0, (4, 5) = .0, (5, 1) = 1.2212245092262748, (5, 2) = 6.019134481287752, (5, 3) = 12.537083329320874, (5, 4) = -.687886036105895, (5, 5) = .0, (6, 1) = 1.2212245092262748, (6, 2) = 6.019134481287752, (6, 3) = 12.537083329320874, (6, 4) = -.687886036105895, (6, 5) = 1.0}, datatype = float[8], order = C_order), Array(1..6, 1..5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (2, 1) = -5.6688, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (3, 1) = -2.4300933568337584, (3, 2) = -.20635991570891224, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (4, 1) = -.10735290581452621, (4, 2) = -9.594562251021896, (4, 3) = -20.470286148096154, (4, 4) = .0, (4, 5) = .0, (5, 1) = 7.496443313968615, (5, 2) = -10.246804314641219, (5, 3) = -33.99990352819906, (5, 4) = 11.708908932061595, (5, 5) = .0, (6, 1) = 8.083246795922411, (6, 2) = -7.981132988062785, (6, 3) = -31.52159432874373, (6, 4) = 16.319305431231363, (6, 5) = -6.0588182388340535}, datatype = float[8], order = C_order), Array(1..3, 1..5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (2, 1) = 10.126235083446911, (2, 2) = -7.487995877607633, (2, 3) = -34.800918615557414, (2, 4) = -7.9927717075687275, (2, 5) = 1.0251377232956207, (3, 1) = -.6762803392806898, (3, 2) = 6.087714651678606, (3, 3) = 16.43084320892463, (3, 4) = 24.767225114183653, (3, 5) = -6.5943891257167815}, datatype = float[8], order = C_order)]), ( 9 ) = ([Array(1..4, {(1) = 1.0, (2) = 1.0, (3) = 1.0, (4) = 1.0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .0, (2) = -.0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, 1..4, {(1, 1) = .0, (1, 2) = 1.0, (1, 3) = .0, (1, 4) = .0, (2, 1) = -3.333333336, (2, 2) = -0.9128709295e-1, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = 1.0, (4, 1) = 1.111111112, (4, 2) = 0.30429030983333334e-1, (4, 3) = -3.266666666, (4, 4) = -.0}, datatype = float[8], order = C_order), Array(1..4, 1..4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, 1..4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0}, datatype = float[8], order = C_order), Array(1..4, 1..6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = 0, (2) = 0, (3) = 0, (4) = 0}, datatype = integer[8]), Array(1..4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..8, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = 0, (2) = 0, (3) = 0, (4) = 0}, datatype = integer[8])]), ( 8 ) = ([Array(1..4, {(1) = 0.10e-3, (2) = .0, (3) = 0.10e-3, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .0, (2) = .0, (3) = .0, (4) = .0}, datatype = float[8], order = C_order), Array(1..4, {(1) = .9996666666664, (2) = -3.423478888806103, (3) = -.3335488888887333, (4) = 2.0961606332649314}, datatype = float[8], order = C_order), 0, 0]), ( 11 ) = (Array(1..6, 0..4, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (2, 0) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (3, 0) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (4, 0) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (5, 0) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (6, 0) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0}, datatype = float[8], order = C_order)), ( 10 ) = ([proc (N, X, Y, YP) option `[Y[1] = x(t), Y[2] = diff(x(t),t), Y[3] = theta(t), Y[4] = diff(theta(t),t)]`; YP[2] := -3.333333336*Y[1]-0.9128709295e-1*Y[2]+1.500000000*Y[3]*Y[4]^2+1.*cos((1/800)*X^2); YP[4] := 1.1111111120000000000*Y[1]+0.30429030983333333333e-1*Y[2]-.50000000000000000000*Y[3]*Y[4]^2-.33333333333333333333*cos((1/800)*X^2)-3.266666666*Y[3]; YP[1] := Y[2]; YP[3] := Y[4]; 0 end proc, proc (X, Y, FX, FY) FX[1 .. 4] := 0; FY[1 .. 4, 1 .. 4] := 0; FY[2, 1] := -3.333333336; FY[4, 1] := 1.1111111120000000000; FY[1, 2] := 1; FY[2, 2] := -0.9128709295e-1; FY[4, 2] := 0.30429030983333333333e-1; FY[2, 3] := 1.500000000*Y[4]^2; FY[4, 3] := -.50000000000000000000*Y[4]^2-3.266666666; FY[2, 4] := 3.000000000*Y[3]*Y[4]; FY[3, 4] := 1; FY[4, 4] := -1.00000000000000*Y[3]*Y[4]; FX[2] := -0.250000000000000e-2*X*sin((1/800)*X^2); FX[4] := 0.833333333333332e-3*X*sin((1/800)*X^2); 0 end proc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), ( 13 ) = (), ( 12 ) = (), ( 15 ) = ("rosenbrock"), ( 14 ) = ([0, 0]), ( 18 ) = ([]), ( 19 ) = (0), ( 16 ) = ([0, 0, 0, 0, 0, 0, []]), ( 17 ) = ([proc (N, X, Y, YP) option `[Y[1] = x(t), Y[2] = diff(x(t),t), Y[3] = theta(t), Y[4] = diff(theta(t),t)]`; YP[2] := -3.333333336*Y[1]-0.9128709295e-1*Y[2]+1.500000000*Y[3]*Y[4]^2+1.*cos((1/800)*X^2); YP[4] := 1.1111111120000000000*Y[1]+0.30429030983333333333e-1*Y[2]-.50000000000000000000*Y[3]*Y[4]^2-.33333333333333333333*cos((1/800)*X^2)-3.266666666*Y[3]; YP[1] := Y[2]; YP[3] := Y[4]; 0 end proc, proc (X, Y, FX, FY) FX[1 .. 4] := 0; FY[1 .. 4, 1 .. 4] := 0; FY[2, 1] := -3.333333336; FY[4, 1] := 1.1111111120000000000; FY[1, 2] := 1; FY[2, 2] := -0.9128709295e-1; FY[4, 2] := 0.30429030983333333333e-1; FY[2, 3] := 1.500000000*Y[4]^2; FY[4, 3] := -.50000000000000000000*Y[4]^2-3.266666666; FY[2, 4] := 3.000000000*Y[3]*Y[4]; FY[3, 4] := 1; FY[4, 4] := -1.00000000000000*Y[3]*Y[4]; FX[2] := -0.250000000000000e-2*X*sin((1/800)*X^2); FX[4] := 0.833333333333332e-3*X*sin((1/800)*X^2); 0 end proc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), ( 22 ) = (0), ( 23 ) = (0), ( 20 ) = ([]), ( 21 ) = (0), ( 27 ) = (""), ( 26 ) = (Array(1..0, {})), ( 25 ) = (Array(1..0, {})), ( 24 ) = (0), ( 28 ) = (0)  ] ))  ] ); _y0 := Array(0..4, {(1) = 0., (2) = 0.1e-3, (3) = 0., (4) = 0.1e-3}); _vmap := array( 1 .. 4, [( 1 ) = (1), ( 2 ) = (2), ( 3 ) = (3), ( 4 ) = (4)  ] ); _x0 := _dtbl[1][5][5]; _neq := _dtbl[1][4][1]; _nevar := _dtbl[1][4][3]; _ndisc := _dtbl[1][4][4]; _nevt := _dtbl[1][4][16]; if not type(_x_out, 'numeric') then if member(_x_out, ["start", "left", "right"]) then if _Env_smart_dsolve_numeric = true or _dtbl[1][4][10] = 1 then if _x_out = "left" then if type(_dtbl[2], 'array') then return _dtbl[2][5][1] end if elif _x_out = "right" then if type(_dtbl[3], 'array') then return _dtbl[3][5][1] end if end if end if; return _dtbl[1][5][5] elif _x_out = "method" then return _dtbl[1][15] elif _x_out = "storage" then return evalb(_dtbl[1][4][10] = 1) elif _x_out = "leftdata" then if not type(_dtbl[2], 'array') then return NULL else return eval(_dtbl[2]) end if elif _x_out = "rightdata" then if not type(_dtbl[3], 'array') then return NULL else return eval(_dtbl[3]) end if elif _x_out = "enginedata" then return _dtbl[1] elif _x_out = "enginereset" then _dtbl[2] := evaln(_dtbl[2]); _dtbl[3] := evaln(_dtbl[3]); return NULL elif _x_out = "initial" then return procname(_y0[0]) elif _x_out = "laxtol" then return _dtbl[`if`(member(_dtbl[4], {2, 3}), _dtbl[4], 1)][5][18] elif _x_out = "numfun" then return `if`(member(_dtbl[4], {2, 3}), _dtbl[_dtbl[4]][4][18], 0) elif _x_out = "parameters" then return [seq(_y0[_neq+_i], _i = 1 .. nops(_pars))] elif _x_out = "initial_and_parameters" then return procname(_y0[0]), [seq(_y0[_neq+_i], _i = 1 .. nops(_pars))] elif _x_out = "last" then if _dtbl[4] <> 2 and _dtbl[4] <> 3 or _x0-_dtbl[_dtbl[4]][5][1] = 0. then error "no information is available on last computed point" else _x_out := _dtbl[_dtbl[4]][5][1] end if elif _x_out = "function" then if _dtbl[1][4][33]-2. = 0 then return eval(_dtbl[1][10], 1) else return eval(_dtbl[1][10][1], 1) end if elif _x_out = "map" then return copy(_vmap) elif type(_x_in, `=`) and type(rhs(_x_in), 'list') and member(lhs(_x_in), {"initial", "parameters", "initial_and_parameters"}) then _ini, _par := [], []; if lhs(_x_in) = "initial" then _ini := rhs(_x_in) elif lhs(_x_in) = "parameters" then _par := rhs(_x_in) elif select(type, rhs(_x_in), `=`) <> [] then _par, _ini := selectremove(type, rhs(_x_in), `=`) elif nops(rhs(_x_in)) < nops(_pars)+1 then error "insufficient data for specification of initial and parameters" else _par := rhs(_x_in)[-nops(_pars) .. -1]; _ini := rhs(_x_in)[1 .. -nops(_pars)-1] end if; _x_out := lhs(_x_out); _i := false; if _par <> [] then _i := `dsolve/numeric/process_parameters`(_neq, _pars, _par, _y0) end if; if _ini <> [] then _i := `dsolve/numeric/process_initial`(_neq-_nevar, _ini, _y0, _pars, _vmap) or _i end if; if _i then `dsolve/numeric/SC/reinitialize`(_dtbl, _y0, _neq, procname, _pars); if _Env_smart_dsolve_numeric = true and type(_y0[0], 'numeric') and _dtbl[1][4][10] <> 1 then procname("right") := _y0[0]; procname("left") := _y0[0] end if end if; if _x_out = "initial" then return [_y0[0], seq(_y0[_vmap[_i]], _i = 1 .. _neq-_nevar)] elif _x_out = "parameters" then return [seq(_y0[_neq+_i], _i = 1 .. nops(_pars))] else return [_y0[0], seq(_y0[_vmap[_i]], _i = 1 .. _neq-_nevar)], [seq(_y0[_neq+_i], _i = 1 .. nops(_pars))] end if elif _x_in = "eventstop" then if _nevt = 0 then error "this solution has no events" end if; _i := _dtbl[4]; if _i <> 2 and _i <> 3 then return 0 end if; if _dtbl[_i][4][10] = 1 and assigned(_dtbl[5-_i]) and _dtbl[_i][4][9] < 100 and 100 <= _dtbl[5-_i][4][9] then _i := 5-_i; _dtbl[4] := _i; _j := round(_dtbl[_i][4][17]); return round(_dtbl[_i][3][1][_j, 1]) elif 100 <= _dtbl[_i][4][9] then _j := round(_dtbl[_i][4][17]); return round(_dtbl[_i][3][1][_j, 1]) else return 0 end if elif _x_in = "eventstatus" then if _nevt = 0 then error "this solution has no events" end if; _i := [selectremove(proc (a) options operator, arrow; _dtbl[1][3][1][a, 7] = 1 end proc, {seq(_j, _j = 1 .. round(_dtbl[1][3][1][_nevt+1, 1]))})]; return ':-enabled' = _i[1], ':-disabled' = _i[2] elif _x_in = "eventclear" then if _nevt = 0 then error "this solution has no events" end if; _i := _dtbl[4]; if _i <> 2 and _i <> 3 then error "no events to clear" end if; if _dtbl[_i][4][10] = 1 and assigned(_dtbl[5-_i]) and _dtbl[_i][4][9] < 100 and 100 < _dtbl[5-_i][4][9] then _dtbl[4] := 5-_i; _i := 5-_i end if; if _dtbl[_i][4][9] < 100 then error "no events to clear" elif _nevt < _dtbl[_i][4][9]-100 then error "event error condition cannot be cleared" else _j := _dtbl[_i][4][9]-100; if irem(round(_dtbl[_i][3][1][_j, 4]), 2) = 1 then error "retriggerable events cannot be cleared" end if; _j := round(_dtbl[_i][3][1][_j, 1]); for _k to _nevt do if _dtbl[_i][3][1][_k, 1] = _j then if _dtbl[_i][3][1][_k, 2] = 3 then error "range events cannot be cleared" end if; _dtbl[_i][3][1][_k, 8] := _dtbl[_i][3][1][_nevt+1, 8] end if end do; _dtbl[_i][4][17] := 0; _dtbl[_i][4][9] := 0; if _dtbl[1][4][10] = 1 then if _i = 2 then try procname(procname("left")) catch:  end try else try procname(procname("right")) catch:  end try end if end if end if; return  elif type(_x_in, `=`) and member(lhs(_x_in), {"eventdisable", "eventenable"}) then if _nevt = 0 then error "this solution has no events" end if; if type(rhs(_x_in), {('list')('posint'), ('set')('posint')}) then _i := {op(rhs(_x_in))} elif type(rhs(_x_in), 'posint') then _i := {rhs(_x_in)} else error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nevt+1, 1]) end if; if select(proc (a) options operator, arrow; _nevt < a end proc, _i) <> {} then error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nevt+1, 1]) end if; _k := {}; for _j to _nevt do if member(round(_dtbl[1][3][1][_j, 1]), _i) then _k := `union`(_k, {_j}) end if end do; _i := _k; if lhs(_x_in) = "eventdisable" then _dtbl[4] := 0; _j := [evalb(assigned(_dtbl[2]) and member(_dtbl[2][4][17], _i)), evalb(assigned(_dtbl[3]) and member(_dtbl[3][4][17], _i))]; for _k in _i do _dtbl[1][3][1][_k, 7] := 0; if assigned(_dtbl[2]) then _dtbl[2][3][1][_k, 7] := 0 end if; if assigned(_dtbl[3]) then _dtbl[3][3][1][_k, 7] := 0 end if end do; if _j[1] then for _k to _nevt+1 do if _k <= _nevt and not type(_dtbl[2][3][4][_k, 1], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to defined init `, _dtbl[2][3][4][_k, 1]); _dtbl[2][3][1][_k, 8] := _dtbl[2][3][4][_k, 1] elif _dtbl[2][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[2][3][1][_k, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to rate hysteresis init `, _dtbl[2][5][24]); _dtbl[2][3][1][_k, 8] := _dtbl[2][5][24] elif _dtbl[2][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[2][3][1][_k, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to initial init `, _x0); _dtbl[2][3][1][_k, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to fireinitial init `, _x0-1); _dtbl[2][3][1][_k, 8] := _x0-1 end if end do; _dtbl[2][4][17] := 0; _dtbl[2][4][9] := 0; if _dtbl[1][4][10] = 1 then procname(procname("left")) end if end if; if _j[2] then for _k to _nevt+1 do if _k <= _nevt and not type(_dtbl[3][3][4][_k, 2], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to defined init `, _dtbl[3][3][4][_k, 2]); _dtbl[3][3][1][_k, 8] := _dtbl[3][3][4][_k, 2] elif _dtbl[3][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[3][3][1][_k, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to rate hysteresis init `, _dtbl[3][5][24]); _dtbl[3][3][1][_k, 8] := _dtbl[3][5][24] elif _dtbl[3][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[3][3][1][_k, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to initial init `, _x0); _dtbl[3][3][1][_k, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to fireinitial init `, _x0+1); _dtbl[3][3][1][_k, 8] := _x0+1 end if end do; _dtbl[3][4][17] := 0; _dtbl[3][4][9] := 0; if _dtbl[1][4][10] = 1 then procname(procname("right")) end if end if else for _k in _i do _dtbl[1][3][1][_k, 7] := 1 end do; _dtbl[2] := evaln(_dtbl[2]); _dtbl[3] := evaln(_dtbl[3]); _dtbl[4] := 0; if _dtbl[1][4][10] = 1 then if _x0 <= procname("right") then try procname(procname("right")) catch:  end try end if; if procname("left") <= _x0 then try procname(procname("left")) catch:  end try end if end if end if; return  elif type(_x_in, `=`) and lhs(_x_in) = "eventfired" then if not type(rhs(_x_in), 'list') then error "'eventfired' must be specified as a list" end if; if _nevt = 0 then error "this solution has no events" end if; if _dtbl[4] <> 2 and _dtbl[4] <> 3 then error "'direction' must be set prior to calling/setting 'eventfired'" end if; _i := _dtbl[4]; _val := NULL; if not assigned(_EnvEventRetriggerWarned) then _EnvEventRetriggerWarned := false end if; for _k in rhs(_x_in) do if type(_k, 'integer') then _src := _k elif type(_k, 'integer' = 'anything') and type(evalf(rhs(_k)), 'numeric') then _k := lhs(_k) = evalf[max(Digits, 18)](rhs(_k)); _src := lhs(_k) else error "'eventfired' entry is not valid: %1", _k end if; if _src < 1 or round(_dtbl[1][3][1][_nevt+1, 1]) < _src then error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nevt+1, 1]) end if; _src := {seq(`if`(_dtbl[1][3][1][_j, 1]-_src = 0., _j, NULL), _j = 1 .. _nevt)}; if nops(_src) <> 1 then error "'eventfired' can only be set/queried for root-finding events and time/interval events" end if; _src := _src[1]; if _dtbl[1][3][1][_src, 2] <> 0. and _dtbl[1][3][1][_src, 2]-2. <> 0. then error "'eventfired' can only be set/queried for root-finding events and time/interval events" elif irem(round(_dtbl[1][3][1][_src, 4]), 2) = 1 then if _EnvEventRetriggerWarned = false then WARNING(`'eventfired' has no effect on events that retrigger`) end if; _EnvEventRetriggerWarned := true end if; if _dtbl[_i][3][1][_src, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_src, 4]), 32), 2) = 1 then _val := _val, undefined elif type(_dtbl[_i][3][4][_src, _i-1], 'undefined') or _i = 2 and _dtbl[2][3][1][_src, 8] < _dtbl[2][3][4][_src, 1] or _i = 3 and _dtbl[3][3][4][_src, 2] < _dtbl[3][3][1][_src, 8] then _val := _val, _dtbl[_i][3][1][_src, 8] else _val := _val, _dtbl[_i][3][4][_src, _i-1] end if; if type(_k, `=`) then if _dtbl[_i][3][1][_src, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_src, 4]), 32), 2) = 1 then error "cannot set event code for a rate hysteresis event" end if; userinfo(3, {'events', 'eventreset'}, `manual set event code `, _src, ` to value `, rhs(_k)); _dtbl[_i][3][1][_src, 8] := rhs(_k); _dtbl[_i][3][4][_src, _i-1] := rhs(_k) end if end do; return [_val] elif type(_x_in, `=`) and lhs(_x_in) = "direction" then if not member(rhs(_x_in), {-1, 1, ':-left', ':-right'}) then error "'direction' must be specified as either '1' or 'right' (positive) or '-1' or 'left' (negative)" end if; _src := `if`(_dtbl[4] = 2, -1, `if`(_dtbl[4] = 3, 1, undefined)); _i := `if`(member(rhs(_x_in), {1, ':-right'}), 3, 2); _dtbl[4] := _i; _dtbl[_i] := `dsolve/numeric/SC/IVPdcopy`(_dtbl[1], `if`(assigned(_dtbl[_i]), _dtbl[_i], NULL)); if 0 < _nevt then for _j to _nevt+1 do if _j <= _nevt and not type(_dtbl[_i][3][4][_j, _i-1], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to defined init `, _dtbl[_i][3][4][_j, _i-1]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][3][4][_j, _i-1] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to rate hysteresis init `, _dtbl[_i][5][24]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][5][24] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to initial init `, _x0); _dtbl[_i][3][1][_j, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to fireinitial init `, _x0-2*_i+5.0); _dtbl[_i][3][1][_j, 8] := _x0-2*_i+5.0 end if end do end if; return _src elif _x_in = "eventcount" then if _dtbl[1][3][1] = 0 or _dtbl[4] <> 2 and _dtbl[4] <> 3 then return 0 else return round(_dtbl[_dtbl[4]][3][1][_nevt+1, 12]) end if elif type(_x_in, `=`) and lhs(_x_in) = "setdatacallback" then if not type(rhs(_x_in), 'nonegint') then error "data callback must be a nonnegative integer (address)" end if; _dtbl[1][28] := rhs(_x_in) elif type(_x_in, `=`) and lhs(_x_in) = "Array" then _i := rhs(_x_in); if not type(_i, 'list') or nops(_i) <> 2 or not type(_i[1], 'numeric') or not type(_i[2], 'posint') or _i[2] < 2 then error "Array output must be specified as [end time, min number of points]" end if; _src := array(1 .. 1, [`dsolve/numeric/SC/IVPdcopy`(_dtbl[1])]); if 0 < 0 then if `dsolve/numeric/checkglobals`(op(_src[1][14]), _pars, _neq, _y0) then `dsolve/numeric/SC/reinitialize`(_src, _y0, _neq, procname, _pars, 1) end if end if; if _src[1][4][7] = 0 then error "parameters must be initialized before solution can be computed" end if; _val := `dsolve/numeric/SC/IVPvalues`(_src[1], _x0 .. _i[1], _i[2], _i[2], []); if _val[3] <> "" then `dsolve/numeric/warning`(cat(`requested integration incomplete, received error:`, convert(_val[3], 'symbol'))) end if; _t1 := Array(1 .. _val[2], 0 .. _neq-_nevar+nops(_pars)); _t1[() .. (), 0] := _val[1][1 .. _val[2], 0]; for _i to _neq-_nevar do _t1[() .. (), _i] := _val[1][1 .. _val[2], _vmap[_i]] end do; for _i to nops(_pars) do _t1[() .. (), _neq-_nevar+_i] := _val[1][1 .. _val[2], _neq+_i] end do; return _t1 else return "procname" end if end if; if _x_out = _x0 then return [_x0, seq(evalf(_dtbl[1][6][_vmap[_i]]), _i = 1 .. _neq-_nevar)] end if; _i := `if`(_x0 <= _x_out, 3, 2); if _x_in = "last" and 0 < _dtbl[_i][4][9] and _dtbl[_i][4][9] < 100 then _dat := eval(_dtbl[_i], 2); _j := _dat[4][20]; return [_dat[11][_j, 0], seq(_dat[11][_j, _vmap[_i]], _i = 1 .. _neq-_nevar-_ndisc), seq(_dat[8][1][_vmap[_i]], _i = _neq-_nevar-_ndisc+1 .. _neq-_nevar)] end if; if not type(_dtbl[_i], 'array') then _dtbl[_i] := `dsolve/numeric/SC/IVPdcopy`(_dtbl[1], `if`(assigned(_dtbl[_i]), _dtbl[_i], NULL)); if 0 < _nevt then for _j to _nevt+1 do if _j <= _nevt and not type(_dtbl[_i][3][4][_j, _i-1], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to defined init `, _dtbl[_i][3][4][_j, _i-1]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][3][4][_j, _i-1] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to rate hysteresis init `, _dtbl[_i][5][24]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][5][24] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to initial init `, _x0); _dtbl[_i][3][1][_j, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to fireinitial init `, _x0-2*_i+5.0); _dtbl[_i][3][1][_j, 8] := _x0-2*_i+5.0 end if end do end if end if; if _x_in <> "last" then if 0 < 0 then if `dsolve/numeric/checkglobals`(op(_dtbl[1][14]), _pars, _neq, _y0) then `dsolve/numeric/SC/reinitialize`(_dtbl, _y0, _neq, procname, _pars, _i) end if end if; if _dtbl[1][4][7] = 0 then error "parameters must be initialized before solution can be computed" end if end if; _dat := eval(_dtbl[_i], 2); _dtbl[4] := _i; try _src := `dsolve/numeric/SC/IVPrun`(_dat, _x_out) catch: userinfo(2, `dsolve/debug`, print(`Exception in solnproc:`, [lastexception][2 .. -1])); error  end try; if _dat[17] <> _dtbl[1][17] then _dtbl[1][17] := _dat[17]; _dtbl[1][10] := _dat[10] end if; if _src = 0 and 100 < _dat[4][9] then _val := _dat[3][1][_nevt+1, 8] else _val := _dat[11][_dat[4][20], 0] end if; if _src <> 0 or _dat[4][9] <= 0 then _dtbl[1][5][1] := _x_out else _dtbl[1][5][1] := _val end if; if _i = 3 and _val < _x_out then Rounding := -infinity; if _dat[4][9] = 1 then error "cannot evaluate the solution further right of %1, probably a singularity", evalf[8](_val) elif _dat[4][9] = 2 then error "cannot evaluate the solution further right of %1, maxfun limit exceeded (see ?dsolve,maxfun for details)", evalf[8](_val) elif _dat[4][9] = 3 then if _dat[4][25] = 3 then error "cannot evaluate the solution past the initial point, problem may be initially singular or improperly set up" else error "cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up" end if elif _dat[4][9] = 4 then error "cannot evaluate the solution further right of %1, accuracy goal cannot be achieved with specified 'minstep'", evalf[8](_val) elif _dat[4][9] = 5 then error "cannot evaluate the solution further right of %1, too many step failures, tolerances may be too loose for problem", evalf[8](_val) elif _dat[4][9] = 6 then error "cannot evaluate the solution further right of %1, cannot downgrade delay storage for problems with delay derivative order > 1, try increasing delaypts", evalf[8](_val) elif _dat[4][9] = 10 then error "cannot evaluate the solution further right of %1, interrupt requested", evalf[8](_val) elif 100 < _dat[4][9] then if _dat[4][9]-100 = _nevt+1 then error "constraint projection failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nevt+2 then error "index-1 and derivative evaluation failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nevt+3 then error "maximum number of event iterations reached (%1) at t=%2", round(_dat[3][1][_nevt+1, 3]), evalf[8](_val) else if _Env_dsolve_nowarnstop <> true then `dsolve/numeric/warning`(StringTools:-FormatMessage("cannot evaluate the solution further right of %1, event #%2 triggered a halt", evalf[8](_val), round(_dat[3][1][_dat[4][9]-100, 1]))) end if; Rounding := 'nearest'; _x_out := _val end if else error "cannot evaluate the solution further right of %1", evalf[8](_val) end if elif _i = 2 and _x_out < _val then Rounding := infinity; if _dat[4][9] = 1 then error "cannot evaluate the solution further left of %1, probably a singularity", evalf[8](_val) elif _dat[4][9] = 2 then error "cannot evaluate the solution further left of %1, maxfun limit exceeded (see ?dsolve,maxfun for details)", evalf[8](_val) elif _dat[4][9] = 3 then if _dat[4][25] = 3 then error "cannot evaluate the solution past the initial point, problem may be initially singular or improperly set up" else error "cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up" end if elif _dat[4][9] = 4 then error "cannot evaluate the solution further left of %1, accuracy goal cannot be achieved with specified 'minstep'", evalf[8](_val) elif _dat[4][9] = 5 then error "cannot evaluate the solution further left of %1, too many step failures, tolerances may be too loose for problem", evalf[8](_val) elif _dat[4][9] = 6 then error "cannot evaluate the solution further left of %1, cannot downgrade delay storage for problems with delay derivative order > 1, try increasing delaypts", evalf[8](_val) elif _dat[4][9] = 10 then error "cannot evaluate the solution further right of %1, interrupt requested", evalf[8](_val) elif 100 < _dat[4][9] then if _dat[4][9]-100 = _nevt+1 then error "constraint projection failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nevt+2 then error "index-1 and derivative evaluation failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nevt+3 then error "maximum number of event iterations reached (%1) at t=%2", round(_dat[3][1][_nevt+1, 3]), evalf[8](_val) else if _Env_dsolve_nowarnstop <> true then `dsolve/numeric/warning`(StringTools:-FormatMessage("cannot evaluate the solution further left of %1, event #%2 triggered a halt", evalf[8](_val), round(_dat[3][1][_dat[4][9]-100, 1]))) end if; Rounding := 'nearest'; _x_out := _val end if else error "cannot evaluate the solution further left of %1", evalf[8](_val) end if end if; if _EnvInFsolve = true then _digits := _dat[4][26]; if type(_EnvDSNumericSaveDigits, 'posint') then _dat[4][26] := _EnvDSNumericSaveDigits else _dat[4][26] := Digits end if; _Env_dsolve_SC_native := true; if _dat[4][25] = 1 then _i := 1; _dat[4][25] := 2 else _i := _dat[4][25] end if; _val := `dsolve/numeric/SC/IVPval`(_dat, _x_out, _src); _dat[4][25] := _i; _dat[4][26] := _digits; [_x_out, seq(_val[_vmap[_i]], _i = 1 .. _neq-_nevar)] else Digits := _dat[4][26]; _val := `dsolve/numeric/SC/IVPval`(eval(_dat, 2), _x_out, _src); [_x_out, seq(_val[_vmap[_i]], _i = 1 .. _neq-_nevar)] end if end proc, (2) = Array(0..0, {}), (3) = [t, x(t), diff(x(t), t), theta(t), diff(theta(t), t)], (4) = []}); _vars := _dat[3]; _pars := map(lhs, _dat[4]); _n := nops(_vars)-1; _solnproc := _dat[1]; if not type(_xout, 'numeric') then if member(x_rosenbrock, ["start", 'start', "method", 'method', "left", 'left', "right", 'right', "leftdata", "rightdata", "enginedata", "eventstop", 'eventstop', "eventclear", 'eventclear', "eventstatus", 'eventstatus', "eventcount", 'eventcount', "laxtol", 'laxtol', "numfun", 'numfun', NULL]) then _res := _solnproc(convert(x_rosenbrock, 'string')); if 1 < nops([_res]) then return _res elif type(_res, 'array') then return eval(_res, 1) elif _res <> "procname" then return _res end if elif member(x_rosenbrock, ["last", 'last', "initial", 'initial', "parameters", 'parameters', "initial_and_parameters", 'initial_and_parameters', NULL]) then _xout := convert(x_rosenbrock, 'string'); _res := _solnproc(_xout); if _xout = "parameters" then return [seq(_pars[_i] = _res[_i], _i = 1 .. nops(_pars))] elif _xout = "initial_and_parameters" then return [seq(_vars[_i+1] = [_res][1][_i+1], _i = 0 .. _n), seq(_pars[_i] = [_res][2][_i], _i = 1 .. nops(_pars))] else return [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] end if elif type(_xout, `=`) and member(lhs(_xout), ["initial", 'initial', "parameters", 'parameters', "initial_and_parameters", 'initial_and_parameters', NULL]) then _xout := convert(lhs(x_rosenbrock), 'string') = rhs(x_rosenbrock); if type(rhs(_xout), 'list') then _res := _solnproc(_xout) else error "initial and/or parameter values must be specified in a list" end if; if lhs(_xout) = "initial" then return [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] elif lhs(_xout) = "parameters" then return [seq(_pars[_i] = _res[_i], _i = 1 .. nops(_pars))] else return [seq(_vars[_i+1] = [_res][1][_i+1], _i = 0 .. _n), seq(_pars[_i] = [_res][2][_i], _i = 1 .. nops(_pars))] end if elif type(_xout, `=`) and member(lhs(_xout), ["eventdisable", 'eventdisable', "eventenable", 'eventenable', "eventfired", 'eventfired', "direction", 'direction', "Array", 'Array', NULL]) then return _solnproc(convert(lhs(x_rosenbrock), 'string') = rhs(x_rosenbrock)) elif _xout = "solnprocedure" then return eval(_solnproc) elif _xout = "sysvars" then return _vars elif _xout = "Array" then return [op(_vars), op(_pars)] end if; if procname <> unknown then return ('procname')(x_rosenbrock) else _ndsol := 1; _ndsol := _ndsol; _ndsol := pointto(_dat[2][0]); return ('_ndsol')(x_rosenbrock) end if end if; try _res := _solnproc(_xout); [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] catch: error  end try end proc

(8)

p1 := odeplot(solu12, [t, theta(t)], 0 .. 800*5, numpoints = 50000)

`[Length of output exceeds limit of 1000000]`

(9)

p1

 


Download 2_reply.mw

 

 

Maybe helpfull to find previous menu items:

?updates,Maple2025,RibbonMapping

I could not reproduce it with Maple 2025 but got an error message with 2020.

Maybe updating your driver can help. Clearly there is something with `#mo("2")` that makes the call special. 

I get decent results with 

Maybe this can help with 2015 as well

I agree with mmcdara that setting up the problem plays an important role on the complexity of results. But even with the smartest approch sometimes expressions are complex. In yours and similar cases the command

indets(g1, anything)

will generate a set of all operands. In the same way one can now create sets for other expressions and filter common subsexpressions by the command intersect

Intersect := (indets(g1, anything) intersect indets(g2, anything)) intersect indets(g3, anything);
                /                                            
  Intersect := { -2, -1, 2, 4, Ce, Cm, U, a, beta, delta, k, 
                \                                            

                       2      2   2      2          2  
    lambda, w, U[0], Ce , beta , w , U[0] , (w + Ce) , 

                     2                                 \ 
    (-delta + w + Ce) , -delta, w + Ce, -delta + w + Ce }
                                                       / 


In many cases, sums are of interest to be replaced by new names. To filter for those select is a handy command

select(type, Intersect, `+`);
                   {w + Ce, -delta + w + Ce}

I attach here my experiments Difference_two_model-rply.mw including a procedure that returns all operands in the same way as indets(...,anything) does.

If this answer is not helpfull for this question it might be for similar hard problems.

For the "old" Java GUI start the application below. It seems to work

interface(version);

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

(1)

Physics:-Version();

`The "Physics Updates" package is not available for the version of Maple under development`

(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))

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

 

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

(3)

odetest(sol,ode) assuming positive;

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

(4)

restart;

ode:=diff(y(x),x) = (ln(y(x))^2+2*_C1)^(1/2)*y(x);
sol:=y(x) = exp((-2*_C1)^(1/2)) ;

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

 

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

(5)

Physics:-Setup(assumingusesAssume = true):

odetest(sol,ode) assuming positive;

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

(6)

restart;

ode:=diff(y(x),x) = (ln(y(x))^2+2*_C1)^(1/2)*y(x);
sol:=y(x) = exp((-2*_C1)^(1/2)) ;

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

 

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

(7)

Physics:-Setup(assumingusesAssume = false):

odetest(sol,ode) assuming positive;

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

(8)
 

 

Download ode_test_with_physics_march_25_2025-reply.mw

Not sure if I understand correctly "execution cell". There are execution groups and paragraphs in Maple.

If you want to insert in document mode a new paragraph in "text mode" you can use this menu option encircled in red.

The option encircled in blue corresponds to the menu Insert -> Paragraph. I am not aware of a default that changes the behavior of Insert menu.

Similarily in worksheet mode an execution group in "text mode" is inserted that does not execute.

These buttons are a time saver. I do not see them in Maple 2025.

Try

ResponsePlot(sys, Step()) 

following the helppage of ResponsePlot. Or:

ResponsePlot(sys, 1()) 

By the way, to investigate error messages it is helpfull to upload code with the green arrow

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