tomleslie

13876 Reputation

20 Badges

15 years, 164 days

MaplePrimes Activity


These are replies submitted by tomleslie

but something has "changed"

I can only compare Maple2020.1 with Maple2019.2 because I only keep one sub-version of each Maple release.

The process to produce the both of the attached files was to

  1. open the plot3d help page as a worksheet
  2. execute it
  3. use the File->Export As dialogue with the "Files of Type" option set to PDF.

Using Maple 2019.2, the pdf file produced (ie test2019.pdf) appears complete (although t is difficult to check exactly!)

Using Maple 2020.1, the pdf file produced (ie test2020.pdf),  a few odd things seem to have happened

  1. All "text" (ie inert text, executable text, etc, etc) after the first plot has disappeared
  2. All of the 3d plots seem to exist (albeit without any of the intervening text!) - but the plots themselves have been horizontally cropped
  3. Although a lot of information seems to have gone missing from test2020.pdf, the file size is significantly increased: test2020.pdf is 7.23MB, compared with 2.77MB for test2019.pdf generated using Maple2019.2

FWIW, see the two attached pdfs

test2019.pdf

test2020.pdf

@wellsgbw 

The original file was "garbled" when I loaded it - probably becuase it had been saved with output. But all I did was execute it by usiing !!! in the toolbar then saving the result with a new name.

If I reload this new file - it is no longer garbled.

Sol

  1. loading the original - it looks like rubbish
  2. executing the original - it works and can be "ungarbled"

@wellsgbw 

the worksheet you supplied functions and was saved using Maple 2020 - see the attached.

Rendering on this site seems to have "lost" a large output section from the middle worksheet - but running it in Maple causes no issues I can detect.

sys:={diff(r(t),t) = k2*r1(t) - k1*A*r(t),
diff(r1(t),t) = k1*A*r(t) + k4*r2(t) - (k2+k3*A)*r1(t),
diff(r2(t),t)=k3*A*r1(t) + k6*p(t) + K10*d2(t) - (k4+k5+k9)*r2(t),
diff(p(t),t)=k5*r2(t) + k8*d(t) - (k6+k7)*p(t),
diff(d(t),t)= k7*p(t)- k8*d(t),
diff(d2(t),t)=k9*r2(t) - k10*d2(t),
r(0)=rtot, r1(0)=0, r2(0)=0, p(0)=0, d(0)=0, d2(0)=0};

{d(0) = 0, d2(0) = 0, diff(d(t), t) = k7*p(t)-k8*d(t), diff(d2(t), t) = k9*r2(t)-k10*d2(t), diff(p(t), t) = k5*r2(t)+k8*d(t)-(k6+k7)*p(t), diff(r(t), t) = k2*r1(t)-k1*A*r(t), diff(r1(t), t) = k1*A*r(t)+k4*r2(t)-(A*k3+k2)*r1(t), diff(r2(t), t) = k3*A*r1(t)+k6*p(t)+K10*d2(t)-(k4+k5+k9)*r2(t), p(0) = 0, r(0) = rtot, r1(0) = 0, r2(0) = 0}

(1)

fcns:= {r(t), r1(t), r2(t), p(t), d(t), d2(t)};

{d(t), d2(t), p(t), r(t), r1(t), r2(t)}

(2)

SolutionSet:=dsolve(sys,fcns,method=laplace);

