Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Im trying to create a groebner basis to solve a series of equations to make a basis. The values can only be 1 to 4 for a..p which im also unsure if/how to define which may be causing the problem.

 

 My equations are as follows:

 

e1 := (((a-1)(a-2))(a-3))(a-4) = 0;
e2 := (((b-1)(b-2))(b-3))(b-4) = 0;
e3 := (((c-1)(c-2))(c-3))(c-4) = 0;
e4 := (((d-1)(d-2))(d-3))(d-4) = 0;
e5 := (((e-1)(e-2))(e-3))(e-4) = 0;
e6 := (((f-1)(f-2))(f-3))(f-4) = 0;
e7 := (((g-1)(g-2))(g-3))(g-4) = 0;
e8 := (((h-1)(h-2))(h-3))(h-4) = 0;
e9 := (((i-1)(i-2))(i-3))(i-4) = 0;
e10 := (((j-1)(j-2))(j-3))(j-4) = 0;
e11 := (((k-1)(k-2))(k-3))(k-4) = 0;
e12 := (((l-1)(l-2))(l-3))(l-4) = 0;
e13 := (((m-1)(m-2))(m-3))(m-4) = 0;
e14 := (((-1+n)(n-2))(n-3))(n-4) = 0;
e15 := (((-1+o)(o-2))(o-3))(o-4) = 0;
e16 := (((p-1)(p-2))(p-3))(p-4) = 0;
e17 := a+b+c+d-10 = 0;
e18 := a*b*c*d-24 = 0;
e19 := e+f+g+h-10 = 0;
e20 := e*f*g*h-24 = 0;
e21 := i+j+k+l-10 = 0;
e22 := i*j*k*l = 24;
e23 := m+n+o+p-10 = 0;
e24 := m*n*o*p-24 = 0;
e25 := a+b+e+f-10 = 0;
e26 := a*b*e*f-24 = 0;
e27 := c+d+g+h-10 = 0;
e28 := c*d*g*h-24 = 0;
e29 := i+j+m+n-10 = 0;
e30 := i*j*m*n-24 = 0;
e31 := k+l+o+p-10 = 0;
e32 := k*l*o*p-24 = 0;
e33 := a+e+i+m-10 = 0;
e34 := a*e*i*m-24 = 0;
e35 := b+f+j+n-10 = 0;
e36 := b*f*j*n-24 = 0;
e37 := c+g+k+o-10 = 0;
e38 := c*g*k*o-24 = 0;
e39 := d+h+l+p-10 = 0;
e40 := d*h*l*p-24 = 0;
e41 := c = 4;
e42 := e = 1;
e43 := j = 2;                  
e44 := p = 3;
 

Hi

This question may have been asked before but I cannot find it!

I am currently have 3 lists:

L:= [1,3,5,2,3]

M:=[4,2,4,6,2]

R:= [5,3,2,1,4]

I would like to be able to come up with a way (I assume a procedure) where I can order L and M based on the numerical order of R. So in this case that would be:

R:=[1,2,3,4,5]

L:=[2,5,3,3,1]

M:=[6,4,2,2,4]

I hope this makes sense? Any help would be greatly appreciated!

 

Hi All,

I am ploting with the command of:

logplot([1-R(Pp, tp, tf, 'qN(Pp, tp, tf)'), 1/(1+1+tp), .5/(.5+.5+tp), (1-Pp)*Beta(2, 1+tp)/(Pp*Beta(1, 1)+(1-Pp)*Beta(1, 1+tp))], Pp = 0 .. 1, style = pointline, numpoints = 1, gridlines = true, symbolsize = 10, legend = ["Our worst-case prior with Pp", "Flat prior Beta (1,1)", "Jeffrey's prior Beta (0.5,0.5)", "Normalised flat prior Beta (1,1) with Pp"], labels = ["Pp", "Posterior expected pfd"], symbol = [asterisk, diagonalcross, box, circle], title = "Given fixed t_past=100")

and get:

 

which is ok but the legends are wrong. where are the symbols in the legends? Am I missing something....

 

how to solve differential equations with dependent functions in maple? 

with(PDEtools):
V:=-exp(I*(k*x+omega*t+theta))*sqrt((k^2+omega)/(k*sigma))*sech(sqrt(k^2+omega)*(-2*k*t+x));
pde[1] := simplify(I*(diff(V, t, t))+diff(V, x, x)-I*sigma*V*(conjugate(V)*(diff(V, x))-V*(diff(conjugate(V), x)))) = 0;

 

Dear sir, can we get a plot of graph with line style like  line+symbol so on.. 

I am attaching codes and sample graph .

 

h:=z->1-(delta2/2)*(1 + cos(2*(Pi/L1)*(z - d1 - L1))):
K1:=(4/h(z)^4)-(sin(alpha)/F)-h(z)^2+Nb*h(z)^4:
lambda:=(F,Nb,delta2)->Int(K1,z=0..1):

L1:=0.2:
d1:=0.2:
alpha:=Pi/6:
A:=plot( [seq(seq(lambda(F,Nb,delta2), Nb=[0.1,0.2,0.3]), F=[0.1,0.2,0.5])],
          delta2=0.02..0.1, linestyle = [solid,longdash,dashdot],'
          thickness = 2',color=[red$3,blue$3,black$3],
          legend=["Nb=0.1","Nb=0.2","Nb=0.3",""$6]):
B:=plots:-textplot([[0.05,-1,F=0.1],[0.05,1.5,F=0.2], [0.05,3,F=0.5]], font=[times, 14]):

plots:-display(A, B);

Hi, I want to convert differential operator (D) to diff in below file, but "convert" doesn't work properly. I think beacuse both "D" and "diff" exist in the answer or mabey there is an other reason. what should I do?

I attached file here.1.mw

thanks in advance.

I wish to model the motion of a ball that bounces up and down in a vertical line, and whenever it hits the ground, it bounces back with only a fraction of the collision speed.

We expect that the amplitude of the consecutive bounces to diminish and for all practical purposes the ball to come to a standstill.  It's not difficult to calculate the motion analytically by hand.

