Question: how to do pdsolve numeric in this case

> sol := pdsolve({ICS, sys1, sys2, sys3, sys4, sys5, sys6, sys7}, numeric, method = rkf45, parameters = [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p], output = listprocedure);

Error, (in pdsolve) invalid input: `pdsolve/numeric` expects its 2nd argument, IBCs, to be of type {set, list}, but received method = rkf45

 

restart;

x11:=[1.05657970467127, .369307407127487, .400969917393968, .368036162749865, .280389875142339, .280523489139136, .283220960827744, .373941285224253, .378034013792196, .384412762008662, .358678988563716, .350625923673556, .852039817522304, .362240519978640, 1.03197080591829, .343650441408896, .982510654490390, .404544012440991, .422063867224247, 1.20938803285209, .455708586000668, 1.22503869712995, .388259397947667, .472188904769827, 1.31108028794286, 1.19746589728366, .572669348193002];

y11:= [.813920951682113, 10.3546712426210, 2.54581301217449, 10.2617298458172, 3.82022939508992, 3.81119683373741, 3.90918914917183, 10.5831132713329, 10.8700088489538, 11.0218056177585, 10.5857571473115, 9.89034057997145, .271497107157453, 9.77706473740146, 2.23955104698355, 4.16872072216206, .806710906391666, 11.9148193656260, 12.0521411908477, 2.52812993540440, 12.6348841508094, 2.72197067934160, 5.10891266728297, 13.3609183272238, 3.03572692234234, 1.07326033849793, 15.4268962507711];

z11:= [8.93290500985527, 8.96632856524217, 15.8861149154785, 9.16576669760908, 3.20341865536950, 3.11740291181539, 3.22328961317946, 8.71094047480794, 8.60596466961827, 9.15440788281943, 10.2935566768586, 10.5765776143026, 16.3469510439066, 9.36885507010739, 2.20434678689869, 3.88816077008078, 17.9816287534802, 10.1414228793737, 10.7356141216242, 4.00703203725441, 12.0105837616461, 3.77028605914906, 5.01411979976607, 12.7529165152417, 3.66800269682059, 21.2178824031985, 13.9148746721034];

u11 := [5.19, 5.37, 5.56, 5.46, 5.21, 5.55, 5.56, 5.61, 5.91, 5.93, 5.98, 6.28, 6.24, 6.44, 6.58, 6.75, 6.78, 6.81, 7.59, 7.73, 7.75, 7.69, 7.73, 7.79, 7.91, 7.96, 8.05];

u11 := [seq(close3(t+t3), t3=0..26)];

sys1:=Diff(a1(s,t),s) = a*a1(s,t)+ b*a2(s,t)+ c*a3(s,t)+ d*u(t);

sys2:=Diff(a2(s,t),s) = e*a1(s,t)+ f*a2(s,t)+ g*a3(s,t)+ h*u(t);

sys3:=Diff(a3(s,t),s) = i*a1(s,t)+ j*a2(s,t)+ k*a3(s,t)+ l*u(t);

sys4:=Diff(y(t),t) = m*a1(s,t)+n*a2(s,t)+ o*a3(s,t)+ p*u(t);

sys5:= Diff(a1(s,t),t) = a1(s,t);

sys6:= Diff(a2(s,t),t) = a2(s,t);

sys7:= Diff(a3(s,t),t) = a3(s,t);

sol := pdsolve([sys1, sys2, sys3,sys4,sys5,sys6,sys7]);

t2 := [seq(i, i=1..27)];

xt1 := subs(_C1=1,sol[1]); # a1(t)

xt2 := subs(_C1=1,sol[2]); # a2(t)

xt3 := subs(_C1=1,sol[3]); # a3(t)

ut1 := subs(_C1=1,sol[4]); # u(t)

tim := [seq(n, n=1..27)];

N:=nops(tim):

ICS:=a1(1)=x11[1],a2(1)=y11[1],a3(1)=z11[1],u1(1)=u11[1];

sol:=pdsolve({sys1, sys2, sys3,sys4,sys5,sys6,sys7,ICS}, numeric, method=rkf45, parameters=[ a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p],output=listprocedure);

ans(.001,.002,.003,.001,.002,.003,.001,.002,.003,.003,.003,.003,.003,.003,.003,.003);

ans:=proc(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) sol(parameters=[ a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p]);

add((xt1(tim[i])-x11[i])^2,i=1..N)+add((xt2(tim[i])-y11[i])^2,i=1..N)+add((xt3(tim[i])-z11[i])^2,i=1..N)+add((ut1(tim[i])-u11[i])^2,i=1..N);

end proc;

result1 := Optimization:-Minimize(ans,initialpoint=[.001,.002,.003,.001,.002,.003,.001,.002,.003,.003,.003,.003,.003,.003,.003,.003]);

Please Wait...