{d(t) = -k3*k1*A^2*k5*k7*rtot*(sum((_alpha1+k10)*exp(_alpha1*t)/(2*A^2*K10*_alpha1*k1*k3*k9+A^2*K10*k1*k3*k6*k9+A^2*K10*k1*k3*k7*k9+A^2*K10*k1*k3*k8*k9-4*A^2*_alpha1^3*k1*k3-3*A^2*_alpha1^2*k1*k10*k3-3*A^2*_alpha1^2*k1*k3*k5-3*A^2*_alpha1^2*k1*k3*k6-3*A^2*_alpha1^2*k1*k3*k7-3*A^2*_alpha1^2*k1*k3*k8-3*A^2*_alpha1^2*k1*k3*k9-2*A^2*_alpha1*k1*k10*k3*k5-2*A^2*_alpha1*k1*k10*k3*k6-2*A^2*_alpha1*k1*k10*k3*k7-2*A^2*_alpha1*k1*k10*k3*k8-2*A^2*_alpha1*k1*k10*k3*k9-2*A^2*_alpha1*k1*k3*k5*k7-2*A^2*_alpha1*k1*k3*k5*k8-2*A^2*_alpha1*k1*k3*k6*k8-2*A^2*_alpha1*k1*k3*k6*k9-2*A^2*_alpha1*k1*k3*k7*k9-2*A^2*_alpha1*k1*k3*k8*k9-A^2*k1*k10*k3*k5*k7-A^2*k1*k10*k3*k5*k8-A^2*k1*k10*k3*k6*k8-A^2*k1*k10*k3*k6*k9-A^2*k1*k10*k3*k7*k9-A^2*k1*k10*k3*k8*k9-A^2*k1*k3*k6*k8*k9+3*A*K10*_alpha1^2*k1*k9+3*A*K10*_alpha1^2*k3*k9+2*A*K10*_alpha1*k1*k6*k9+2*A*K10*_alpha1*k1*k7*k9+2*A*K10*_alpha1*k1*k8*k9+2*A*K10*_alpha1*k3*k6*k9+2*A*K10*_alpha1*k3*k7*k9+2*A*K10*_alpha1*k3*k8*k9+A*K10*k1*k6*k8*k9+A*K10*k3*k6*k8*k9-5*A*_alpha1^4*k1-5*A*_alpha1^4*k3-4*A*_alpha1^3*k1*k10-4*A*_alpha1^3*k1*k4-4*A*_alpha1^3*k1*k5-4*A*_alpha1^3*k1*k6-4*A*_alpha1^3*k1*k7-4*A*_alpha1^3*k1*k8-4*A*_alpha1^3*k1*k9-4*A*_alpha1^3*k10*k3-4*A*_alpha1^3*k3*k5-4*A*_alpha1^3*k3*k6-4*A*_alpha1^3*k3*k7-4*A*_alpha1^3*k3*k8-4*A*_alpha1^3*k3*k9-3*A*_alpha1^2*k1*k10*k4-3*A*_alpha1^2*k1*k10*k5-3*A*_alpha1^2*k1*k10*k6-3*A*_alpha1^2*k1*k10*k7-3*A*_alpha1^2*k1*k10*k8-3*A*_alpha1^2*k1*k10*k9-3*A*_alpha1^2*k1*k4*k6-3*A*_alpha1^2*k1*k4*k7-3*A*_alpha1^2*k1*k4*k8-3*A*_alpha1^2*k1*k5*k7-3*A*_alpha1^2*k1*k5*k8-3*A*_alpha1^2*k1*k6*k8-3*A*_alpha1^2*k1*k6*k9-3*A*_alpha1^2*k1*k7*k9-3*A*_alpha1^2*k1*k8*k9-3*A*_alpha1^2*k10*k3*k5-3*A*_alpha1^2*k10*k3*k6-3*A*_alpha1^2*k10*k3*k7-3*A*_alpha1^2*k10*k3*k8-3*A*_alpha1^2*k10*k3*k9-3*A*_alpha1^2*k3*k5*k7-3*A*_alpha1^2*k3*k5*k8-3*A*_alpha1^2*k3*k6*k8-3*A*_alpha1^2*k3*k6*k9-3*A*_alpha1^2*k3*k7*k9-3*A*_alpha1^2*k3*k8*k9-2*A*_alpha1*k1*k10*k4*k6-2*A*_alpha1*k1*k10*k4*k7-2*A*_alpha1*k1*k10*k4*k8-2*A*_alpha1*k1*k10*k5*k7-2*A*_alpha1*k1*k10*k5*k8-2*A*_alpha1*k1*k10*k6*k8-2*A*_alpha1*k1*k10*k6*k9-2*A*_alpha1*k1*k10*k7*k9-2*A*_alpha1*k1*k10*k8*k9-2*A*_alpha1*k1*k4*k6*k8-2*A*_alpha1*k1*k6*k8*k9-2*A*_alpha1*k10*k3*k5*k7-2*A*_alpha1*k10*k3*k5*k8-2*A*_alpha1*k10*k3*k6*k8-2*A*_alpha1*k10*k3*k6*k9-2*A*_alpha1*k10*k3*k7*k9-2*A*_alpha1*k10*k3*k8*k9-2*A*_alpha1*k3*k6*k8*k9-A*k1*k10*k4*k6*k8-A*k1*k10*k6*k8*k9-A*k10*k3*k6*k8*k9+4*K10*_alpha1^3*k9+3*K10*_alpha1^2*k2*k9+3*K10*_alpha1^2*k6*k9+3*K10*_alpha1^2*k7*k9+3*K10*_alpha1^2*k8*k9+2*K10*_alpha1*k2*k6*k9+2*K10*_alpha1*k2*k7*k9+2*K10*_alpha1*k2*k8*k9+2*K10*_alpha1*k6*k8*k9+K10*k2*k6*k8*k9-6*_alpha1^5-5*_alpha1^4*k10-5*_alpha1^4*k2-5*_alpha1^4*k4-5*_alpha1^4*k5-5*_alpha1^4*k6-5*_alpha1^4*k7-5*_alpha1^4*k8-5*_alpha1^4*k9-4*_alpha1^3*k10*k2-4*_alpha1^3*k10*k4-4*_alpha1^3*k10*k5-4*_alpha1^3*k10*k6-4*_alpha1^3*k10*k7-4*_alpha1^3*k10*k8-4*_alpha1^3*k10*k9-4*_alpha1^3*k2*k4-4*_alpha1^3*k2*k5-4*_alpha1^3*k2*k6-4*_alpha1^3*k2*k7-4*_alpha1^3*k2*k8-4*_alpha1^3*k2*k9-4*_alpha1^3*k4*k6-4*_alpha1^3*k4*k7-4*_alpha1^3*k4*k8-4*_alpha1^3*k5*k7-4*_alpha1^3*k5*k8-4*_alpha1^3*k6*k8-4*_alpha1^3*k6*k9-4*_alpha1^3*k7*k9-4*_alpha1^3*k8*k9-3*_alpha1^2*k10*k2*k4-3*_alpha1^2*k10*k2*k5-3*_alpha1^2*k10*k2*k6-3*_alpha1^2*k10*k2*k7-3*_alpha1^2*k10*k2*k8-3*_alpha1^2*k10*k2*k9-3*_alpha1^2*k10*k4*k6-3*_alpha1^2*k10*k4*k7-3*_alpha1^2*k10*k4*k8-3*_alpha1^2*k10*k5*k7-3*_alpha1^2*k10*k5*k8-3*_alpha1^2*k10*k6*k8-3*_alpha1^2*k10*k6*k9-3*_alpha1^2*k10*k7*k9-3*_alpha1^2*k10*k8*k9-3*_alpha1^2*k2*k4*k6-3*_alpha1^2*k2*k4*k7-3*_alpha1^2*k2*k4*k8-3*_alpha1^2*k2*k5*k7-3*_alpha1^2*k2*k5*k8-3*_alpha1^2*k2*k6*k8-3*_alpha1^2*k2*k6*k9-3*_alpha1^2*k2*k7*k9-3*_alpha1^2*k2*k8*k9-3*_alpha1^2*k4*k6*k8-3*_alpha1^2*k6*k8*k9-2*_alpha1*k10*k2*k4*k6-2*_alpha1*k10*k2*k4*k7-2*_alpha1*k10*k2*k4*k8-2*_alpha1*k10*k2*k5*k7-2*_alpha1*k10*k2*k5*k8-2*_alpha1*k10*k2*k6*k8-2*_alpha1*k10*k2*k6*k9-2*_alpha1*k10*k2*k7*k9-2*_alpha1*k10*k2*k8*k9-2*_alpha1*k10*k4*k6*k8-2*_alpha1*k10*k6*k8*k9-2*_alpha1*k2*k4*k6*k8-2*_alpha1*k2*k6*k8*k9-k10*k2*k4*k6*k8-k10*k2*k6*k8*k9), _alpha1 = RootOf(_Z^6+(A*k1+A*k3+k10+k2+k4+k5+k6+k7+k8+k9)*_Z^5+(A^2*k1*k3+A*k1*k10+A*k1*k4+A*k1*k5+A*k1*k6+A*k1*k7+A*k1*k8+A*k1*k9+A*k10*k3+A*k3*k5+A*k3*k6+A*k3*k7+A*k3*k8+A*k3*k9-K10*k9+k10*k2+k10*k4+k10*k5+k10*k6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*A^2*_alpha1^3*k1*k3-3*A^2*_alpha1^2*k1*k10*k3-3*A^2*_alpha1^2*k1*k3*k5-3*A^2*_alpha1^2*k1*k3*k6-3*A^2*_alpha1^2*k1*k3*k7-3*A^2*_alpha1^2*k1*k3*k8-3*A^2*_alpha1^2*k1*k3*k9-2*A^2*_alpha1*k1*k10*k3*k5-2*A^2*_alpha1*k1*k10*k3*k6-2*A^2*_alpha1*k1*k10*k3*k7-2*A^2*_alpha1*k1*k10*k3*k8-2*A^2*_alpha1*k1*k10*k3*k9-2*A^2*_alpha1*k1*k3*k5*k7-2*A^2*_alpha1*k1*k3*k5*k8-2*A^2*_alpha1*k1*k3*k6*k8-2*A^2*_alpha1*k1*k3*k6*k9-2*A^2*_alpha1*k1*k3*k7*k9-2*A^2*_alpha1*k1*k3*k8*k9-A^2*k1*k10*k3*k5*k7-A^2*k1*k10*k3*k5*k8-A^2*k1*k10*k3*k6*k8-A^2*k1*k10*k3*k6*k9-A^2*k1*k10*k3*k7*k9-A^2*k1*k10*k3*k8*k9-A^2*k1*k3*k6*k8*k9+3*A*K10*_alpha1^2*k1*k9+3*A*K10*_alpha1^2*k3*k9+2*A*K10*_alpha1*k1*k6*k9+2*A*K10*_alpha1*k1*k7*k9+2*A*K10*_alpha1*k1*k8*k9+2*A*K10*_alpha1*k3*k6*k9+2*A*K10*_alpha1*k3*k7*k9+2*A*K10*_alpha1*k3*k8*k9+A*K10*k1*k6*k8*k9+A*K10*k3*k6*k8*k9-5*A*_alpha1^4*k1-5*A*_alpha1^4*k3-4*A*_alpha1^3*k1*k10-4*A*_alpha1^3*k1*k4-4*A*_alpha1^3*k1*k5-4*A*_alpha1^3*k1*k6-4*A*_alpha1^3*k1*k7-4*A*_alpha1^3*k1*k8-4*A*_alpha1^3*k1*k9-4*A*_alpha1^3*k10*k3-4*A*_alpha1^3*k3*k5-4*A*_alpha1^3*k3*k6-4*A*_alpha1^3*k3*k7-4*A*_alpha1^3*k3*k8-4*A*_alpha1^3*k3*k9-3*A*_alpha1^2*k1*k10*k4-3*A*_alpha1^2*k1*k10*k5-3*A*_alpha1^2*k1*k10*k6-3*A*_alpha1^2*k1*k10*k7-3*A*_alpha1^2*k1*k10*k8-3*A*_alpha1^2*k1*k10*k9-3*A*_alpha1^2*k1*k4*k6-3*A*_alpha1^2*k1*k4*k7-3*A*_alpha1^2*k1*k4*k8-3*A*_alpha1^2*k1*k5*k7-3*A*_alpha1^2*k1*k5*k8-3*A*_alpha1^2*k1*k6*k8-3*A*_alpha1^2*k1*k6*k9-3*A*_alpha1^2*k1*k7*k9-3*A*_alpha1^2*k1*k8*k9-3*A*_alpha1^2*k10*k3*k5-3*A*_alpha1^2*k10*k3*k6-3*A*_alpha1^2*k10*k3*k7-3*A*_alpha1^2*k10*k3*k8-3*A*_alpha1^2*k10*k3*k9-3*A*_alpha1^2*k3*k5*k7-3*A*_alpha1^2*k3*k5*k8-3*A*_alpha1^2*k3*k6*k8-3*A*_alpha1^2*k3*k6*k9-3*A*_alpha1^2*k3*k7*k9-3*A*_alpha1^2*k3*k8*k9-2*A*_alpha1*k1*k10*k4*k6-2*A*_alpha1*k1*k10*k4*k7-2*A*_alpha1*k1*k10*k4*k8-2*A*_alpha1*k1*k10*k5*k7-2*A*_alpha1*k1*k10*k5*k8-2*A*_alpha1*k1*k10*k6*k8-2*A*_alpha1*k1*k10*k6*k9-2*A*_alpha1*k1*k10*k7*k9-2*A*_alpha1*k1*k10*k8*k9-2*A*_alpha1*k1*k4*k6*k8-2*A*_alpha1*k1*k6*k8*k9-2*A*_alpha1*k10*k3*k5*k7-2*A*_alpha1*k10*k3*k5*k8-2*A*_alpha1*k10*k3*k6*k8-2*A*_alpha1*k10*k3*k6*k9-2*A*_alpha1*k10*k3*k7*k9-2*A*_alpha1*k10*k3*k8*k9-2*A*_alpha1*k3*k6*k8*k9-A*k1*k10*k4*k6*k8-A*k1*k10*k6*k8*k9-A*k10*k3*k6*k8*k9+4*K10*_alpha1^3*k9+3*K10*_alpha1^2*k2*k9+3*K10*_alpha1^2*k6*k9+3*K10*_alpha1^2*k7*k9+3*K10*_alpha1^2*k8*k9+2*K10*_alpha1*k2*k6*k9+2*K10*_alpha1*k2*k7*k9+2*K10*_alpha1*k2*k8*k9+2*K10*_alpha1*k6*k8*k9+K10*k2*k6*k8*k9-6*_alpha1^5-5*_alpha1^4*k10-5*_alpha1^4*k2-5*_alpha1^4*k4-5*_alpha1^4*k5-5*_alpha1^4*k6-5*_alpha1^4*k7-5*_alpha1^4*k8-5*_alpha1^4*k9-4*_alpha1^3*k10*k2-4*_alpha1^3*k10*k4-4*_alpha1^3*k10*k5-4*_alpha1^3*k10*k6-4*_alpha1^3*k10*k7-4*_alpha1^3*k10*k8-4*_alpha1^3*k10*k9-4*_alpha1^3*k2*k4-4*_alpha1^3*k2*k5-4*_alpha1^3*k2*k6-4*_alpha1^3*k2*k7-4*_alpha1^3*k2*k8-4*_alpha1^3*k2*k9-4*_alpha1^3*k4*k6-4*_alpha1^3*k4*k7-4*_alpha1^3*k4*k8-4*_alpha1^3*k5*k7-4*_alpha1^3*k5*k8-4*_alpha1^3*k6*k8-4*_alpha1^3*k6*k9-4*_alpha1^3*k7*k9-4*_alpha1^3*k8*k9-3*_alpha1^2*k10*k2*k4-3*_alpha1^2*k10*k2*k5-3*_alpha1^2*k10*k2*k6-3*_alpha1^2*k10*k2*k7-3*_alpha1^2*k10*k2*k8-3*_alpha1^2*k10*k2*k9-3*_alpha1^2*k10*k4*k6-3*_alpha1^2*k10*k4*k7-3*_alpha1^2*k10*k4*k8-3*_alpha1^2*k10*k5*k7-3*_alpha1^2*k10*k5*k8-3*_alpha1^2*k10*k6*k8-3*_alpha1^2*k10*k6*k9-3*_alpha1^2*k10*k7*k9-3*_alpha1^2*k10*k8*k9-3*_alpha1^2*k2*k4*k6-3*_alpha1^2*k2*k4*k7-3*_alpha1^2*k2*k4*k8-3*_alpha1^2*k2*k5*k7-3*_alpha1^2*k2*k5*k8-3*_alpha1^2*k2*k6*k8-3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A^2*k1*k10*k3*k5*k8-A^2*k1*k10*k3*k6*k8-A^2*k1*k10*k3*k6*k9-A^2*k1*k10*k3*k7*k9-A^2*k1*k10*k3*k8*k9-A^2*k1*k3*k6*k8*k9+3*A*K10*_alpha1^2*k1*k9+3*A*K10*_alpha1^2*k3*k9+2*A*K10*_alpha1*k1*k6*k9+2*A*K10*_alpha1*k1*k7*k9+2*A*K10*_alpha1*k1*k8*k9+2*A*K10*_alpha1*k3*k6*k9+2*A*K10*_alpha1*k3*k7*k9+2*A*K10*_alpha1*k3*k8*k9+A*K10*k1*k6*k8*k9+A*K10*k3*k6*k8*k9-5*A*_alpha1^4*k1-5*A*_alpha1^4*k3-4*A*_alpha1^3*k1*k10-4*A*_alpha1^3*k1*k4-4*A*_alpha1^3*k1*k5-4*A*_alpha1^3*k1*k6-4*A*_alpha1^3*k1*k7-4*A*_alpha1^3*k1*k8-4*A*_alpha1^3*k1*k9-4*A*_alpha1^3*k10*k3-4*A*_alpha1^3*k3*k5-4*A*_alpha1^3*k3*k6-4*A*_alpha1^3*k3*k7-4*A*_alpha1^3*k3*k8-4*A*_alpha1^3*k3*k9-3*A*_alpha1^2*k1*k10*k4-3*A*_alpha1^2*k1*k10*k5-3*A*_alpha1^2*k1*k10*k6-3*A*_alpha1^2*k1*k10*k7-3*A*_alpha1^2*k1*k10*k8-3*A*_alpha1^2*k1*k10*k9-3*A*_alpha1^2*k1*k4*k6-3*A*_alpha1^2*k1*k4*k7-3*A*_alpha1^2*k1*k4*k8-3*A*_alpha1^2*k1*k5*k7-3*A*_alpha1^2*k1*k5*k8-3*A*_alpha1^2*k1*k6*k8-3*A*_alpha1^2*k1*k6*k9-3*A*_alpha1^2*k1*k7*k9-3*A*_alpha1^2*k1*k8*k9-3*A*_alpha1^2*k10*k3*k5-3*A*_alpha1^2*k10*k3*k6-3*A*_alpha1^2*k10*k3*k7-3*A*_alpha1^2*k10*k3*k8-3*A*_alpha1^2*k10*k3*k9-3*A*_alpha1^2*k3*k5*k7-3*A*_alpha1^2*k3*k5*k8-3*A*_alpha1^2*k3*k6*k8-3*A*_alpha1^2*k3*k6*k9-3*A*_alpha1^2*k3*k7*k9-3*A*_alpha1^2*k3*k8*k9-2*A*_alpha1*k1*k10*k4*k6-2*A*_alpha1*k1*k10*k4*k7-2*A*_alpha1*k1*k10*k4*k8-2*A*_alpha1*k1*k10*k5*k7-2*A*_alpha1*k1*k10*k5*k8-2*A*_alpha1*k1*k10*k6*k8-2*A*_alpha1*k1*k10*k6*k9-2*A*_alpha1*k1*k10*k7*k9-2*A*_alpha1*k1*k10*k8*k9-2*A*_alpha1*k1*k4*k6*k8-2*A*_alpha1*k1*k6*k8*k9-2*A*_alpha1*k10*k3*k5*k7-2*A*_alpha1*k10*k3*k5*k8-2*A*_alpha1*k10*k3*k6*k8-2*A*_alpha1*k10*k3*k6*k9-2*A*_alpha1*k10*k3*k7*k9-2*A*_alpha1*k10*k3*k8*k9-2*A*_alpha1*k3*k6*k8*k9-A*k1*k10*k4*k6*k8-A*k1*k10*k6*k8*k9-A*k10*k3*k6*k8*k9+4*K10*_alpha1^3*k9+3*K10*_alpha1^2*k2*k9+3*K10*_alpha1^2*k6*k9+3*K10*_alpha1^2*k7*k9+3*K10*_alpha1^2*k8*k9+2*K10*_alpha1*k2*k6*k9+2*K10*_alpha1*k2*k7*k9+2*K10*_alpha1*k2*k8*k9+2*K10*_alpha1*k6*k8*k9+K10*k2*k6*k8*k9-6*_alpha1^5-5*_alpha1^4*k10-5*_alpha1^4*k2-5*_alpha1^4*k4-5*_alpha1^4*k5-5*_alpha1^4*k6-5*_alpha1^4*k7-5*_alpha1^4*k8-5*_alpha1^4*k9-4*_alpha1^3*k10*k2-4*_alpha1^3*k10*k4-4*_alpha1^3*k10*k5-4*_alpha1^3*k10*k6-4*_alpha1^3*k10*k7-4*_alpha1^3*k10*k8-4*_alpha1^3*k10*k9-4*_alpha1^3*k2*k4-4*_alpha1^3*k2*k5-4*_alpha1^3*k2*k6-4*_alpha1^3*k2*k7-4*_alpha1^3*k2*k8-4*_alpha1^3*k2*k9-4*_alpha1^3*k4*k6-4*_alpha1^3*k4*k7-4*_alpha1^3*k4*k8-4*_alpha1^3*k5*k7-4*_alpha1^3*k5*k8-4*_alpha1^3*k6*k8-4*_alpha1^3*k6*k9-4*_alpha1^3*k7*k9-4*_alpha1^3*k8*k9-3*_alpha1^2*k10*k2*k4-3*_alpha1^2*k10*k2*k5-3*_alpha1^2*k10*k2*k6-3*_alpha1^2*k10*k2*k7-3*_alpha1^2*k10*k2*k8-3*_alpha1^2*k10*k2*k9-3*_alpha1^2*k10*k4*k6-3*_alpha1^2*k10*k4*k7-3*_alpha1^2*k10*k4*k8-3*_alpha1^2*k10*k5*k7-3*_alpha1^2*k10*k5*k8-3*_alpha1^2*k10*k6*k8-3*_alpha1^2*k10*k6*k9-3*_alpha1^2*k10*k7*k9-3*_alpha1^2*k10*k8*k9-3*_alpha1^2*k2*k4*k6-3*_alpha1^2*k2*k4*k7-3*_alpha1^2*k2*k4*k8-3*_alpha1^2*k2*k5*k7-3*_alpha1^2*k2*k5*k8-3*_alpha1^2*k2*k6*k8-3*_alpha1^2*k2*k6*k9-3*_alpha1^2*k2*k7*k9-3*_alpha1^2*k2*k8*k9-3*_alpha1^2*k4*k6*k8-3*_alpha1^2*k6*k8*k9-2*_alpha1*k10*k2*k4*k6-2*_alpha1*k10*k2*k4*k7-2*_alpha1*k10*k2*k4*k8-2*_alpha1*k10*k2*k5*k7-2*_alpha1*k10*k2*k5*k8-2*_alpha1*k10*k2*k6*k8-2*_alpha1*k10*k2*k6*k9-2*_alpha1*k10*k2*k7*k9-2*_alpha1*k10*k2*k8*k9-2*_alpha1*k10*k4*k6*k8-2*_alpha1*k10*k6*k8*k9-2*_alpha1*k2*k4*k6*k8-2*_alpha1*k2*k6*k8*k9-k10*k2*k4*k6*k8-k10*k2*k6*k8*k9), _alpha1 = RootOf(_Z^6+(A*k1+A*k3+k10+k2+k4+k5+k6+k7+k8+k9)*_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ot*(sum(exp(_alpha1*t)*(-_alpha1^5+_alpha1^2*(A*K10*k3*k9-A*k10*k3*k5-A*k10*k3*k6-A*k10*k3*k7-A*k10*k3*k8-A*k10*k3*k9-A*k3*k5*k7-A*k3*k5*k8-A*k3*k6*k8-A*k3*k6*k9-A*k3*k7*k9-A*k3*k8*k9+K10*k2*k9+K10*k6*k9+K10*k7*k9+K10*k8*k9-k10*k2*k4-k10*k2*k5-k10*k2*k6-k10*k2*k7-k10*k2*k8-k10*k2*k9-k10*k4*k6-k10*k4*k7-k10*k4*k8-k10*k5*k7-k10*k5*k8-k10*k6*k8-k10*k6*k9-k10*k7*k9-k10*k8*k9-k2*k4*k6-k2*k4*k7-k2*k4*k8-k2*k5*k7-k2*k5*k8-k2*k6*k8-k2*k6*k9-k2*k7*k9-k2*k8*k9-k4*k6*k8-k6*k8*k9)+(-A*k10*k3-A*k3*k5-A*k3*k6-A*k3*k7-A*k3*k8-A*k3*k9+K10*k9-k10*k2-k10*k4-k10*k5-k10*k6-k10*k7-k10*k8-k10*k9-k2*k4-k2*k5-k2*k6-k2*k7-k2*k8-k2*k9-k4*k6-k4*k7-k4*k8-k5*k7-k5*k8-k6*k8-k6*k9-k7*k9-k8*k9)*_alpha1^3-_alpha1^4*(A*k3+k10+k2+k4+k5+k6+k7+k8+k9)+k2*(K10*_alpha1*k6*k9+K10*_alpha1*k7*k9+K10*_alpha1*k8*k9+K10*k6*k8*k9-_alpha1*k10*k4*k6-_alpha1*k10*k4*k7-_alpha1*k10*k4*k8-_alpha1*k10*k5*k7-_alpha1*k10*k5*k8-_alpha1*k10*k6*k8-_alpha1*k10*k6*k9-_alpha1*k10*k7*k9-_alpha1*k10*k8*k9-_alpha1*k4*k6*k8-_alpha1*k6*k8*k9-k10*k4*k6*k8-k10*k6*k8*k9)+A*k3*(K10*_alpha1*k6*k9+K10*_alpha1*k7*k9+K10*_alpha1*k8*k9+K10*k6*k8*k9-_alpha1*k10*k5*k7-_alpha1*k10*k5*k8-_alpha1*k10*k6*k8-_alpha1*k10*k6*k9-_alpha1*k10*k7*k9-_alpha1*k10*k8*k9-_alpha1*k6*k8*k9-k10*k6*k8*k9)+_alpha1*k6*k8*(K10*k9-k10*k4-k10*k9))/(2*A^2*K10*_alpha1*k1*k3*k9+A^2*K10*k1*k3*k6*k9+A^2*K10*k1*k3*k7*k9+A^2*K10*k1*k3*k8*k9-4*A^2*_alpha1^3*k1*k3-3*A^2*_alpha1^2*k1*k10*k3-3*A^2*_alpha1^2*k1*k3*k5-3*A^2*_alpha1^2*k1*k3*k6-3*A^2*_alpha1^2*k1*k3*k7-3*A^2*_alpha1^2*k1*k3*k8-3*A^2*_alpha1^2*k1*k3*k9-2*A^2*_alpha1*k1*k10*k3*k5-2*A^2*_alpha1*k1*k10*k3*k6-2*A^2*_alpha1*k1*k10*k3*k7-2*A^2*_alpha1*k1*k10*k3*k8-2*A^2*_alpha1*k1*k10*k3*k9-2*A^2*_alpha1*k1*k3*k5*k7-2*A^2*_alpha1*k1*k3*k5*k8-2*A^2*_alpha1*k1*k3*k6*k8-2*A^2*_alpha1*k1*k3*k6*k9-2*A^2*_alpha1*k1*k3*k7*k9-2*A^2*_alpha1*k1*k3*k8*k9-A^2*k1*k10*k3*k5*k7-A^2*k1*k10*k3*k5*k8-A^2*k1*k10*k3*k6*k8-A^2*k1*k10*k3*k6*k9-A^2*k1*k10*k3*k7*k9-A^2*k1*k10*k3*k8*k9-A^2*k1*k3*k6*k8*k9+3*A*K10*_alpha1^2*k1*k9+3*A*K10*_alpha1^2*k3*k9+2*A*K10*_alpha1*k1*k6*k9+2*A*K10*_alpha1*k1*k7*k9+2*A*K10*_alpha1*k1*k8*k9+2*A*K10*_alpha1*k3*k6*k9+2*A*K10*_alpha1*k3*k7*k9+2*A*K10*_alpha1*k3*k8*k9+A*K10*k1*k6*k8*k9+A*K10*k3*k6*k8*k9-5*A*_alpha1^4*k1-5*A*_alpha1^4*k3-4*A*_alpha1^3*k1*k10-4*A*_alpha1^3*k1*k4-4*A*_alpha1^3*k1*k5-4*A*_alpha1^3*k1*k6-4*A*_alpha1^3*k1*k7-4*A*_alpha1^3*k1*k8-4*A*_alpha1^3*k1*k9-4*A*_alpha1^3*k10*k3-4*A*_alpha1^3*k3*k5-4*A*_alpha1^3*k3*k6-4*A*_alpha1^3*k3*k7-4*A*_alpha1^3*k3*k8-4*A*_alpha1^3*k3*k9-3*A*_alpha1^2*k1*k10*k4-3*A*_alpha1^2*k1*k10*k5-3*A*_alpha1^2*k1*k10*k6-3*A*_alpha1^2*k1*k10*k7-3*A*_alpha1^2*k1*k10*k8-3*A*_alpha1^2*k1*k10*k9-3*A*_alpha1^2*k1*k4*k6-3*A*_alpha1^2*k1*k4*k7-3*A*_alpha1^2*k1*k4*k8-3*A*_alpha1^2*k1*k5*k7-3*A*_alpha1^2*k1*k5*k8-3*A*_alpha1^2*k1*k6*k8-3*A*_alpha1^2*k1*k6*k9-3*A*_alpha1^2*k1*k7*k9-3*A*_alpha1^2*k1*k8*k9-3*A*_alpha1^2*k10*k3*k5-3*A*_alpha1^2*k10*k3*k6-3*A*_alpha1^2*k10*k3*k7-3*A*_alpha1^2*k10*k3*k8-3*A*_alpha1^2*k10*k3*k9-3*A*_alpha1^2*k3*k5*k7-3*A*_alpha1^2*k3*k5*k8-3*A*_alpha1^2*k3*k6*k8-3*A*_alpha1^2*k3*k6*k9-3*A*_alpha1^2*k3*k7*k9-3*A*_alpha1^2*k3*k8*k9-2*A*_alpha1*k1*k10*k4*k6-2*A*_alpha1*k1*k10*k4*k7-2*A*_alpha1*k1*k10*k4*k8-2*A*_alpha1*k1*k10*k5*k7-2*A*_alpha1*k1*k10*k5*k8-2*A*_alpha1*k1*k10*k6*k8-2*A*_alpha1*k1*k10*k6*k9-2*A*_alpha1*k1*k10*k7*k9-2*A*_alpha1*k1*k10*k8*k9-2*A*_alpha1*k1*k4*k6*k8-2*A*_alpha1*k1*k6*k8*k9-2*A*_alpha1*k10*k3*k5*k7-2*A*_alpha1*k10*k3*k5*k8-2*A*_alpha1*k10*k3*k6*k8-2*A*_alpha1*k10*k3*k6*k9-2*A*_alpha1*k10*k3*k7*k9-2*A*_alpha1*k10*k3*k8*k9-2*A*_alpha1*k3*k6*k8*k9-A*k1*k10*k4*k6*k8-A*k1*k10*k6*k8*k9-A*k10*k3*k6*k8*k9+4*K10*_alpha1^3*k9+3*K10*_alpha1^2*k2*k9+3*K10*_alpha1^2*k6*k9+3*K10*_alpha1^2*k7*k9+3*K10*_alpha1^2*k8*k9+2*K10*_alpha1*k2*k6*k9+2*K10*_alpha1*k2*k7*k9+2*K10*_alpha1*k2*k8*k9+2*K10*_alpha1*k6*k8*k9+K10*k2*k6*k8*k9-6*_alpha1^5-5*_alpha1^4*k10-5*_alpha1^4*k2-5*_alpha1^4*k4-5*_alpha1^4*k5-5*_alpha1^4*k6-5*_alpha1^4*k7-5*_alpha1^4*k8-5*_alpha1^4*k9-4*_alpha1^3*k10*k2-4*_alpha1^3*k10*k4-4*_alpha1^3*k10*k5-4*_alpha1^3*k10*k6-4*_alpha1^3*k10*k7-4*_alpha1^3*k10*k8-4*_alpha1^3*k10*k9-4*_alpha1^3*k2*k4-4*_alpha1^3*k2*k5-4*_alpha1^3*k2*k6-4*_alpha1^3*k2*k7-4*_alpha1^3*k2*k8-4*_alpha1^3*k2*k9-4*_alpha1^3*k4*k6-4*_alpha1^3*k4*k7-4*_alpha1^3*k4*k8-4*_alpha1^3*k5*k7-4*_alpha1^3*k5*k8-4*_alpha1^3*k6*k8-4*_alpha1^3*k6*k9-4*_alpha1^3*k7*k9-4*_alpha1^3*k8*k9-3*_alpha1^2*k10*k2*k4-3*_alpha1^2*k10*k2*k5-3*_alpha1^2*k10*k2*k6-3*_alpha1^2*k10*k2*k7-3*_alpha1^2*k10*k2*k8-3*_alpha1^2*k10*k2*k9-3*_alpha1^2*k10*k4*k6-3*_alpha1^2*k10*k4*k7-3*_alpha1^2*k10*k4*k8-3*_alpha1^2*k10*k5*k7-3*_alpha1^2*k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k3*k7*k9+A^2*K10*k1*k3*k8*k9-4*A^2*_alpha1^3*k1*k3-3*A^2*_alpha1^2*k1*k10*k3-3*A^2*_alpha1^2*k1*k3*k5-3*A^2*_alpha1^2*k1*k3*k6-3*A^2*_alpha1^2*k1*k3*k7-3*A^2*_alpha1^2*k1*k3*k8-3*A^2*_alpha1^2*k1*k3*k9-2*A^2*_alpha1*k1*k10*k3*k5-2*A^2*_alpha1*k1*k10*k3*k6-2*A^2*_alpha1*k1*k10*k3*k7-2*A^2*_alpha1*k1*k10*k3*k8-2*A^2*_alpha1*k1*k10*k3*k9-2*A^2*_alpha1*k1*k3*k5*k7-2*A^2*_alpha1*k1*k3*k5*k8-2*A^2*_alpha1*k1*k3*k6*k8-2*A^2*_alpha1*k1*k3*k6*k9-2*A^2*_alpha1*k1*k3*k7*k9-2*A^2*_alpha1*k1*k3*k8*k9-A^2*k1*k10*k3*k5*k7-A^2*k1*k10*k3*k5*k8-A^2*k1*k10*k3*k6*k8-A^2*k1*k10*k3*k6*k9-A^2*k1*k10*k3*k7*k9-A^2*k1*k10*k3*k8*k9-A^2*k1*k3*k6*k8*k9+3*A*K10*_alpha1^2*k1*k9+3*A*K10*_alpha1^2*k3*k9+2*A*K10*_alpha1*k1*k6*k9+2*A*K10*_alpha1*k1*k7*k9+2*A*K10*_alpha1*k1*k8*k9+2*A*K10*_alpha1*k3*k6*k9+2*A*K10*_alpha1*k3*k7*k9+2*A*K10*_alpha1*k3*k8*k9+A*K10*k1*k6*k8*k9+A*K10*k3*k6*k8*k9-5*A*_alpha1^4*k1-5*A*_alpha1^4*k3-4*A*_alpha1^3*k1*k10-4*A*_alpha1^3*k1*k4-4*A*_alpha1^3*k1*k5-4*A*_alpha1^3*k1*k6-4*A*_alpha1^3*k1*k7-4*A*_alpha1^3*k1*k8-4*A*_alpha1^3*k1*k9-4*A*_alpha1^3*k10*k3-4*A*_alpha1^3*k3*k5-4*A*_alpha1^3*k3*k6-4*A*_alpha1^3*k3*k7-4*A*_alpha1^3*k3*k8-4*A*_alpha1^3*k3*k9-3*A*_alpha1^2*k1*k10*k4-3*A*_alpha1^2*k1*k10*k5-3*A*_alpha1^2*k1*k10*k6-3*A*_alpha1^2*k1*k10*k7-3*A*_alpha1^2*k1*k10*k8-3*A*_alpha1^2*k1*k10*k9-3*A*_alpha1^2*k1*k4*k6-3*A*_alpha1^2*k1*k4*k7-3*A*_alpha1^2*k1*k4*k8-3*A*_alpha1^2*k1*k5*k7-3*A*_alpha1^2*k1*k5*k8-3*A*_alpha1^2*k1*k6*k8-3*A*_alpha1^2*k1*k6*k9-3*A*_alpha1^2*k1*k7*k9-3*A*_alpha1^2*k1*k8*k9-3*A*_alpha1^2*k10*k3*k5-3*A*_alpha1^2*k10*k3*k6-3*A*_alpha1^2*k10*k3*k7-3*A*_alpha1^2*k10*k3*k8-3*A*_alpha1^2*k10*k3*k9-3*A*_alpha1^2*k3*k5*k7-3*A*_alpha1^2*k3*k5*k8-3*A*_alpha1^2*k3*k6*k8-3*A*_alpha1^2*k3*k6*k9-3*A*_alpha1^2*k3*k7*k9-3*A*_alpha1^2*k3*k8*k9-2*A*_alpha1*k1*k10*k4*k6-2*A*_alpha1*k1*k10*k4*k7-2*A*_alpha1*k1*k10*k4*k8-2*A*_alpha1*k1*k10*k5*k7-2*A*_alpha1*k1*k10*k5*k8-2*A*_alpha1*k1*k10*k6*k8-2*A*_alpha1*k1*k10*k6*k9-2*A*_alpha1*k1*k10*k7*k9-2*A*_alpha1*k1*k10*k8*k9-2*A*_alpha1*k1*k4*k6*k8-2*A*_alpha1*k1*k6*k8*k9-2*A*_alpha1*k10*k3*k5*k7-2*A*_alpha1*k10*k3*k5*k8-2*A*_alpha1*k10*k3*k6*k8-2*A*_alpha1*k10*k3*k6*k9-2*A*_alpha1*k10*k3*k7*k9-2*A*_alpha1*k10*k3*k8*k9-2*A*_alpha1*k3*k6*k8*k9-A*k1*k10*k4*k6*k8-A*k1*k10*k6*k8*k9-A*k10*k3*k6*k8*k9+4*K10*_alpha1^3*k9+3*K10*_alpha1^2*k2*k9+3*K10*_alpha1^2*k6*k9+3*K10*_alpha1^2*k7*k9+3*K10*_alpha1^2*k8*k9+2*K10*_alpha1*k2*k6*k9+2*K10*_alpha1*k2*k7*k9+2*K10*_alpha1*k2*k8*k9+2*K10*_alpha1*k6*k8*k9+K10*k2*k6*k8*k9-6*_alpha1^5-5*_alpha1^4*k10-5*_alpha1^4*k2-5*_alpha1^4*k4-5*_alpha1^4*k5-5*_alpha1^4*k6-5*_alpha1^4*k7-5*_alpha1^4*k8-5*_alpha1^4*k9-4*_alpha1^3*k10*k2-4*_alpha1^3*k10*k4-4*_alpha1^3*k10*k5-4*_alpha1^3*k10*k6-4*_alpha1^3*k10*k7-4*_alpha1^3*k10*k8-4*_alpha1^3*k10*k9-4*_alpha1^3*k2*k4-4*_alpha1^3*k2*k5-4*_alpha1^3*k2*k6-4*_alpha1^3*k2*k7-4*_alpha1^3*k2*k8-4*_alpha1^3*k2*k9-4*_alpha1^3*k4*k6-4*_alpha1^3*k4*k7-4*_alpha1^3*k4*k8-4*_alpha1^3*k5*k7-4*_alpha1^3*k5*k8-4*_alpha1^3*k6*k8-4*_alpha1^3*k6*k9-4*_alpha1^3*k7*k9-4*_alpha1^3*k8*k9-3*_alpha1^2*k10*k2*k4-3*_alpha1^2*k10*k2*k5-3*_alpha1^2*k10*k2*k6-3*_alpha1^2*k10*k2*k7-3*_alpha1^2*k10*k2*k8-3*_alpha1^2*k10*k2*k9-3*_alpha1^2*k10*k4*k6-3*_alpha1^2*k10*k4*k7-3*_alpha1^2*k10*k4*k8-3*_alpha1^2*k10*k5*k7-3*_alpha1^2*k10*k5*k8-3*_alpha1^2*k10*k6*k8-3*_alpha1^2*k10*k6*k9-3*_alpha1^2*k10*k7*k9-3*_alpha1^2*k10*k8*k9-3*_alpha1^2*k2*k4*k6-3*_alpha1^2*k2*k4*k7-3*_alpha1^2*k2*k4*k8-3*_alpha1^2*k2*k5*k7-3*_alpha1^2*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k9-2*A^2*_alpha1*k1*k3*k7*k9-2*A^2*_alpha1*k1*k3*k8*k9-A^2*k1*k10*k3*k5*k7-A^2*k1*k10*k3*k5*k8-A^2*k1*k10*k3*k6*k8-A^2*k1*k10*k3*k6*k9-A^2*k1*k10*k3*k7*k9-A^2*k1*k10*k3*k8*k9-A^2*k1*k3*k6*k8*k9+3*A*K10*_alpha1^2*k1*k9+3*A*K10*_alpha1^2*k3*k9+2*A*K10*_alpha1*k1*k6*k9+2*A*K10*_alpha1*k1*k7*k9+2*A*K10*_alpha1*k1*k8*k9+2*A*K10*_alpha1*k3*k6*k9+2*A*K10*_alpha1*k3*k7*k9+2*A*K10*_alpha1*k3*k8*k9+A*K10*k1*k6*k8*k9+A*K10*k3*k6*k8*k9-5*A*_alpha1^4*k1-5*A*_alpha1^4*k3-4*A*_alpha1^3*k1*k10-4*A*_alpha1^3*k1*k4-4*A*_alpha1^3*k1*k5-4*A*_alpha1^3*k1*k6-4*A*_alpha1^3*k1*k7-4*A*_alpha1^3*k1*k8-4*A*_alpha1^3*k1*k9-4*A*_alpha1^3*k10*k3-4*A*_alpha1^3*k3*k5-4*A*_alpha1^3*k3*k6-4*A*_alpha1^3*k3*k7-4*A*_alpha1^3*k3*k8-4*A*_alpha1^3*k3*k9-3*A*_alpha1^2*k1*k10*k4-3*A*_alpha1^2*k1*k10*k5-3*A*_alpha1^2*k1*k10*k6-3*A*_alpha1^2*k1*k10*k7-3*A*_alpha1^2*k1*k10*k8-3*A*_alpha1^2*k1*k10*k9-3*A*_alpha1^2*k1*k4*k6-3*A*_alpha1^2*k1*k4*k7-3*A*_alpha1^2*k1*k4*k8-3*A*_alpha1^2*k1*k5*k7-3*A*_alpha1^2*k1*k5*k8-3*A*_alpha1^2*k1*k6*k8-3*A*_alpha1^2*k1*k6*k9-3*A*_alpha1^2*k1*k7*k9-3*A*_alpha1^2*k1*k8*k9-3*A*_alpha1^2*k10*k3*k5-3*A*_alpha1^2*k10*k3*k6-3*A*_alpha1^2*k10*k3*k7-3*A*_alpha1^2*k10*k3*k8-3*A*_alpha1^2*k10*k3*k9-3*A*_alpha1^2*k3*k5*k7-3*A*_alpha1^2*k3*k5*k8-3*A*_alpha1^2*k3*k6*k8-3*A*_alpha1^2*k3*k6*k9-3*A*_alpha1^2*k3*k7*k9-3*A*_alpha1^2*k3*k8*k9-2*A*_alpha1*k1*k10*k4*k6-2*A*_alpha1*k1*k10*k4*k7-2*A*_alpha1*k1*k10*k4*k8-2*A*_alpha1*k1*k10*k5*k7-2*A*_alpha1*k1*k10*k5*k8-2*A*_alpha1*k1*k10*k6*k8-2*A*_alpha1*k1*k10*k6*k9-2*A*_alpha1*k1*k10*k7*k9-2*A*_alpha1*k1*k10*k8*k9-2*A*_alpha1*k1*k4*k6*k8-2*A*_alpha1*k1*k6*k8*k9-2*A*_alpha1*k10*k3*k5*k7-2*A*_alpha1*k10*k3*k5*k8-2*A*_alpha1*k10*k3*k6*k8-2*A*_alpha1*k10*k3*k6*k9-2*A*_alpha1*k10*k3*k7*k9-2*A*_alpha1*k10*k3*k8*k9-2*A*_alpha1*k3*k6*k8*k9-A*k1*k10*k4*k6*k8-A*k1*k10*k6*k8*k9-A*k10*k3*k6*k8*k9+4*K10*_alpha1^3*k9+3*K10*_alpha1^2*k2*k9+3*K10*_alpha1^2*k6*k9+3*K10*_alpha1^2*k7*k9+3*K10*_alpha1^2*k8*k9+2*K10*_alpha1*k2*k6*k9+2*K10*_alpha1*k2*k7*k9+2*K10*_alpha1*k2*k8*k9+2*K10*_alpha1*k6*k8*k9+K10*k2*k6*k8*k9-6*_alpha1^5-5*_alpha1^4*k10-5*_alpha1^4*k2-5*_alpha1^4*k4-5*_alpha1^4*k5-5*_alpha1^4*k6-5*_alpha1^4*k7-5*_alpha1^4*k8-5*_alpha1^4*k9-4*_alpha1^3*k10*k2-4*_alpha1^3*k10*k4-4*_alpha1^3*k10*k5-4*_alpha1^3*k10*k6-4*_alpha1^3*k10*k7-4*_alpha1^3*k10*k8-4*_alpha1^3*k10*k9-4*_alpha1^3*k2*k4-4*_alpha1^3*k2*k5-4*_alpha1^3*k2*k6-4*_alpha1^3*k2*k7-4*_alpha1^3*k2*k8-4*_alpha1^3*k2*k9-4*_alpha1^3*k4*k6-4*_alpha1^3*k4*k7-4*_alpha1^3*k4*k8-4*_alpha1^3*k5*k7-4*_alpha1^3*k5*k8-4*_alpha1^3*k6*k8-4*_alpha1^3*k6*k9-4*_alpha1^3*k7*k9-4*_alpha1^3*k8*k9-3*_alpha1^2*k10*k2*k4-3*_alpha1^2*k10*k2*k5-3*_alpha1^2*k10*k2*k6-3*_alpha1^2*k10*k2*k7-3*_alpha1^2*k10*k2*k8-3*_alpha1^2*k10*k2*k9-3*_alpha1^2*k10*k4*k6-3*_alpha1^2*k10*k4*k7-3*_alpha1^2*k10*k4*k8-3*_alpha1^2*k10*k5*k7-3*_alpha1^2*k10*k5*k8-3*_alpha1^2*k10*k6*k8-3*_alpha1^2*k10*k6*k9-3*_alpha1^2*k10*k7*k9-3*_alpha1^2*k10*k8*k9-3*_alpha1^2*k2*k4*k6-3*_alpha1^2*k2*k4*k7-3*_alpha1^2*k2*k4*k8-3*_alpha1^2*k2*k5*k7-3*_alpha1^2*k2*k5*k8-3*_alpha1^2*k2*k6*k8-3*_alpha1^2*k2*k6*k9-3*_alpha1^2*k2*k7*k9-3*_alpha1^2*k2*k8*k9-3*_alpha1^2*k4*k6*k8-3*_alpha1^2*k6*k8*k9-2*_alpha1*k10*k2*k4*k6-2*_alpha1*k10*k2*k4*k7-2*_alpha1*k10*k2*k4*k8-2*_alpha1*k10*k2*k5*k7-2*_alpha1*k10*k2*k5*k8-2*_alpha1*k10*k2*k6*k8-2*_alpha1*k10*k2*k6*k9-2*_alpha1*k10*k2*k7*k9-2*_alpha1*k10*k2*k8*k9-2*_alpha1*k10*k4*k6*k8-2*_alpha1*k10*k6*k8*k9-2*_alpha1*k2*k4*k6*k8-2*_alpha1*k2*k6*k8*k9-k10*k2*k4*k6*k8-k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*k2*k6*k8*k9)*_Z-A^2*K10*k1*k3*k6*k8*k9+A^2*k1*k10*k3*k6*k8*k9)))}

(3)

 

sys2:={diff(Ca2(t),t)= -(U0*ICa)/(z0*F0*Cvol*xi) - Ks*Ca2(t), Ca2(0)=0};

{Ca2(0) = 0, diff(Ca2(t), t) = -U0*ICa/(z0*F0*Cvol*xi)-Ks*Ca2(t)}

(4)

sys1:={mparticle= m0 + (minf-m0)*(1-exp(-t/taum)),
taum= 1/(alpham+betam),
minf=betam/(alpham+betam),
alpham=alpha0*exp(-(Vm+V0)/VA) + KA,
betam=beta0*exp((Vm+V0)/VB) + KB};

 

{alpham = alpha0*exp(-(Vm+V0)/VA)+KA, betam = beta0*exp((Vm+V0)/VB)+KB, minf = betam/(alpham+betam), taum = 1/(alpham+betam), mparticle = m0+(minf-m0)*(1-exp(-t/taum))}

(5)

sys1:=subs(taum= 1/(alpham+betam),
minf = betam/(alpham+betam),
alpham = alpha0*exp(-(Vm+V0)/VA) + KA,
betam = beta0*exp((Vm+V0)/VB) + KB,
mparticle = m0 + (minf-m0)*(1-exp(-t/taum)),
ICa = gbarCa*(mparticle^3)*(Vm-ECa));  

ICa = gbarCa*(m0+(minf-m0)*(1-exp(-t/taum)))^3*(Vm-ECa)

(6)

sys1:=subs(mparticle = m0 + (minf-m0)*(1-exp(-t/taum)),
taum= 1/(alpham+betam),
minf = betam/(alpham+betam),
alpham = alpha0*exp(-(Vm(t) + V0)/VA) + KA,
betam = beta0*exp((Vm(t) + V0)/VB) + KB,
gCa = gbarCa*(mparticle^3)); #USE THIS EXPRESSION

gCa = gbarCa*(m0+((beta0*exp((Vm(t)+V0)/VB)+KB)/(alpha0*exp(-(Vm(t)+V0)/VA)+KA+beta0*exp((Vm(t)+V0)/VB)+KB)-m0)*(1-exp(-t*(alpha0*exp(-(Vm(t)+V0)/VA)+KA+beta0*exp((Vm(t)+V0)/VB)+KB))))^3

(7)

sys3:=subs(alphaC=alaphaC0*exp(-Vm(t)/Va),
k1=k10*exp((-zK*delta1*F0*Vm(t))/(2*R*T)),
k_1=k_10*exp((zK*delta1*F0*Vm(t))/(2*R*T)),
k2=k20*exp((-zK*delta2*F0*Vm(t))/(2*R*T)),
k_2=k_20*exp((zK*delta2*F0*Vm(t))/(2*R*T)),
k3=k30*exp((-zK*delta3*F0*Vm(t))/(2*R*T)),
k_3=k_30*exp((zK*delta3*F0*Vm(t))/(2*R*T)),
{diff(C0(t),t) = k_1*C1(t) - k1*Ca2(t)*C0(t),
diff(C1(t),t) = k1*Ca2(t)*C0(t) + k_2*C2(t) - (k_1+k2*Ca2(t))*C1(t),
diff(C2(t),t)=k2*Ca2(t)*C1(t) + alphaC*O2(t) - (k_2+betaC)*C2(t),
diff(O2(t),t)=betaC*C2(t) + k_3*O3(t) - (alphaC+k3*Ca2(t))*O2(t),
diff(O3(t),t)= k3*Ca2(t)*O2(t)- k_3*O3(t),
C0(0)=0, C1(0)=0, C2(0)=0, O2(0)=0, O3(0)=0 });  ###INTIIAL VALUES still needed####

{C0(0) = 0, C1(0) = 0, C2(0) = 0, O2(0) = 0, O3(0) = 0, diff(C0(t), t) = k_10*exp((1/2)*zK*delta1*F0*Vm(t)/(R*T))*C1(t)-k10*exp(-(1/2)*zK*delta1*F0*Vm(t)/(R*T))*Ca2(t)*C0(t), diff(C1(t), t) = k10*exp(-(1/2)*zK*delta1*F0*Vm(t)/(R*T))*Ca2(t)*C0(t)+k_20*exp((1/2)*zK*delta2*F0*Vm(t)/(R*T))*C2(t)-(k_10*exp((1/2)*zK*delta1*F0*Vm(t)/(R*T))+k20*exp(-(1/2)*zK*delta2*F0*Vm(t)/(R*T))*Ca2(t))*C1(t), diff(C2(t), t) = k20*exp(-(1/2)*zK*delta2*F0*Vm(t)/(R*T))*Ca2(t)*C1(t)+alaphaC0*exp(-Vm(t)/Va)*O2(t)-(k_20*exp((1/2)*zK*delta2*F0*Vm(t)/(R*T))+betaC)*C2(t), diff(O2(t), t) = betaC*C2(t)+k_30*exp((1/2)*zK*delta3*F0*Vm(t)/(R*T))*O3(t)-(alaphaC0*exp(-Vm(t)/Va)+k30*exp(-(1/2)*zK*delta3*F0*Vm(t)/(R*T))*Ca2(t))*O2(t), diff(O3(t), t) = k30*exp(-(1/2)*zK*delta3*F0*Vm(t)/(R*T))*Ca2(t)*O2(t)-k_30*exp((1/2)*zK*delta3*F0*Vm(t)/(R*T))*O3(t)}

(8)

Digits:=20;
SolSet:=dsolve(subs(ICa=gCa*(Vm(t)-ECa),
gCa=gbarCa*(mparticle^3),
mparticle = m0 + (minf-m0)*(1-exp(-t/taum)),
taum= 1/(alpham+betam),
minf = betam/(alpham+betam),
alpham = alpha0*exp(-(Vm(t) + V0)/VA) + KA,
betam = beta0*exp((Vm(t) + V0)/VB) + KB,
gKCa=gbarKCa*(O2(t)+O3(t)), gL=gbarL,
alphaC=alphaC0*exp(-Vm(t)/Va),
k1=k10*exp((-zK*delta1*F0*Vm(t)*0.001)/(2*R*T)),
k_1=k_10*exp((zK*delta1*F0*Vm(t)*0.001)/(2*R*T)),
k2=k20*exp((-zK*delta2*F0*Vm(t)*0.001)/(2*R*T)),
k_2=k_20*exp((zK*delta2*F0*Vm(t)*0.001)/(2*R*T)),
k3=k30*exp((-zK*delta3*F0*Vm(t)*0.001)/(2*R*T)),
k_3=k_30*exp((zK*delta3*F0*Vm(t)*0.001)/(2*R*T)),
gbarCa=0.07, ECa=100, alpha0=22.8, V0=70, VA=8.01, KA=0.51, beta0=0.97e-3,
VB=6.17, KB=0.94, U0=0.02, xi=3.4e-5, Cvol=1.25, Ks=2.8,
gbarKCa=16.8, EK=-130, k10=0.05, delta1=0.2, k_10=0.3, k20=3.111111, delta2=0, k_20=5,
k30=0.075, delta3=0.2, k_30=1.5, alphaC0=0.45, Va=33, betaC=10, m0=0, gbarL=.02, EL=0,
Icom=150, Cm=15,
zCa=2, zK=1, F0=9.6485e4, T=298, R=8.3145,
{diff(C0(t),t)=k_1*C1(t) - k1*Ca2(t)*C0(t),
diff(C1(t),t)=k1*Ca2(t)*C0(t) + k_2*C2(t) - (k_1+k2*Ca2(t))*C1(t),
diff(C2(t),t)=k2*Ca2(t)*C1(t) + alphaC*O2(t) - (k_2+betaC)*C2(t),
diff(O2(t),t)=betaC*C2(t) + k_3*O3(t) - (alphaC+k3*Ca2(t))*O2(t),
diff(O3(t),t)= k3*Ca2(t)*O2(t)- k_3*O3(t),
diff(Ca2(t),t)= -(1e-3*U0*ICa)/(zCa*F0*1e-6*Cvol*xi) - Ks*Ca2(t),
diff(Vm(t),t)= -(gCa*(Vm(t)-ECa)+gKCa*(Vm(t)-EK)+gL*(Vm(t)-EL)-Icom)/Cm,
O2(0) = .9760892444e-3, O3(0) = .3799907525e-5, Vm(0) = -57.69502831, C0(0) = .9859731480, C1(0) = .1279461827e-1, C2(0) = .2523445519e-3, Ca2(0) = .3169721441e-1}), numeric, maxfun=500000,
{Ca2(t), C0(t), C1(t), C2(t), O2(t), O3(t), Vm(t)});
#initial values for gbarL=1:  {O3 = .6320230115e-4, O2 = .5743435912e-2, C0 = .9572966101, C1 = .3511449103e-1, Ca2 = .8157166887e-1, Vm = -63.72028656, C2 = .1782260687e-2};

 

20

 

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 := 20; 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 ] ) _xout := _xin; _pars := []; _dtbl := array( 1 .. 4, [( 1 ) = (array( 1 .. 26, [( 1 ) = (datatype = sfloat, order = C_order, storage = rectangular), ( 2 ) = (datatype = sfloat, order = C_order, storage = rectangular), ( 3 ) = ([0, 0, 0, Array(1..0, 1..2, {}, order = C_order)]), ( 4 ) = (Array(1..63, {(1) = 7, (2) = 7, (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) = 500000, (20) = 0, (21) = 1, (22) = 1, (23) = 4, (24) = 0, (25) = 2, (26) = 20, (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) = 0., (2) = 0.1e-5, (3) = 0., (4) = 0.500001e-19, (5) = 0., (6) = 0.74900970886358212652e-1, (7) = 0., (8) = 0.1e-5, (9) = 0., (10) = 0., (11) = 0., (12) = 0., (13) = 1., (14) = 0., (15) = .49999999999999, (16) = 0., (17) = 1., (18) = 1., (19) = 0., (20) = 0., (21) = 1., (22) = 1., (23) = 0., (24) = 0., (25) = 0.1e-14, (26) = 0., (27) = 0., (28) = 0.}, order = C_order)), ( 6 ) = (Array(1..7, {(1) = .9859731480, (2) = 0.1279461827e-1, (3) = 0.2523445519e-3, (4) = 0.3169721441e-1, (5) = 0.9760892444e-3, (6) = 0.3799907525e-5, (7) = -57.69502831}, order = C_order)), ( 7 ) = ([Array(1..4, 1..7, {(1, 1) = 0., (1, 2) = 26., (1, 3) = 39., (1, 4) = 96., (1, 5) = 104., (1, 6) = 52., (1, 7) = 104., (2, 1) = 33440., (2, 2) = 0., (2, 3) = 146432., (2, 4) = 142805., (2, 5) = -50787., (2, 6) = 10260., (2, 7) = 282150., (3, 1) = 1045., (3, 2) = 0., (3, 3) = -11264., (3, 4) = -10985., (3, 5) = 7524., (3, 6) = 13680., (3, 7) = 376200., (4, 1) = 1629155., (4, 2) = 0., (4, 3) = 6769664., (4, 4) = 340535., (4, 5) = -101574., (4, 6) = -800280., (4, 7) = 13062500.}, 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., (2, 1) = 1., (2, 2) = 0., (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (2, 6) = 4., (3, 1) = 3., (3, 2) = 9., (3, 3) = 0., (3, 4) = 0., (3, 5) = 0., (3, 6) = 32., (4, 1) = 1932., (4, 2) = -7200., (4, 3) = 7296., (4, 4) = 0., (4, 5) = 0., (4, 6) = 2197., (5, 1) = 8341., (5, 2) = -32832., (5, 3) = 29440., (5, 4) = -845., (5, 5) = 0., (5, 6) = 4104., (6, 1) = -6080., (6, 2) = 41040., (6, 3) = -28352., (6, 4) = 9295., (6, 5) = -5643., (6, 6) = 20520.}, order = C_order), Array(1..6, {(1) = 0., (2) = .386, (3) = .210, (4) = .630, (5) = 1., (6) = 1.}, order = C_order), Array(1..6, {(1) = .25, (2) = -.1043, (3) = .1035, (4) = -0.362e-1, (5) = 0., (6) = 0.}, 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.5440000000000000000, (2, 2) = 0., (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (3, 1) = .94667852808155328615, (3, 2) = .25570116989825811637, (3, 3) = 0., (3, 4) = 0., (3, 5) = 0., (4, 1) = 3.3148251870684885588, (4, 2) = 2.8961240159721231525, (4, 3) = .99864191399778072571, (4, 4) = 0., (4, 5) = 0., (5, 1) = 1.2212245092262748236, (5, 2) = 6.0191344812877529055, (5, 3) = 12.537083329320874572, (5, 4) = -.68788603610589513565, (5, 5) = 0., (6, 1) = 1.2212245092262748236, (6, 2) = 6.0191344812877529055, (6, 3) = 12.537083329320874572, (6, 4) = -.68788603610589513565, (6, 5) = 1.}, 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.6688000000000000000, (2, 2) = 0., (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (3, 1) = -2.4300933568337581851, (3, 2) = -.20635991570891223664, (3, 3) = 0., (3, 4) = 0., (3, 5) = 0., (4, 1) = -.10735290581452621845, (4, 2) = -9.5945622510218943195, (4, 3) = -20.470286148096154811, (4, 4) = 0., (4, 5) = 0., (5, 1) = 7.4964433139686150258, (5, 2) = -10.246804314641218318, (5, 3) = -33.999903528199063499, (5, 4) = 11.708908932061595438, (5, 5) = 0., (6, 1) = 8.0832467959224109291, (6, 2) = -7.9811329880627854783, (6, 3) = -31.521594328743729054, (6, 4) = 16.319305431231361893, (6, 5) = -6.0588182388340537633}, 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.126235083446912057, (2, 2) = -7.4879958776076331333, (2, 3) = -34.800918615557411398, (2, 4) = -7.9927717075687273372, (2, 5) = 1.0251377232956206444, (3, 1) = -.67628033928068977703, (3, 2) = 6.0877146516786064462, (3, 3) = 16.430843208924630647, (3, 4) = 24.767225114183651253, (3, 5) = -6.5943891257167816112}, order = C_order)]), ( 9 ) = ([Array(1..7, {(1) = .10000000000000000000, (2) = .10000000000000000000, (3) = .10000000000000000000, (4) = .10000000000000000000, (5) = .10000000000000000000, (6) = .10000000000000000000, (7) = .10000000000000000000}, order = C_order), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..7, 1..7, {(1, 1) = 0., (1, 2) = 0., (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (1, 6) = 0., (1, 7) = 0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (2, 6) = 0., (2, 7) = 0., (3, 1) = 0., (3, 2) = 0., (3, 3) = 0., (3, 4) = 0., (3, 5) = 0., (3, 6) = 0., (3, 7) = 0., (4, 1) = 0., (4, 2) = 0., (4, 3) = 0., (4, 4) = 0., (4, 5) = 0., (4, 6) = 0., (4, 7) = 0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = 0., (5, 5) = 0., (5, 6) = 0., (5, 7) = 0., (6, 1) = 0., (6, 2) = 0., (6, 3) = 0., (6, 4) = 0., (6, 5) = 0., (6, 6) = 0., (6, 7) = 0., (7, 1) = 0., (7, 2) = 0., (7, 3) = 0., (7, 4) = 0., (7, 5) = 0., (7, 6) = 0., (7, 7) = 0.}, order = C_order), Array(1..7, 1..7, {(1, 1) = 0., (1, 2) = 0., (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (1, 6) = 0., (1, 7) = 0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (2, 6) = 0., (2, 7) = 0., (3, 1) = 0., (3, 2) = 0., (3, 3) = 0., (3, 4) = 0., (3, 5) = 0., (3, 6) = 0., (3, 7) = 0., (4, 1) = 0., (4, 2) = 0., (4, 3) = 0., (4, 4) = 0., (4, 5) = 0., (4, 6) = 0., (4, 7) = 0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = 0., (5, 5) = 0., (5, 6) = 0., (5, 7) = 0., (6, 1) = 0., (6, 2) = 0., (6, 3) = 0., (6, 4) = 0., (6, 5) = 0., (6, 6) = 0., (6, 7) = 0., (7, 1) = 0., (7, 2) = 0., (7, 3) = 0., (7, 4) = 0., (7, 5) = 0., (7, 6) = 0., (7, 7) = 0.}, order = C_order), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..7, 1..7, {(1, 1) = 0., (1, 2) = 0., (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (1, 6) = 0., (1, 7) = 0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (2, 6) = 0., (2, 7) = 0., (3, 1) = 0., (3, 2) = 0., (3, 3) = 0., (3, 4) = 0., (3, 5) = 0., (3, 6) = 0., (3, 7) = 0., (4, 1) = 0., (4, 2) = 0., (4, 3) = 0., (4, 4) = 0., (4, 5) = 0., (4, 6) = 0., (4, 7) = 0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = 0., (5, 5) = 0., (5, 6) = 0., (5, 7) = 0., (6, 1) = 0., (6, 2) = 0., (6, 3) = 0., (6, 4) = 0., (6, 5) = 0., (6, 6) = 0., (6, 7) = 0., (7, 1) = 0., (7, 2) = 0., (7, 3) = 0., (7, 4) = 0., (7, 5) = 0., (7, 6) = 0., (7, 7) = 0.}, order = C_order), Array(1..7, 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., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = 0., (5, 5) = 0., (5, 6) = 0., (6, 1) = 0., (6, 2) = 0., (6, 3) = 0., (6, 4) = 0., (6, 5) = 0., (6, 6) = 0., (7, 1) = 0., (7, 2) = 0., (7, 3) = 0., (7, 4) = 0., (7, 5) = 0., (7, 6) = 0.}, order = C_order), Array(1..7, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0, (6) = 0, (7) = 0}, datatype = integer[8]), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..14, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0., (8) = 0., (9) = 0., (10) = 0., (11) = 0., (12) = 0., (13) = 0., (14) = 0.}, order = C_order), Array(1..7, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0, (6) = 0, (7) = 0}, datatype = integer[8])]), ( 8 ) = ([Array(1..7, {(1) = .9859731480, (2) = 0.1279461827e-1, (3) = 0.2523445519e-3, (4) = 0.3169721441e-1, (5) = 0.9760892444e-3, (6) = 0.3799907525e-5, (7) = -57.69502831}, order = C_order), Array(1..7, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0., (7) = 0.}, order = C_order), Array(1..7, {(1) = 0.11097513378053235304e-2, (2) = -0.11097513377718183061e-2, (3) = 0.1517334354e-12, (4) = -0.88752200348e-1, (5) = 0.16479397422143242e-5, (6) = -0.16479399274529838016e-5, (7) = 9.9975737441373450712}, order = C_order), 0, 0]), ( 11 ) = (Array(1..6, 0..7, {(1, 1) = 0., (1, 2) = 0., (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (1, 6) = 0., (1, 7) = 0., (2, 0) = 0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (2, 6) = 0., (2, 7) = 0., (3, 0) = 0., (3, 1) = 0., (3, 2) = 0., (3, 3) = 0., (3, 4) = 0., (3, 5) = 0., (3, 6) = 0., (3, 7) = 0., (4, 0) = 0., (4, 1) = 0., (4, 2) = 0., (4, 3) = 0., (4, 4) = 0., (4, 5) = 0., (4, 6) = 0., (4, 7) = 0., (5, 0) = 0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = 0., (5, 5) = 0., (5, 6) = 0., (5, 7) = 0., (6, 0) = 0., (6, 1) = 0., (6, 2) = 0., (6, 3) = 0., (6, 4) = 0., (6, 5) = 0., (6, 6) = 0., (6, 7) = 0.}, order = C_order)), ( 10 ) = ([proc (N, X, Y, YP) option `[Y[1] = C0(t), Y[2] = C1(t), Y[3] = C2(t), Y[4] = Ca2(t), Y[5] = O2(t), Y[6] = O3(t), Y[7] = Vm(t)]`; YP[1] := .3*exp(0.38941026854920307816e-2*Y[7])*Y[2]-0.5e-1*exp(-0.38941026854920307816e-2*Y[7])*Y[4]*Y[1]; YP[2] := 0.5e-1*exp(-0.38941026854920307816e-2*Y[7])*Y[4]*Y[1]+5.*Y[3]-(.3*exp(0.38941026854920307816e-2*Y[7])+3.111111*Y[4])*Y[2]; YP[3] := 3.111111*Y[4]*Y[2]+.45*exp(-(1/33)*Y[7])*Y[5]-15.*Y[3]; YP[4] := -.17070620547540154063*(0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217)+.94)^3*(1-exp(-X*(22.8*exp(-.12484394506866416979*Y[7]-8.7390761548064918853)+1.45+0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217))))^3*(Y[7]-100)/(22.8*exp(-.12484394506866416979*Y[7]-8.7390761548064918853)+1.45+0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217))^3-2.8*Y[4]; YP[5] := 10*Y[3]+1.5*exp(0.38941026854920307816e-2*Y[7])*Y[6]-(.45*exp(-(1/33)*Y[7])+0.75e-1*exp(-0.38941026854920307816e-2*Y[7])*Y[4])*Y[5]; YP[6] := 0.75e-1*exp(-0.38941026854920307816e-2*Y[7])*Y[4]*Y[5]-1.5*exp(0.38941026854920307816e-2*Y[7])*Y[6]; YP[7] := -0.46666666666666666667e-2*(0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217)+.94)^3*(1-exp(-X*(22.8*exp(-.12484394506866416979*Y[7]-8.7390761548064918853)+1.45+0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217))))^3*(Y[7]-100)/(22.8*exp(-.12484394506866416979*Y[7]-8.7390761548064918853)+1.45+0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217))^3-1.1200000000000000000*(Y[5]+Y[6])*(Y[7]+130)-0.13333333333333333333e-2*Y[7]+10; 0 end proc, -1, 0, 0, 0, 0, 0, 0, 0, 0]), ( 13 ) = (), ( 12 ) = (), ( 15 ) = ("rkf45"), ( 14 ) = ([0, 0]), ( 18 ) = ([]), ( 19 ) = (0), ( 16 ) = ([0, 0, 0, 0, 0, []]), ( 17 ) = ([proc (N, X, Y, YP) option `[Y[1] = C0(t), Y[2] = C1(t), Y[3] = C2(t), Y[4] = Ca2(t), Y[5] = O2(t), Y[6] = O3(t), Y[7] = Vm(t)]`; YP[1] := .3*exp(0.38941026854920307816e-2*Y[7])*Y[2]-0.5e-1*exp(-0.38941026854920307816e-2*Y[7])*Y[4]*Y[1]; YP[2] := 0.5e-1*exp(-0.38941026854920307816e-2*Y[7])*Y[4]*Y[1]+5.*Y[3]-(.3*exp(0.38941026854920307816e-2*Y[7])+3.111111*Y[4])*Y[2]; YP[3] := 3.111111*Y[4]*Y[2]+.45*exp(-(1/33)*Y[7])*Y[5]-15.*Y[3]; YP[4] := -.17070620547540154063*(0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217)+.94)^3*(1-exp(-X*(22.8*exp(-.12484394506866416979*Y[7]-8.7390761548064918853)+1.45+0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217))))^3*(Y[7]-100)/(22.8*exp(-.12484394506866416979*Y[7]-8.7390761548064918853)+1.45+0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217))^3-2.8*Y[4]; YP[5] := 10*Y[3]+1.5*exp(0.38941026854920307816e-2*Y[7])*Y[6]-(.45*exp(-(1/33)*Y[7])+0.75e-1*exp(-0.38941026854920307816e-2*Y[7])*Y[4])*Y[5]; YP[6] := 0.75e-1*exp(-0.38941026854920307816e-2*Y[7])*Y[4]*Y[5]-1.5*exp(0.38941026854920307816e-2*Y[7])*Y[6]; YP[7] := -0.46666666666666666667e-2*(0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217)+.94)^3*(1-exp(-X*(22.8*exp(-.12484394506866416979*Y[7]-8.7390761548064918853)+1.45+0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217))))^3*(Y[7]-100)/(22.8*exp(-.12484394506866416979*Y[7]-8.7390761548064918853)+1.45+0.97e-3*exp(.16207455429497568882*Y[7]+11.345218800648298217))^3-1.1200000000000000000*(Y[5]+Y[6])*(Y[7]+130)-0.13333333333333333333e-2*Y[7]+10; 0 end proc, -1, 0, 0, 0, 0, 0, 0, 0, 0]), ( 22 ) = (0), ( 23 ) = (0), ( 20 ) = ([]), ( 21 ) = (0), ( 26 ) = (Array(1..0, {})), ( 25 ) = (Array(1..0, {})), ( 24 ) = (0)  ] ))  ] ); _y0 := Array(0..7, {(1) = 0., (2) = .9859731480, (3) = 0.1279461827e-1, (4) = 0.2523445519e-3, (5) = 0.3169721441e-1, (6) = 0.9760892444e-3, (7) = 0.3799907525e-5}); _vmap := array( 1 .. 7, [( 1 ) = (1), ( 2 ) = (2), ( 3 ) = (3), ( 4 ) = (4), ( 5 ) = (5), ( 6 ) = (6), ( 7 ) = (7)  ] ); _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); _i := false; if _par <> [] then _i := `dsolve/numeric/process_parameters`(_n, _pars, _par, _y0) end if; if _ini <> [] then _i := `dsolve/numeric/process_initial`(_n-_ne, _ini, _y0, _pars, _vmap) or _i end if; if _i then `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 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 ?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 = _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 ?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 = _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]; 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, _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, C0(t), C1(t), C2(t), Ca2(t), O2(t), O3(t), Vm(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

(9)

SolSet(100);

[t = 100., C0(t) = .79466599198831959803, C1(t) = 0.77437787581425957363e-1, C2(t) = 0.19565405457941836067e-1, Ca2(t) = .40606061700848331065, O2(t) = .10525381618056176339, O3(t) = 0.30769987655758450159e-2, Vm(t) = -46.809910323728431153]

(10)

with(plots);

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(11)

odeplot(SolSet,[t,Vm(t)], 0..20, numpoints=300, view=[0..20,-30..-70]);#gbarL=0.01597

 

odeplot(SolSet,[t,Vm(t)], 0..10, numpoints=300,view=[0..10,-47..-58]);#gbarL=5

 

 


 

Download workingNow.mw

As far as I am aware, Maple does no have the commands

MinimizeTensorComponents(), or

NumberOfIndependentTensorComponents()

so exaclty where are you getting these vommands from?

Can only suggest that you use the big green up-arrow in the Mapleprimes toolbar to upload a worksheet illustrating your problem

@acer 

This example illustrates something which I have noticed in the past, Using the 'plots' package just as an example

with(plots) and exports(plots) return two slightl different lists . Generally there are a few more symbols in the latter, than the former.

In the OP's case 'display3d' does not occur in the sequence of symbols returned by with(), but does occur in the sequence returned by exports(). So what  controls the differencs between these two sequneces?

I note with interest that the command

with(plots, implicitplot, display3d):

returns the error

Error, (in with) package plots does not export display3d

Although as the OP has observed, the command with(plots) makes the display3d() command "available".

Thus I find the behaviour of the attached a little puzzling - it throws an error message about 'display3d' - and then uses it anyway!

restart;
with(plots, implicitplot3d):
with(plots, display):
with(plots, display3d):

Error, (in with) package plots does not export display3d

 

p1:=implicitplot3d(x^2+y^2-1=0,x=-2..2,y=-2..2,z=-2..2):
p2:=implicitplot3d(y^2+z^2-1=0,x=-2..2,y=-2..2,z=-2..2):
display({p1,p2});
display3d({p1,p2});

 

 

 

Download withexp.mw

@Suley83 

If you can't work out how to change input mode between inert text and executable math - then just consider using the '#' character. On any line, everything after the '#' character is considered a comment (ie non-executable).

See the attached

restart; odeSys := diff(S(t), t) = z*(1-P[1]-P[2])+w*C(t)-x*Q[1]*C(t)*S(t)/N-x*Q[2]*Iota(t)*S(t)/N-v*S(t), diff(C(t), t) = z*P[1]+x*Q[1]*C(t)*S(t)/N+x*Q[2]*Iota(t)*S(t)/N-w*C(t)-k*o*C(t)-v*C(t), diff(Iota(t), t) = k*o*C(t)-Iota(t)*v+z*P[2]

diff(S(t), t) = z*(1-P[1]-P[2])+w*C(t)-x*Q[1]*C(t)*S(t)/N-x*Q[2]*Iota(t)*S(t)/N-v*S(t), diff(C(t), t) = z*P[1]+x*Q[1]*C(t)*S(t)/N+x*Q[2]*Iota(t)*S(t)/N-w*C(t)-k*o*C(t)-v*C(t), diff(Iota(t), t) = k*o*C(t)-Iota(t)*v+z*P[2]

(1)

collect(add(odeSys[j], j = 1 .. 3), [z, v])

diff(S(t), t)+diff(C(t), t)+diff(Iota(t), t) = z+(-S(t)-C(t)-Iota(t))*v

(2)

odeTotal := eval(%, Iota(t) = Total(t)-S(t)-C(t))

diff(Total(t), t) = z-Total(t)*v

(3)

dsolve({odeTotal, Total(0) = N0})

Total(t) = z/v+exp(-v*t)*(N0-z/v)

(4)

RHS := evalindets(`~`[rhs]([odeSys]), function, proc (f) options operator, arrow; op(0, f) end proc); E := solve(RHS, {C, Iota, S}); indets(E, RootOf); pol := op([1, 1], %); parnames := `minus`(indets(RHS, name), {C, Iota, S}); parnamesList := convert(parnames, list); ics := S(0) = S0, C(0) = C0, Iota(0) = I0; params := [S0, C0, I0, parnamesList[]]; res := dsolve({ics, odeSys}, numeric, parameters = params); Example1 := [S0 = 100, C0 = 0, I0 = 0, k = .1, o = 1, v = 0.1e-1, w = .5, x = 1, z = 2, P[1] = .2, P[2] = .3, Q[1] = 1, Q[2] = 2, N = 100]; res(parameters = Example1); plots:-odeplot(res, [[t, S(t)], [t, C(t)], [t, Iota(t)]], t = 0 .. 500, size = [1200, default], legend = [S, C, Iota]); eval(E, Example1); allvalues(%); res(500)

[z*(1-P[1]-P[2])+w*C-x*Q[1]*C*S/N-x*Q[2]*Iota*S/N-v*S, z*P[1]+x*Q[1]*C*S/N+x*Q[2]*Iota*S/N-w*C-k*o*C-v*C, C*k*o-Iota*v+z*P[2]]

 

{C = RootOf((k^2*o^2*x*Q[2]+k*o*v*x*Q[1]+k*o*v*x*Q[2]+v^2*x*Q[1])*_Z^2+(2*k*o*x*z*P[2]*Q[2]+N*k*o*v^2-k*o*x*z*Q[2]+v*x*z*P[2]*Q[1]+v*x*z*P[2]*Q[2]+N*v^3+N*v^2*w-v*x*z*Q[1])*_Z+x*z^2*P[2]^2*Q[2]-N*v^2*z*P[1]-x*z^2*P[2]*Q[2]), Iota = (RootOf((k^2*o^2*x*Q[2]+k*o*v*x*Q[1]+k*o*v*x*Q[2]+v^2*x*Q[1])*_Z^2+(2*k*o*x*z*P[2]*Q[2]+N*k*o*v^2-k*o*x*z*Q[2]+v*x*z*P[2]*Q[1]+v*x*z*P[2]*Q[2]+N*v^3+N*v^2*w-v*x*z*Q[1])*_Z+x*z^2*P[2]^2*Q[2]-N*v^2*z*P[1]-x*z^2*P[2]*Q[2])*k*o+z*P[2])/v, S = N*v*(RootOf((k^2*o^2*x*Q[2]+k*o*v*x*Q[1]+k*o*v*x*Q[2]+v^2*x*Q[1])*_Z^2+(2*k*o*x*z*P[2]*Q[2]+N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2*P[2]^2*Q[2]-N*v^2*z*P[1]-x*z^2*P[2]*Q[2])*v*Q[1]+z*P[2]*Q[2]))}

 

{RootOf((k^2*o^2*x*Q[2]+k*o*v*x*Q[1]+k*o*v*x*Q[2]+v^2*x*Q[1])*_Z^2+(2*k*o*x*z*P[2]*Q[2]+N*k*o*v^2-k*o*x*z*Q[2]+v*x*z*P[2]*Q[1]+v*x*z*P[2]*Q[2]+N*v^3+N*v^2*w-v*x*z*Q[1])*_Z+x*z^2*P[2]^2*Q[2]-N*v^2*z*P[1]-x*z^2*P[2]*Q[2])}

 

(k^2*o^2*x*Q[2]+k*o*v*x*Q[1]+k*o*v*x*Q[2]+v^2*x*Q[1])*_Z^2+(2*k*o*x*z*P[2]*Q[2]+N*k*o*v^2-k*o*x*z*Q[2]+v*x*z*P[2]*Q[1]+v*x*z*P[2]*Q[2]+N*v^3+N*v^2*w-v*x*z*Q[1])*_Z+x*z^2*P[2]^2*Q[2]-N*v^2*z*P[1]-x*z^2*P[2]*Q[2]

 

{N, k, o, v, w, x, z, P[1], P[2], Q[1], Q[2]}

 

[N, k, o, v, w, x, z, P[1], P[2], Q[1], Q[2]]

 

S(0) = S0, C(0) = C0, Iota(0) = I0

 

[S0, C0, I0, N, k, o, v, w, x, z, P[1], P[2], Q[1], Q[2]]

 

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 ] ) _xout := _xin; _pars := [S0 = S0, C0 = C0, I0 = I0, N = N, k = k, o = o, v = v, w = w, x = x, z = z, P[1] = `P[1]`, P[2] = `P[2]`, Q[1] = `Q[1]`, Q[2] = `Q[2]`]; _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 ) = ([0, 0, 0, Array(1..0, 1..2, {}, datatype = float[8], order = C_order)]), ( 4 ) = (Array(1..63, {(1) = 3, (2) = 3, (3) = 0, (4) = 0, (5) = 14, (6) = 0, (7) = 0, (8) = 0, (9) = 0, (10) = 0, (11) = 0, (12) = 0, (13) = 0, (14) = 0, (15) = 0, (16) = 0, (17) = 0, (18) = 0, (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) = .0, (2) = 0.10e-5, (3) = .0, (4) = 0.500001e-14, (5) = .0, (6) = .0, (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..17, {(1) = C0, (2) = I0, (3) = S0, (4) = Float(undefined), (5) = Float(undefined), (6) = Float(undefined), (7) = Float(undefined), (8) = Float(undefined), (9) = Float(undefined), (10) = Float(undefined), (11) = Float(undefined), (12) = Float(undefined), (13) = Float(undefined), (14) = Float(undefined), (15) = Float(undefined), (16) = Float(undefined), (17) = Float(undefined)})), ( 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..3, {(1) = .1, (2) = .1, (3) = .1}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, 1..3, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0}, datatype = float[8], order = C_order), Array(1..3, 1..3, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..3, 1..3, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0}, datatype = float[8], order = C_order), Array(1..3, 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}, datatype = float[8], order = C_order), Array(1..3, {(1) = 0, (2) = 0, (3) = 0}, datatype = integer[8]), Array(1..17, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0}, datatype = float[8], order = C_order), Array(1..17, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0}, datatype = float[8], order = C_order), Array(1..17, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0}, datatype = float[8], order = C_order), Array(1..17, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = 0, (2) = 0, (3) = 0}, datatype = integer[8])]), ( 8 ) = ([Array(1..17, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0}, datatype = float[8], order = C_order), Array(1..17, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = .0, (14) = .0, (15) = .0, (16) = .0, (17) = .0}, datatype = float[8], order = C_order), Array(1..3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8], order = C_order), 0, 0]), ( 11 ) = (Array(1..6, 0..3, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (2, 0) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (3, 0) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (4, 0) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (5, 0) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (6, 0) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0}, datatype = float[8], order = C_order)), ( 10 ) = ([proc (N, X, Y, YP) option `[Y[1] = C(t), Y[2] = Iota(t), Y[3] = S(t)]`; YP[1] := Y[13]*Y[14]+Y[12]*Y[16]*Y[1]*Y[3]/Y[7]+Y[12]*Y[17]*Y[2]*Y[3]/Y[7]-Y[11]*Y[1]-Y[8]*Y[9]*Y[1]-Y[10]*Y[1]; YP[2] := Y[1]*Y[8]*Y[9]-Y[2]*Y[10]+Y[13]*Y[15]; YP[3] := Y[13]*(1-Y[14]-Y[15])+Y[11]*Y[1]-Y[12]*Y[16]*Y[1]*Y[3]/Y[7]-Y[12]*Y[17]*Y[2]*Y[3]/Y[7]-Y[10]*Y[3]; 0 end proc, -1, 0, 0, 0, 0, 0, 0, 0, 0]), ( 13 ) = (), ( 12 ) = (), ( 15 ) = ("rkf45"), ( 14 ) = ([0, 0]), ( 18 ) = ([]), ( 19 ) = (0), ( 16 ) = ([0, 0, 0, 0, 0, []]), ( 17 ) = ([proc (N, X, Y, YP) option `[Y[1] = C(t), Y[2] = Iota(t), Y[3] = S(t)]`; YP[1] := Y[13]*Y[14]+Y[12]*Y[16]*Y[1]*Y[3]/Y[7]+Y[12]*Y[17]*Y[2]*Y[3]/Y[7]-Y[11]*Y[1]-Y[8]*Y[9]*Y[1]-Y[10]*Y[1]; YP[2] := Y[1]*Y[8]*Y[9]-Y[2]*Y[10]+Y[13]*Y[15]; YP[3] := Y[13]*(1-Y[14]-Y[15])+Y[11]*Y[1]-Y[12]*Y[16]*Y[1]*Y[3]/Y[7]-Y[12]*Y[17]*Y[2]*Y[3]/Y[7]-Y[10]*Y[3]; 0 end proc, -1, 0, 0, 0, 0, 0, 0, 0, 0]), ( 22 ) = (0), ( 23 ) = (0), ( 20 ) = ([]), ( 21 ) = (0), ( 26 ) = (Array(1..0, {})), ( 25 ) = (Array(1..0, {})), ( 24 ) = (0)  ] ))  ] ); _y0 := Array(0..17, {(1) = 0., (2) = C0, (3) = I0, (4) = S0, (5) = undefined, (6) = undefined, (7) = undefined, (8) = undefined, (9) = undefined, (10) = undefined, (11) = undefined, (12) = undefined, (13) = undefined, (14) = undefined, (15) = undefined, (16) = undefined, (17) = undefined}); _vmap := array( 1 .. 3, [( 1 ) = (1), ( 2 ) = (2), ( 3 ) = (3)  ] ); _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); _i := false; if _par <> [] then _i := `dsolve/numeric/process_parameters`(_n, _pars, _par, _y0) end if; if _ini <> [] then _i := `dsolve/numeric/process_initial`(_n-_ne, _ini, _y0, _pars, _vmap) or _i end if; if _i then `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 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 ?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 = _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 ?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 = _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]; 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, _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, C(t), Iota(t), S(t)], (4) = [S0 = S0, C0 = C0, I0 = I0, N = N, k = k, o = o, v = v, w = w, x = x, z = z, P[1] = `P[1]`, P[2] = `P[2]`, Q[1] = `Q[1]`, Q[2] = `Q[2]`]}); _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

 