However, when I attempted to solve the equation of motion numerically with Maple's dsolve()  and event handling, I ran into a problem.  As the amplitude of the bounces approaches zero, numerical noise sets in and the ball tunnels itself underground!  See the worksheet below.

I don't know how to prevent the ball from going underground.  Any ideas?

 

restart;

de := diff(y(t),t,t)=-1;

diff(diff(y(t), t), t) = -1

ic := y(0)=1, D(y)(0)=0;

y(0) = 1, (D(y))(0) = 0

Events := [y(t)=0, diff(y(t),t)=-0.5*diff(y(t),t)];

[y(t) = 0, diff(y(t), t) = -.5*(diff(y(t), t))]

dsol := dsolve({de, ic}, numeric,
                 events=[Events], range=0..5);

proc (x_rkf45) 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_rkf45) else _xout := evalf(x_rkf45) end if; _dat := Array(1..4, {(1) = proc (_xin) local _xout, _dtbl, _dat, _vmap, _x0, _y0, _val, _dig, _n, _ne, _nd, _nv, _pars, _ini, _par, _i, _j, _k, _src; option `Copyright (c) 2002 by Waterloo Maple Inc. All rights reserved.`; table( [( "complex" ) = false, ( "left" ) = 0., ( "right" ) = 5. ] ) _xout := _xin; _pars := []; _dtbl := array( 1 .. 4, [( 1 ) = (array( 1 .. 26, [( 1 ) = (datatype = float[8], order = C_order, storage = rectangular), ( 2 ) = (datatype = float[8], order = C_order, storage = rectangular), ( 3 ) = ([Array(1..2, 1..21, {(1, 1) = 1.0, (1, 2) = .0, (1, 3) = 2.0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (1, 7) = 1.0, (1, 8) = undefined, (1, 9) = 1.0, (1, 10) = 1.0, (1, 11) = undefined, (1, 12) = undefined, (1, 13) = undefined, (1, 14) = undefined, (1, 15) = undefined, (1, 16) = undefined, (1, 17) = undefined, (1, 18) = undefined, (1, 19) = undefined, (1, 20) = undefined, (1, 21) = undefined, (2, 1) = 1.0, (2, 2) = .0, (2, 3) = 100.0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (2, 7) = .0, (2, 8) = undefined, (2, 9) = undefined, (2, 10) = 0.10e-6, (2, 11) = undefined, (2, 12) = .0, (2, 13) = undefined, (2, 14) = .0, (2, 15) = .0, (2, 16) = undefined, (2, 17) = undefined, (2, 18) = undefined, (2, 19) = undefined, (2, 20) = undefined, (2, 21) = undefined}, datatype = float[8], order = C_order), proc (t, Y, Ypre, n, EA) EA[1, 7+2*n] := Y[1]; EA[1, 8+2*n] := 1; 0 end proc, proc (e, t, Y, Ypre) if e = 1 then Y[2] := -.5*Y[2] end if; return 0 end proc, Array(1..1, 1..2, {(1, 1) = undefined, (1, 2) = undefined}, datatype = float[8], order = C_order)]), ( 4 ) = (Array(1..63, {(1) = 2, (2) = 2, (3) = 0, (4) = 0, (5) = 0, (6) = 0, (7) = 1, (8) = 0, (9) = 0, (10) = 1, (11) = 0, (12) = 0, (13) = 0, (14) = 0, (15) = 0, (16) = 1, (17) = 0, (18) = 1, (19) = 30000, (20) = 0, (21) = 0, (22) = 1, (23) = 4, (24) = 0, (25) = 1, (26) = 15, (27) = 1, (28) = 0, (29) = 1, (30) = 3, (31) = 3, (32) = 0, (33) = 1, (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}, datatype = integer[8])), ( 5 ) = (Array(1..28, {(1) = 5.0, (2) = 0.10e-5, (3) = .0, (4) = 0.500001e-14, (5) = .0, (6) = 0.5047658755841546e-2, (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..2, {(1) = 1.0, (2) = .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..2, {(1) = .1, (2) = .1}, datatype = float[8], order = C_order), Array(1..2, {(1) = -4.800407432933032, (2) = -3.0985194037250428}, datatype = float[8], order = C_order), Array(1..2, {(1) = .0, (2) = .0}, datatype = float[8], order = C_order), Array(1..2, {(1) = -5.16604043011774, (2) = -1.0}, datatype = float[8], order = C_order), Array(1..2, {(1) = .0, (2) = .0}, datatype = float[8], order = C_order), Array(1..2, 1..2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0}, datatype = float[8], order = C_order), Array(1..2, 1..2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0}, datatype = float[8], order = C_order), Array(1..2, 1..6, {(1, 1) = -5.16604043011774, (1, 2) = -1.289438505631433, (1, 3) = -1.9355388263791509, (1, 4) = -4.768440232734529, (1, 5) = -5.16604043011774, (1, 6) = -2.5816391471268685, (2, 1) = -1.0, (2, 2) = -1.0, (2, 3) = -1.0, (2, 4) = -1.0, (2, 5) = -1.0, (2, 6) = -1.0}, datatype = float[8], order = C_order), Array(1..2, {(1) = 0, (2) = 0}, datatype = integer[8]), Array(1..2, {(1) = -.29310286994186313, (2) = -.7656457204727637}, datatype = float[8], order = C_order), Array(1..2, {(1) = -13.34398304810828, (2) = -5.16604043011774}, datatype = float[8], order = C_order), Array(1..2, {(1) = 0.26645352591003757e-14, (2) = 0.13322676295501878e-14}, datatype = float[8], order = C_order), Array(1..2, {(1) = -5.16604043011774, (2) = -1.0}, datatype = float[8], order = C_order), Array(1..2, {(1) = -3.2277394678745863, (2) = -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)]), ( 8 ) = ([Array(1..2, {(1) = 1.0, (2) = .0}, datatype = float[8], order = C_order), Array(1..2, {(1) = .0, (2) = .0}, datatype = float[8], order = C_order), Array(1..2, {(1) = .0, (2) = -1.0}, datatype = float[8], order = C_order), 0, 0]), ( 11 ) = (Array(1..6, 0..2, {(1, 1) = .0, (1, 2) = .0, (2, 0) = .0, (2, 1) = .0, (2, 2) = .0, (3, 0) = .0, (3, 1) = .0, (3, 2) = .0, (4, 0) = .0, (4, 1) = .0, (4, 2) = .0, (5, 0) = .0, (5, 1) = .0, (5, 2) = .0, (6, 0) = .0, (6, 1) = .0, (6, 2) = .0}, datatype = float[8], order = C_order)), ( 10 ) = ([proc (N, X, Y, YP) option `[Y[1] = y(t), Y[2] = diff(y(t),t)]`; YP[2] := -1; YP[1] := Y[2]; 0 end proc, -1, 0, 0, proc (t, Y, Ypre, n, EA) EA[1, 7+2*n] := Y[1]; EA[1, 8+2*n] := 1; 0 end proc, proc (e, t, Y, Ypre) if e = 1 then Y[2] := -.5*Y[2] end if; return 0 end proc, 0, 0]), ( 13 ) = (), ( 12 ) = (), ( 15 ) = ("rkf45"), ( 14 ) = ([0, 0]), ( 18 ) = ([]), ( 19 ) = (0), ( 16 ) = ([0, 0, 0, []]), ( 17 ) = ([proc (N, X, Y, YP) option `[Y[1] = y(t), Y[2] = diff(y(t),t)]`; YP[2] := -1; YP[1] := Y[2]; 0 end proc, -1, 0, 0, proc (t, Y, Ypre, n, EA) EA[1, 7+2*n] := Y[1]; EA[1, 8+2*n] := 1; 0 end proc, proc (e, t, Y, Ypre) if e = 1 then Y[2] := -.5*Y[2] end if; return 0 end proc, 0, 0]), ( 22 ) = (0), ( 23 ) = (0), ( 20 ) = ([]), ( 21 ) = (0), ( 26 ) = (Array(1..0, {})), ( 25 ) = (Array(1..0, {})), ( 24 ) = (0)  ] )), ( 3 ) = (array( 1 .. 26, [( 1 ) = (datatype = float[8], order = C_order, storage = rectangular), ( 2 ) = (datatype = float[8], order = C_order, storage = rectangular), ( 3 ) = ([Array(1..2, 1..21, {(1, 1) = 1.0, (1, 2) = .0, (1, 3) = 2.0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (1, 7) = 1.0, (1, 8) = 4.231592143663233, (1, 9) = 0.27321894746634712e-16, (1, 10) = 1.0, (1, 11) = -.8313220152052453, (1, 12) = 1.0, (1, 13) = -3.332426528291707, (1, 14) = 1.0, (1, 15) = -7.503313539259385, (1, 16) = 1.0, (1, 17) = -13.34398304810828, (1, 18) = 1.0, (1, 19) = 0.7650130529057719e-15, (1, 20) = 1.0, (1, 21) = 4.231592143663233, (2, 1) = 1.0, (2, 2) = .0, (2, 3) = 100.0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (2, 7) = .0, (2, 8) = 4.231592143663233, (2, 9) = undefined, (2, 10) = 0.10e-6, (2, 11) = undefined, (2, 12) = 9.0, (2, 13) = undefined, (2, 14) = .0, (2, 15) = .0, (2, 16) = undefined, (2, 17) = undefined, (2, 18) = undefined, (2, 19) = undefined, (2, 20) = undefined, (2, 21) = 4.231592143663233}, datatype = float[8], order = C_order), proc (t, Y, Ypre, n, EA) EA[1, 7+2*n] := Y[1]; EA[1, 8+2*n] := 1; 0 end proc, proc (e, t, Y, Ypre) if e = 1 then Y[2] := -.5*Y[2] end if; return 0 end proc, Array(1..1, 1..2, {(1, 1) = undefined, (1, 2) = undefined}, datatype = float[8], order = C_order)]), ( 4 ) = (Array(1..63, {(1) = 2, (2) = 2, (3) = 0, (4) = 0, (5) = 0, (6) = 0, (7) = 1, (8) = 1, (9) = 0, (10) = 1, (11) = 101, (12) = 101, (13) = 0, (14) = 0, (15) = 0, (16) = 1, (17) = 0, (18) = 320, (19) = 30000, (20) = 5, (21) = 0, (22) = 1, (23) = 4, (24) = 0, (25) = 1, (26) = 15, (27) = 1, (28) = 0, (29) = 1, (30) = 3, (31) = 3, (32) = 0, (33) = 1, (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}, datatype = integer[8])), ( 5 ) = (Array(1..28, {(1) = 5.0, (2) = 0.10e-5, (3) = 20.67521026392697, (4) = 0.500001e-14, (5) = .0, (6) = 0.5047658755841546e-2, (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) = 5.512744241702593, (20) = 5.168802565981743, (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..2, {(1) = 1.0, (2) = .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..2, {(1) = .1, (2) = .1}, datatype = float[8], order = C_order), Array(1..2, {(1) = -4.800407432933032, (2) = -3.0985194037250428}, datatype = float[8], order = C_order), Array(1..2, {(1) = .0, (2) = .0}, datatype = float[8], order = C_order), Array(1..2, {(1) = -5.16604043011774, (2) = -1.0}, datatype = float[8], order = C_order), Array(1..2, {(1) = .0, (2) = .0}, datatype = float[8], order = C_order), Array(1..2, 1..2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0}, datatype = float[8], order = C_order), Array(1..2, 1..2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0}, datatype = float[8], order = C_order), Array(1..2, 1..6, {(1, 1) = -5.16604043011774, (1, 2) = -1.289438505631433, (1, 3) = -1.9355388263791509, (1, 4) = -4.768440232734529, (1, 5) = -5.16604043011774, (1, 6) = -2.5816391471268685, (2, 1) = -1.0, (2, 2) = -1.0, (2, 3) = -1.0, (2, 4) = -1.0, (2, 5) = -1.0, (2, 6) = -1.0}, datatype = float[8], order = C_order), Array(1..2, {(1) = 0, (2) = 0}, datatype = integer[8]), Array(1..2, {(1) = -.29310286994186313, (2) = -.7656457204727637}, datatype = float[8], order = C_order), Array(1..2, {(1) = -13.34398304810828, (2) = -5.16604043011774}, datatype = float[8], order = C_order), Array(1..2, {(1) = 0.26645352591003757e-14, (2) = 0.13322676295501878e-14}, datatype = float[8], order = C_order), Array(1..2, {(1) = -5.16604043011774, (2) = -1.0}, datatype = float[8], order = C_order), Array(1..2, {(1) = -3.2277394678745863, (2) = -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)]), ( 8 ) = ([Array(1..2, {(1) = 0.7650130529057719e-15, (2) = -0.27621358638430385e-2}, datatype = float[8], order = C_order), Array(1..2, {(1) = 0.27321894746634712e-16, (2) = 0.27621358640027103e-2}, datatype = float[8], order = C_order), Array(1..2, {(1) = -5.16604043011774, (2) = -1.0}, datatype = float[8], order = C_order), 0, 0]), ( 11 ) = (Array(1..6, 0..2, {(1, 1) = 4.231592143663233, (1, 2) = 0.27321894746634712e-16, (2, 0) = 0.27321894746634712e-16, (2, 1) = 0.27621358640027103e-2, (2, 2) = 5.523792785158669, (3, 0) = 5.523792785158669, (3, 1) = -.8313220152052453, (3, 2) = -1.2894385056314328, (4, 0) = -1.2894385056314328, (4, 1) = 6.815993426654105, (4, 2) = -3.332426528291707, (5, 0) = -3.332426528291707, (5, 1) = -2.5816391471268685, (5, 2) = 8.10819406814954, (6, 0) = 8.10819406814954, (6, 1) = -7.503313539259385, (6, 2) = -3.8738397886223046}, datatype = float[8], order = C_order)), ( 10 ) = ([proc (N, X, Y, YP) option `[Y[1] = y(t), Y[2] = diff(y(t),t)]`; YP[2] := -1; YP[1] := Y[2]; 0 end proc, -1, 0, 0, proc (t, Y, Ypre, n, EA) EA[1, 7+2*n] := Y[1]; EA[1, 8+2*n] := 1; 0 end proc, proc (e, t, Y, Ypre) if e = 1 then Y[2] := -.5*Y[2] end if; return 0 end proc, 0, 0]), ( 13 ) = (), ( 12 ) = (Array(1..101, 0..2, {(1, 1) = .0, (1, 2) = 1.0, (2, 0) = 1.0, (2, 1) = .0, (2, 2) = 0.12619146889603864e-2, (3, 0) = 0.12619146889603864e-2, (3, 1) = .9999992037856589, (3, 2) = -0.12619146889603864e-2, (4, 0) = -0.12619146889603864e-2, (4, 1) = 0.2523829377920773e-2, (4, 2) = .9999968151426357, (5, 0) = .9999968151426357, (5, 1) = -0.25238293779207724e-2, (5, 2) = 0.3785744066881159e-2, (6, 0) = 0.3785744066881159e-2, (6, 1) = .9999928340709301, (6, 2) = -0.3785744066881159e-2, (7, 0) = -0.3785744066881159e-2, (7, 1) = 0.5047658755841546e-2, (7, 2) = .9999872605705423, (8, 0) = .9999872605705423, (8, 1) = -0.5047658755841546e-2, (8, 2) = 0.8581019884930627e-1, (9, 0) = 0.8581019884930627e-1, (9, 1) = .9963183048867214, (9, 2) = -0.8581019884930627e-1, (10, 0) = -0.8581019884930627e-1, (10, 1) = .166572738942771, (10, 2) = .9861267613205518, (11, 0) = .9861267613205518, (11, 1) = -.166572738942771, (11, 2) = .24733527903623573, (12, 0) = .24733527903623573, (12, 1) = .969412629872034, (12, 2) = -.24733527903623573, (13, 0) = -.24733527903623573, (13, 1) = .3280978191297005, (13, 2) = .9461759105411672, (14, 0) = .9461759105411672, (14, 1) = -.3280978191297005, (14, 2) = .4896228993166267, (15, 0) = .4896228993166267, (15, 1) = .8801347082323903, (15, 2) = -.4896228993166268, (16, 0) = -.4896228993166268, (16, 1) = .651147979503553, (16, 2) = .7880031543942203, (17, 0) = .7880031543942203, (17, 1) = -.651147979503553, (17, 2) = .8126730596904792, (18, 0) = .8126730596904792, (18, 1) = .6697812490266575, (18, 2) = -.8126730596904791, (19, 0) = -.8126730596904791, (19, 1) = .9741981398774054, (19, 2) = .5254689921297018, (20, 0) = .5254689921297018, (20, 1) = -.9741981398774054, (20, 2) = 1.054960679970867, (21, 0) = 1.054960679970867, (21, 1) = .4435289818577032, (21, 2) = -1.054960679970867, (22, 0) = -1.054960679970867, (22, 1) = 1.1357232200643286, (22, 2) = .3550663837033567, (23, 0) = .3550663837033567, (23, 1) = -1.1357232200643286, (23, 2) = 1.21648576015779, (24, 0) = 1.21648576015779, (24, 1) = .26008119766666216, (24, 2) = -1.21648576015779, (25, 0) = -1.21648576015779, (25, 1) = 1.2972483002512516, (25, 2) = .15857342374761957, (26, 0) = .15857342374761957, (26, 1) = -1.2972483002512516, (26, 2) = 1.3264896157817125, (27, 0) = 1.3264896157817125, (27, 1) = .12021264961164262, (27, 2) = -1.3264896157817125, (28, 0) = -1.3264896157817125, (28, 1) = 1.3557309313121735, (28, 2) = 0.809968209417137e-1, (29, 0) = 0.809968209417137e-1, (29, 1) = -1.355730931312174, (29, 2) = 1.3849722468426344, (30, 0) = 1.3849722468426344, (30, 1) = 0.409259377378328e-1, (30, 2) = -1.3849722468426342, (31, 0) = -1.3849722468426342, (31, 1) = 1.4142135623730954, (31, 2) = -0.3854941057726238e-16, (32, 0) = -0.3854941057726238e-16, (32, 1) = -1.4142135623730951, (32, 2) = 1.4142135623730954, (33, 0) = 1.4142135623730954, (33, 1) = -0.3854941057726238e-16, (33, 2) = -1.4142135623730951, (34, 0) = -1.4142135623730951, (34, 1) = 1.4142135623730954, (34, 2) = -0.3854941057726238e-16, (35, 0) = -0.3854941057726238e-16, (35, 1) = -1.4142135623730951, (35, 2) = 1.4142135623730954, (36, 0) = 1.4142135623730954, (36, 1) = -0.3854941057726238e-16, (36, 2) = -1.4142135623730951, (37, 0) = -1.4142135623730951, (37, 1) = 1.4142135623730954, (37, 2) = -0.6158268339717665e-16, (38, 0) = -0.6158268339717665e-16, (38, 1) = .7071067811865478, (38, 2) = 1.7372637227469543, (39, 0) = 1.7372637227469543, (39, 1) = .17625025600496938, (39, 2) = .3840566208126888, (40, 0) = .3840566208126888, (40, 1) = 2.060313883120813, (40, 2) = .24813910589236288, (41, 0) = .24813910589236288, (41, 1) = 0.6100646043882994e-1, (41, 2) = 2.383364043494672, (42, 0) = 2.383364043494672, (42, 1) = .21566654966218035, (42, 2) = -.262043699935029, (43, 0) = -.262043699935029, (43, 1) = 2.706414203868531, (43, 2) = 0.788325873144219e-1, (44, 0) = 0.788325873144219e-1, (44, 1) = -.5850938603088879, (44, 2) = 2.736917434087946, (45, 0) = 2.736917434087946, (45, 1) = 0.605201110665443e-1, (45, 2) = -.6155970905283028, (46, 0) = -.6155970905283028, (46, 1) = 2.7674206643073607, (46, 2) = 0.4127718776484839e-1, (47, 0) = 0.4127718776484839e-1, (47, 1) = -.6461003207477175, (47, 2) = 2.7979238945267757, (48, 0) = 2.7979238945267757, (48, 1) = 0.21103817409333567e-1, (48, 2) = -.6766035509671325, (49, 0) = -.6766035509671325, (49, 1) = 2.8284271247461907, (49, 2) = 0.10177044392397268e-15, (50, 0) = 0.10177044392397268e-15, (50, 1) = -.7071067811865476, (50, 2) = 2.8284271247461907, (51, 0) = 2.8284271247461907, (51, 1) = 0.10177044392397268e-15, (51, 2) = -.7071067811865476, (52, 0) = -.7071067811865476, (52, 1) = 2.8284271247461907, (52, 2) = 0.10177044392397268e-15, (53, 0) = 0.10177044392397268e-15, (53, 1) = -.7071067811865476, (53, 2) = 2.8284271247461907, (54, 0) = 2.8284271247461907, (54, 1) = 0.10177044392397268e-15, (54, 2) = -.7071067811865476, (55, 0) = -.7071067811865476, (55, 1) = 2.8284271247461907, (55, 2) = 0.11275702593849246e-15, (56, 0) = 0.11275702593849246e-15, (56, 1) = .35355339059327384, (56, 2) = 2.9899522049331106, (57, 0) = 2.9899522049331106, (57, 1) = 0.4406256400124062e-1, (57, 2) = .192028310406354, (58, 0) = .192028310406354, (58, 1) = 3.1514772851200306, (58, 2) = 0.62034776473090227e-1, (59, 0) = 0.62034776473090227e-1, (59, 1) = 0.3050323021943421e-1, (59, 2) = 3.31300236530695, (60, 0) = 3.31300236530695, (60, 1) = 0.5391663741554898e-1, (60, 2) = -.13102184996748556, (61, 0) = -.13102184996748556, (61, 1) = 3.47452744549387, (61, 2) = 0.19708146828616865e-1, (62, 0) = 0.19708146828616865e-1, (62, 1) = -.29254693015440536, (62, 2) = 3.489779060603587, (63, 0) = 3.489779060603587, (63, 1) = 0.1513002776664512e-1, (63, 2) = -.3077985452641224, (64, 0) = -.3077985452641224, (64, 1) = 3.5050306757133045, (64, 2) = 0.10319296941218279e-1, (65, 0) = 0.10319296941218279e-1, (65, 1) = -.32305016037384, (65, 2) = 3.5202822908230216, (66, 0) = 3.5202822908230216, (66, 1) = 0.5275954352336619e-2, (66, 2) = -.338301775483557, (67, 0) = -.338301775483557, (67, 1) = 3.5355339059327386, (67, 2) = 0.2544261098099317e-16, (68, 0) = 0.2544261098099317e-16, (68, 1) = -.35355339059327395, (68, 2) = 3.5355339059327386, (69, 0) = 3.5355339059327386, (69, 1) = 0.2544261098099317e-16, (69, 2) = -.35355339059327395, (70, 0) = -.35355339059327395, (70, 1) = 3.5355339059327386, (70, 2) = 0.2544261098099317e-16, (71, 0) = 0.2544261098099317e-16, (71, 1) = -.35355339059327395, (71, 2) = 3.5355339059327386, (72, 0) = 3.5355339059327386, (72, 1) = 0.2544261098099317e-16, (72, 2) = -.35355339059327395, (73, 0) = -.35355339059327395, (73, 1) = 3.5355339059327386, (73, 2) = -0.8673617379884035e-16, (74, 0) = -0.8673617379884035e-16, (74, 1) = .17677669529663714, (74, 2) = 3.623922253581057, (75, 0) = 3.623922253581057, (75, 1) = 0.11718749999999922e-1, (75, 2) = 0.8838834764831884e-1, (76, 0) = 0.8838834764831884e-1, (76, 1) = 3.712310601229375, (76, 2) = 0.1562499999999996e-1, (77, 0) = 0.1562499999999996e-1, (77, 1) = 0.5304398895431303e-15, (77, 2) = 3.800698948877694, (78, 0) = 3.800698948877694, (78, 1) = 0.1171874999999998e-1, (78, 2) = -0.883883476483183e-1, (79, 0) = -0.883883476483183e-1, (79, 1) = 3.889087296526012, (79, 2) = 0.11564823173178714e-16, (80, 0) = 0.11564823173178714e-16, (80, 1) = -.17677669529663667, (80, 2) = 3.889087296526012, (81, 0) = 3.889087296526012, (81, 1) = 0.11564823173178714e-16, (81, 2) = -.17677669529663667, (82, 0) = -.17677669529663667, (82, 1) = 3.889087296526012, (82, 2) = 0.11564823173178714e-16, (83, 0) = 0.11564823173178714e-16, (83, 1) = -.17677669529663667, (83, 2) = 3.889087296526012, (84, 0) = 3.889087296526012, (84, 1) = 0.11564823173178714e-16, (84, 2) = -.17677669529663667, (85, 0) = -.17677669529663667, (85, 1) = 3.889087296526012, (85, 2) = 0.1615522579170719e-16, (86, 0) = 0.1615522579170719e-16, (86, 1) = 0.8838834764831835e-1, (86, 2) = 3.9332814703501713, (87, 0) = 3.9332814703501713, (87, 1) = 0.29296875000000074e-2, (87, 2) = 0.44194173824159216e-1, (88, 0) = 0.44194173824159216e-1, (88, 1) = 3.977475644174331, (88, 2) = 0.39062500000000095e-2, (89, 0) = 0.39062500000000095e-2, (89, 1) = -0.41016572854207174e-15, (89, 2) = 4.0216698179984895, (90, 0) = 4.0216698179984895, (90, 1) = 0.29296875000000156e-2, (90, 2) = -0.44194173824159085e-1, (91, 0) = -0.44194173824159085e-1, (91, 1) = 4.065863991822649, (91, 2) = -0.15419764230904953e-16, (92, 0) = -0.15419764230904953e-16, (92, 1) = -0.8838834764831874e-1, (92, 2) = 4.065863991822649, (93, 0) = 4.065863991822649, (93, 1) = -0.15419764230904953e-16, (93, 2) = -0.8838834764831874e-1, (94, 0) = -0.8838834764831874e-1, (94, 1) = 4.065863991822649, (94, 2) = -0.15419764230904953e-16, (95, 0) = -0.15419764230904953e-16, (95, 1) = -0.8838834764831874e-1, (95, 2) = 4.065863991822649, (96, 0) = 4.065863991822649, (96, 1) = -0.15419764230904953e-16, (96, 2) = -0.8838834764831874e-1, (97, 0) = -0.8838834764831874e-1, (97, 1) = 4.065863991822649, (97, 2) = 0.1973247953923618e-16, (98, 0) = 0.1973247953923618e-16, (98, 1) = 0.44194173824159286e-1, (98, 2) = 4.087961078734729, (99, 0) = 4.087961078734729, (99, 1) = 0.7324218750000254e-3, (99, 2) = 0.220970869120795e-1, (100, 0) = 0.220970869120795e-1, (100, 1) = 4.110058165646809, (100, 2) = 0.9765625000000228e-3, (101, 0) = 0.9765625000000228e-3, (101, 1) = -0.28912057932946783e-15, (101, 2) = 4.132155252558889}, datatype = float[8], order = C_order)), ( 15 ) = ("rkf45"), ( 14 ) = ([0, 0]), ( 19 ) = (0), ( 16 ) = ([0, 0, 0, []]), ( 17 ) = ([proc (N, X, Y, YP) option `[Y[1] = y(t), Y[2] = diff(y(t),t)]`; YP[2] := -1; YP[1] := Y[2]; 0 end proc, -1, 0, 0, proc (t, Y, Ypre, n, EA) EA[1, 7+2*n] := Y[1]; EA[1, 8+2*n] := 1; 0 end proc, proc (e, t, Y, Ypre) if e = 1 then Y[2] := -.5*Y[2] end if; return 0 end proc, 0, 0]), ( 22 ) = (0), ( 23 ) = (0), ( 20 ) = ([]), ( 21 ) = (0), ( 26 ) = (Array(1..0, {})), ( 25 ) = (Array(1..0, {})), ( 24 ) = (0)  ] )), ( 4 ) = (3)  ] ); _y0 := Array(0..2, {(1) = 0., (2) = 1.}); _vmap := array( 1 .. 2, [( 1 ) = (1), ( 2 ) = (2)  ] ); _x0 := _dtbl[1][5][5]; _n := _dtbl[1][4][1]; _ne := _dtbl[1][4][3]; _nd := _dtbl[1][4][4]; _nv := _dtbl[1][4][16]; if not type(_xout, 'numeric') then if member(_xout, ["start", "left", "right"]) then if _Env_smart_dsolve_numeric = true or _dtbl[1][4][10] = 1 then if _xout = "left" then if type(_dtbl[2], 'table') then return _dtbl[2][5][1] end if elif _xout = "right" then if type(_dtbl[3], 'table') then return _dtbl[3][5][1] end if end if end if; return _dtbl[1][5][5] elif _xout = "method" then return _dtbl[1][15] elif _xout = "storage" then return evalb(_dtbl[1][4][10] = 1) elif _xout = "leftdata" then if not type(_dtbl[2], 'array') then return NULL else return eval(_dtbl[2]) end if elif _xout = "rightdata" then if not type(_dtbl[3], 'array') then return NULL else return eval(_dtbl[3]) end if elif _xout = "enginedata" then return eval(_dtbl[1]) elif _xout = "enginereset" then _dtbl[2] := evaln(_dtbl[2]); _dtbl[3] := evaln(_dtbl[3]); return NULL elif _xout = "initial" then return procname(_y0[0]) elif _xout = "laxtol" then return _dtbl[`if`(member(_dtbl[4], {2, 3}), _dtbl[4], 1)][5][18] elif _xout = "numfun" then return `if`(member(_dtbl[4], {2, 3}), _dtbl[_dtbl[4]][4][18], 0) elif _xout = "parameters" then return [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] elif _xout = "initial_and_parameters" then return procname(_y0[0]), [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] elif _xout = "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 _xout := _dtbl[_dtbl[4]][5][1] end if elif _xout = "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 _xout = "map" then return copy(_vmap) elif type(_xin, `=`) and type(rhs(_xin), 'list') and member(lhs(_xin), {"initial", "parameters", "initial_and_parameters"}) then _ini, _par := [], []; if lhs(_xin) = "initial" then _ini := rhs(_xin) elif lhs(_xin) = "parameters" then _par := rhs(_xin) elif select(type, rhs(_xin), `=`) <> [] then _par, _ini := selectremove(type, rhs(_xin), `=`) elif nops(rhs(_xin)) < nops(_pars)+1 then error "insufficient data for specification of initial and parameters" else _par := rhs(_xin)[-nops(_pars) .. -1]; _ini := rhs(_xin)[1 .. -nops(_pars)-1] end if; _xout := lhs(_xout); if _par <> [] then `dsolve/numeric/process_parameters`(_n, _pars, _par, _y0) end if; if _ini <> [] then `dsolve/numeric/process_initial`(_n-_ne, _ini, _y0, _pars, _vmap) end if; `dsolve/numeric/SC/reinitialize`(_dtbl, _y0, _n, 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; if _xout = "initial" then return [_y0[0], seq(_y0[_vmap[_i]], _i = 1 .. _n-_ne)] elif _xout = "parameters" then return [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] else return [_y0[0], seq(_y0[_vmap[_i]], _i = 1 .. _n-_ne)], [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] end if elif _xin = "eventstop" then if _nv = 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 _xin = "eventstatus" then if _nv = 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][_nv+1, 1]))})]; return ':-enabled' = _i[1], ':-disabled' = _i[2] elif _xin = "eventclear" then if _nv = 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 _nv < _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 _nv 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][_nv+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(_xin, `=`) and member(lhs(_xin), {"eventdisable", "eventenable"}) then if _nv = 0 then error "this solution has no events" end if; if type(rhs(_xin), {('list')('posint'), ('set')('posint')}) then _i := {op(rhs(_xin))} elif type(rhs(_xin), 'posint') then _i := {rhs(_xin)} else error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nv+1, 1]) end if; if select(proc (a) options operator, arrow; _nv < a end proc, _i) <> {} then error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nv+1, 1]) end if; _k := {}; for _j to _nv do if member(round(_dtbl[1][3][1][_j, 1]), _i) then _k := `union`(_k, {_j}) end if end do; _i := _k; if lhs(_xin) = "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 _nv+1 do if _k <= _nv 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 _nv+1 do if _k <= _nv 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(_xin, `=`) and lhs(_xin) = "eventfired" then if not type(rhs(_xin), 'list') then error "'eventfired' must be specified as a list" end if; if _nv = 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(_xin) 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][_nv+1, 1]) < _src then error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nv+1, 1]) end if; _src := {seq(`if`(_dtbl[1][3][1][_j, 1]-_src = 0., _j, NULL), _j = 1 .. _nv)}; 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(_xin, `=`) and lhs(_xin) = "direction" then if not member(rhs(_xin), {-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(_xin), {1, ':-right'}), 3, 2); _dtbl[4] := _i; _dtbl[_i] := `dsolve/numeric/SC/IVPdcopy`(_dtbl[1], `if`(assigned(_dtbl[_i]), _dtbl[_i], NULL)); if 0 < _nv then for _j to _nv+1 do if _j <= _nv 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 _xin = "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][_nv+1, 12]) end if else return "procname" end if end if; if _xout = _x0 then return [_x0, seq(evalf(_dtbl[1][6][_vmap[_i]]), _i = 1 .. _n-_ne)] end if; _i := `if`(_x0 <= _xout, 3, 2); if _xin = "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 .. _n-_ne-_nd), seq(_dat[8][1][_vmap[_i]], _i = _n-_ne-_nd+1 .. _n-_ne)] 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 < _nv then for _j to _nv+1 do if _j <= _nv 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 _xin <> "last" then if 0 < 0 then if `dsolve/numeric/checkglobals`(op(_dtbl[1][14]), _pars, _n, _y0) then `dsolve/numeric/SC/reinitialize`(_dtbl, _y0, _n, 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, _xout) 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][_nv+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] := _xout else _dtbl[1][5][1] := _val end if; if _i = 3 and _val < _xout 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 <a href='http://www.maplesoft.com/support/help/search.aspx?term=dsolve,maxfun' target='_new'>?dsolve,maxfun</a> 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 = _nv+1 then error "constraint projection failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+2 then error "index-1 and derivative evaluation failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+3 then error "maximum number of event iterations reached (%1) at t=%2", round(_dat[3][1][_nv+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'; _xout := _val end if else error "cannot evaluate the solution further right of %1", evalf[8](_val) end if elif _i = 2 and _xout < _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 <a href='http://www.maplesoft.com/support/help/search.aspx?term=dsolve,maxfun' target='_new'>?dsolve,maxfun</a> 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 = _nv+1 then error "constraint projection failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+2 then error "index-1 and derivative evaluation failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+3 then error "maximum number of event iterations reached (%1) at t=%2", round(_dat[3][1][_nv+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'; _xout := _val end if else error "cannot evaluate the solution further left of %1", evalf[8](_val) end if end if; if _EnvInFsolve = true then _dig := _dat[4][26]; _dat[4][26] := _EnvDSNumericSaveDigits; _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, _xout, _src); _dat[4][25] := _i; _dat[4][26] := _dig; [_xout, seq(_val[_vmap[_i]], _i = 1 .. _n-_ne)] else Digits := _dat[4][26]; _val := `dsolve/numeric/SC/IVPval`(eval(_dat, 2), _xout, _src); [_xout, seq(_val[_vmap[_i]], _i = 1 .. _n-_ne)] end if end proc, (2) = Array(0..0, {}), (3) = [t, y(t), diff(y(t), t)], (4) = []}); _vars := _dat[3]; _pars := map(rhs, _dat[4]); _n := nops(_vars)-1; _solnproc := _dat[1]; if not type(_xout, 'numeric') then if member(x_rkf45, ["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_rkf45, '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_rkf45, ["last", 'last', "initial", 'initial', "parameters", 'parameters', "initial_and_parameters", 'initial_and_parameters', NULL]) then _xout := convert(x_rkf45, '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_rkf45), 'string') = rhs(x_rkf45); 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', NULL]) then return _solnproc(convert(lhs(x_rkf45), 'string') = rhs(x_rkf45)) elif _xout = "solnprocedure" then return eval(_solnproc) elif _xout = "sysvars" then return _vars end if; if procname <> unknown then return ('procname')(x_rkf45) else _ndsol := 1; _ndsol := _ndsol; _ndsol := pointto(_dat[2][0]); return ('_ndsol')(x_rkf45) end if end if; try _res := _solnproc(_xout); [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] catch: error  end try end proc

