Question: Need help! What is wrong with it.


data := [[0., 9.1300, 0.931e-1, 0.899e-1, .1000, 0.], [30.0000, 8.9300, .1270, .1230, .2270, 0.49e-2], [60.0000, 8.6000, .1510, .1390, .4920, 0.153e-1], [90.0000, 8.2800, .1540, .1490, .7780, 0.249e-1], [120.0000, 7.9700, .1540, .1570, 1.0700, 0.329e-1], [150.0000, 7.8600, .1540, .1600, 1.1700, 0.348e-1], [180.0000, 7.8100, .1530, .1530, 1.2100, 0.404e-1], [210.0000, 7.7700, .1400, .1420, 1.2800, 0.432e-1]];
des := [diff(y1(t), t) = -k1*y1(t)-k2*y1(t), diff(y2(t), t) = k2*y1(t)-k3*y2(t), diff(y3(t), t) = k1*y1(t)+k3*y2(t)-k4*y3(t), diff(y4(t), t) = k4*y3(t)-k5*y2(t)*y4(t)+k6*y5(t), diff(y5(t), t) = k5*y2(t)*y4(t)-k6*y5(t)];
ics := seq((y || i)(0) = data[1, i+1], i = 1 .. 5):
Error, unable to match delimiters
Typesetting:-mambiguous(Typesetting:-mambiguous(ics Assign seq

  lparlpary verbarverbar irpar(0) equals data(1comma i + 1)comma 

  i equals 1 periodperiod 5rparcolon, 

  Typesetting:-merror("unable to match delimiters")))
res := dsolve({ics, des[]}, numeric, parameters = [k1, k2, k3, k4, k5, k6]);
Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations
timeList := [0, 30, 60, 90, 120, 150, 180, 210];
              [0, 30, 60, 90, 120, 150, 180, 210]
sse := proc (k1, k2, k3, k4, k5, k6) res(parameters = [k1, k2, k3, k4, k5, k6]); add((rhs(select(has, res(timeList[i]), y1)[])-data[i, 2])^2+(rhs(select(has, res(timeList[i]), y2)[])-data[i, 3])^2+(rhs(select(has, res(timeList[i]), y3)[])-data[i, 4])^2+(rhs(select(has, res(timeList[i]), y4)[])-data[i, 5])^2+(rhs(select(has, res(timeList[i]), y5)[])-data[i, 6])^2, i = 2 .. 8) end proc;
proc(k1, k2, k3, k4, k5, k6)  ...  end;
c := GlobalOptimization:-GlobalSolve(('sse')(k1, k2, k3, k4, k5, k6), k1 = 0 .. 1, k2 = 0 .. 1, k3 = 0 .. 1, k4 = 0 .. 1, k5 = 0 .. 1, k6 = 0 .. 1, timelimit = 10); [.219132447080011505, [k1 = 0.852482740113834e-3, k2 = 0.52683998680924474e-4, k3 = 0., k4 = 0.5113239298267808e-1, k5 = 0.4363021255887466e-2, k6 = 0.]];
Error, `GlobalOptimization` does not evaluate to a module
[0.219132447080011505, [k1 = 0.000852482740113834, 

  k2 = 0.000052683998680924474, k3 = 0., 

  k4 = 0.05113239298267808, k5 = 0.004363021255887466, k6 = 0.]]

res(parameters = c[2]):  p:=Array(1..5):  for n from 1 to 5 do     p[n]:=plots:-display(plots:-odeplot(res, [t, (y || n)(t)], t = 0 .. 210),plots:-pointplot([seq([data[i, 1], data[i, n+1]], i = 1 .. 8)]));  end do; plots:-display(p) ;
Error, unable to match delimiters
Typesetting:-mambiguous(Typesetting:-mambiguous(res(parameters 

  equals c(2))colon  pAssignArray(1periodperiod5)colon  for n 

  from 1 to 5 do     p(n)Assignplotscolon - displaylparplotscolon

   - odeplotlparrescomma lsqbtcomma lpary verbarverbar nrpar(t)

  rsqbcomma t equals 0 periodperiod 210rparcommaplotscolon - 

  pointplot((seq((data(icomma 1)comma data(icomma n + 1))comma i 

  equals 1 periodperiod 8)))rparsemi  end dosemi plotscolon - 

  display(p) , Typesetting:-merror("unable to match delimiters")))

Please Wait...