[S0 = 100, C0 = 0, I0 = 0, k = .1, o = 1, v = 0.1e-1, w = .5, x = 1, z = 2, P[1] = .2, P[2] = .3, Q[1] = 1, Q[2] = 2, N = 100]

 

[S0 = 100., C0 = 0., I0 = 0., N = 100., k = .1, o = 1., v = 0.1e-1, w = .5, x = 1., z = 2., `P[1]` = .2, `P[2]` = .3, `Q[1]` = 1., `Q[2]` = 2.]

 

 

{C = RootOf(0.231e-1*_Z^2-.155900*_Z-1.68400), Iota = 0.1e2*RootOf(0.231e-1*_Z^2-.155900*_Z-1.68400)+0.6e2, S = 1.00*(.61*RootOf(0.231e-1*_Z^2-.155900*_Z-1.68400)-.4)/(.21*RootOf(0.231e-1*_Z^2-.155900*_Z-1.68400)+1.2)}

 

{C = 12.55527614, Iota = 185.5527614, S = 1.891962501}, {C = -5.806358387, Iota = 1.93641613, S = 203.8699460}

 

[t = 500., C(t) = HFloat(12.55527868870761), Iota(t) = HFloat(184.87222773107771), S(t) = HFloat(1.8986988803062128)]