plots[odeplot](dsol, thickness=3, color=red);

 

Download bouncing_ball.mw

 

How can I Plot exact solution, numeric solution and error function in one graph?

Please find attached code.

Thanks.

 

question.mw

Hi guys, 

I need help with differentiating a function I have defined. Here is the function I have:

The right hand side of this expression is a solution I have previously found via Maple, I know that this is correct. Basically I have a function a that is dependent on the another functon u(x,y,t).

Now the way I have defined this gives me the RHS of the above equation which is what I want. However, what I now need to do is to show that this constant function _F1(x,y,t) is equal to zero. I know this to be true via hand calcuations, but to do so I need to sub it into another equation where it has the derivatives of a. The way the derivatives are defined is through the D function. But this doesn't seem to work with how I have defined the function previously.

D[1](a)(x, y, t, u(x, y, t), diff(u(x, y, t), x), diff(u(x, y, t), y), diff(u(x, y, t), t), diff(u(x, y, t), x, x), diff(u(x, y, t), y, x), diff(u(x, y, t), x, t), diff(u(x, y, t), y, t), diff(u(x, y, t), t, t)) 

This should give me 

-4*diff(u(x,y,t),x,x,x)+diff(_F1(x,y,t),x)
However it just repeats what I input. I have tried defining the function in a different way,

a:=(x, y, t, u(x, y, t), diff(u(x, y, t), x), diff(u(x, y, t), y), diff(u(x, y, t), t), diff(u(x, y, t), x, x), diff(u(x, y, t), y, x), diff(u(x, y, t), x, t), diff(u(x, y, t), y, t), diff(u(x, y, t), t, t)) ->-4*diff(u(x,y,t),x,x)+_F1(x,y,t)

However this returns an error where I am not allowed to define this.

Can anyone help, would be a massive help. Thanks in advance.

What wouldn't work in Maple 2018 if I removed the Microsoft Visual C++ 2015 redistributable?  I have older versions of the C++ redistributable packages (ie 2013).  I hadn't noticed anything unusual when I initially removed it but maybe there's something that's affected in Maple?  Code generation package routines maybe?  What commands in Maple would be affected?

Reason is, I'm getting errors with another software and re-installing the 2015 C++ redistributable isn't installing properly.  So I'm just hoping there's no issues using Maple without the C++ 2015 redistributable being installed properly. 

 

Dear sir i want to display only three curves 1, curve 2 curve 3  in legends but in the plot it should be nine curve a sampe codes and a sample graph is attaching , please give suggestions. Here is my codes 

h:=z->1-(delta2/2)*(1 + cos(2*(Pi/L1)*(z - d1 - L1))):
K1:=(4/h(z)^4)-(sin(alpha)/F)-h(z)^2+Nb*h(z)^4:
lambda:=(F,Nb,delta2)->Int(K1,z=0..1):