(5)

RHS; s1, c1 := selectremove(has, RHS[2], S); F := `<,>`(s1, 0); V := `<,>`(eval(c1, z = 0), eval(RHS[3], z = 0)); JF1 := VectorCalculus:-Jacobian(F, [C, Iota]); JV := VectorCalculus:-Jacobian(V, [C, Iota]); eval(RHS, {C = 0, Iota = 0, S = N}); JF := eval(JF1, S = N); JF.(-JV)^(-1); LinearAlgebra:-Eigenvalues(%); R0 := `assuming`([max(%)], [positive])

[z*(1-P[1]-P[2])+w*C-x*Q[1]*C*S/N-x*Q[2]*Iota*S/N-v*S, z*P[1]+x*Q[1]*C*S/N+x*Q[2]*Iota*S/N-w*C-k*o*C-v*C, C*k*o-Iota*v+z*P[2]]

 

s1, c1 := x*Q[1]*C*S/N+x*Q[2]*Iota*S/N, -C*k*o-C*v-C*w+z*P[1]

 

Vector(2, {(1) = x*Q[1]*C*S/N+x*Q[2]*Iota*S/N, (2) = 0})

 

Vector(2, {(1) = -C*k*o-C*v-C*w, (2) = C*k*o-Iota*v})

 