L1:=0.2:
d1:=0.2:
alpha:=Pi/6:
A:=plot( [seq(seq(lambda(F,Nb,delta2), Nb=[0.1,0.2,0.3]), F=[0.1,0.2,0.5])], delta2=0.02..0.1, linestyle = [solid,longdash,dashdot],'thickness = 2',color=[red$3,blue$3,black$3]):

B:=plots:-textplot([[0.05,-1,F=0.1],[0.05,1.5,F=0.2], [0.05,3,F=0.5]], font=[times, 14]):

plots:-display(A, B);
 sample graphs 

Is it possible to split an execution group containing 2D input?
(without conversion to 1D which destroys the format).
Using F3 or the menu seems to work only for lines with a prompt.
But usually an execution group has a single prompt; lines with prompts appear e.g. when two execution groups are joined (with F4).
Is copy&paste the only solution?

Hi All,

I am thinking is there any simple function that could extract part of the points that have been ploted by plot() or plot3d(). And more ideally, we can specify some constraints such that the points being extracted must satisfy.

I guess Maple must stored the points somewhere in the memory in some kinds of data structure....

thanks.

I am seeking the limit of a series representation of a waveform to within so many significant figures.  Unfortunately, as the series contains more & more terms the demands on computation memory become a problem.  Perhaps there is a method within MAPLE I am not familiar with that can possibly circumvent this problem?

Below is the link to my worksheet.  The presumed theoretical limit is supposed to be 0.0894945 (this is based on what I have read)  (perhaps it may be wrong).  So far I have 3 of the sig figs agree, but would like to take it further.  Is this possible with different MAPLE commands than what I am currently employing?  Currently, MAPLE crashes if I venture beyond 100000 terms in the series.

seeking_the_limit.mw

First 821 822 823 824 825 826 827 Last Page 823 of 2216