Matrix(2, 2, {(1, 1) = x*Q[1]*S/N, (1, 2) = x*Q[2]*S/N, (2, 1) = 0, (2, 2) = 0})

 

Matrix(2, 2, {(1, 1) = -k*o-v-w, (1, 2) = 0, (2, 1) = k*o, (2, 2) = -v})

 

[z*(1-P[1]-P[2])-v*N, z*P[1], z*P[2]]

 

Matrix(2, 2, {(1, 1) = x*Q[1], (1, 2) = x*Q[2], (2, 1) = 0, (2, 2) = 0})

 

Matrix(2, 2, {(1, 1) = x*Q[1]/(k*o+v+w)+x*Q[2]*k*o/((k*o+v+w)*v), (1, 2) = x*Q[2]/v, (2, 1) = 0, (2, 2) = 0})

 

Vector[column](%id = 18446744074853280574)

 

x*(k*o*Q[2]+v*Q[1])/((k*o+v+w)*v)

(6)

NULL


 

Download SCI.mw

@Axel Vogt 

If I run the same worksheet in Maple 2019, then I can reproduce the error - see the attached

kernelopts(version);
Physics:-Version();

`Maple 2019.2, X86 64 WINDOWS, Nov 26 2019, Build ID 1435526`

 

`The "Physics Updates" version in the MapleCloud is 745; the version installed in this computer is 602 created 2020, February 9, 23:46 hours, found in the directory C:\Users\TomLeslie\maple\toolbox\2019\Physics Updates\lib\`

(1)

 DE := (28*x + 44)*u(x) + (336*x^2 +726*x - 12)*diff(u(x), x) + (144*x^3 + 396*x^2 - 9*x)*diff(u(x), x, x);

(28*x+44)*u(x)+(336*x^2+726*x-12)*(diff(u(x), x))+(144*x^3+396*x^2-9*x)*(diff(diff(u(x), x), x))

(2)

dsolve({DE,u(0)=2},u(x));

Error, (in dsolve) when calling '`property/ConvertRelation`'. Received: 'numeric exception: division by zero'

 

 


 

Download odeProb2.mw

 

@ismonder 

Again I'm guessing in places: and you still have one of the problems whic I mentioned in my first response, that all entries in the list 'sys' contain references to an unknown 'j'. This unknown propagates all the way through the LinearSolve() commands untill it is resolved when you populate the matrix CoejfMatrix. Luckily you are using 'j' as a loop index in this latter process, so all terms will evaluate to a nyumeric.

Usin a variable in one double loop on the basis that you will resolve it in a susequent double loop by a judicious choice of loop index is either incredibly subtle programming - or just plain wrong

At least the attached now produces a plot! It does take two or three minutes to run - so if re-executing, just wait


Again, for whatever reason, this file won't display inline here
 

Download badsum2.mw

@janhardo 
The statement

Must again look to the reasoning of Rouben:   The ratio of the areas of the rectangles EFGH and SJIK equals (ML/NL)^2.
This remains true even if you replace the rectangle EFGH by any convex shape.

All you really have to do is observe that the that the triangles LSN and LEM are "similar". The ratio of their heights is 12/5 - hence the x- and y-coordinates of the point S is 12/5* the x- and y-coordinates of the point E. An identical argument applies to the triangles LMG and LNI.

Since both x- and y-coordinates are scaled by 12/5, the area of the rectangle SJIK is

(12/5)*(12/5)*Area(EFGH) - ie (12/5)*(12/5)*8 = 1152/25

and thus the area of the "shadow is 1152/25-8

with working out the details of such a calculation for yourself - but sometimes it is just so much simpler to use the tools provided - as in the geom3s() package whose usage is illustrated in the attached

  restart:
  with(geom3d):

#
# Define the point and the plane
#
  point(P1, [2, -3,  4]):
  plane(p, x+2*y+2*z=13, [x,y,z]):
#
# Get the distance from the point to the plane
#
  distance( P1, p);

3

(1)

#
# Define the perpendicular line from the plane
# through the point P1
#
  line(l1, [P1, p]):
#
# Get the point (P2) at the intersection of the
# above line with the plane
#
  intersection( P2, l1, p):
#
# Draw the original point (P1), the plane( p),
# the line (l1) and the point (P2) where
# the line meets the plane
#
  p1:=draw(p, color=red, style=surface, transparency =0.5):
  p2:=draw( P1, color=blue, symbol=solidsphere, symbolsize=20 ):
  p3:=draw( P2, color=blue, symbol=solidsphere, symbolsize=20 ):
  p4:=draw( l1, color=green):
  plots:-display([p1, p2, p3, p4]);

 

#
# Return the (parametric) equation of the line (l1)
# between the original point (P1) and the plane
# (p), as well well as the coordinates of its
# intersection with the plane (ie the point P2)
#  
  Equation(l1, 't');
  coordinates(P2);

[2+t, -3+2*t, 4+2*t]

 

[3, -1, 6]

(2)

 

Download pPlane.mw

If I get evem cleverer, I can use the following commands from the geom3d package

intersect() to get the point at whihc the perpendicular line meets the plane

segment() to represent the line segment between the original point and the point at which the line interesects the plane.

in which case the draw()  command will produce the attached, which you may consider to be "neater"

@anthonyfl Still using the geom 3d package, you can use the

line() command to generate a line  through a point, perpendicular to a plane

draw() command to represent the point the plane and the above line

which part of this is difficult?

When combined with the suggestions in my previous post, this process will produce the figure shown below

@gawati2611 

with(LinearAlgebra):

f:=unapply( Determinant(M), [w1, w2])

where the unapply() command will casue its argumens to be evaluated, before the function is constructed

@Umang Varshney 

Note that the error message you posted originally contains many mentions of

#msup(msub(mi("\`t"),mi("2\`")),mn("2"))

whihc is "typesetting-speak" for 't' with a subscript of 2, and a superscript of 2 - so it pretty prints as t22 and you might think that this is t2*t2, but it isn't! it is a new variable with an inert(?) superscript of 2.

I have no idea how you managed to enter this superscript!

##################################################################

For my own work, I only use 1-D input, in worksheet mode - because I find it so much easier to read and troubleshoot. In fact to debug your original worksheet, I converted the whole thing to 1-D input, used find/replace to locate and fix the problems, and then converted the whoole thing back to 2D input back to 2D -input.

This also means I never have any difficulty distinguishing between subscripted variable and indexed variables, becuase the former are entered as v__1, whils the latter would be v[1]; easy to read, easy to detect using find/replace and so on.

@gawati2611 

and you will come up with something like the attached

plots:-inequal( evalc(Re(x+I*y))>0 and evalc(abs(x+I*y))>1, x=-2..2, y=-2..2);

 

 

Download ineqplt2.mw

First 45 46 47 48 49 50 51 Last Page 47 of 207