## 559 Reputation

6 years, 308 days

## hint...

u have written your code with as complicated as names you can do ! and have put every thing in a very complicated do loop ! so it makes you make mistakes much !

i changed your initial conditons to :

r_nach_1(t):=0: r_nach_1(t):=0.2*10^(-2):

and this line of your code like this :

r_nach_1[i+2] (t):=  r_nach_1[i+1](t) +  alpha*(B1*(iter_psi_c1_1(t)) + (c1*iter_psi_c2_1(t))); instead of defining function.

i extracted your code , and for first loop,(setting i=1) it is done correctly. thus changed i=2 and got another recursive error !
and becuase of complexness of your code ! i can not find the souce ! maybe some one else can help !

i=1 : > restart;
 > t1F := 20: A11 := 2.5*10^(-3): c1 := 4*10^2: ss1 := 0.5*10^(-2): pI1 := 0.4*10^(-1): r1max := 0.6*10^(-2): procent:=0.2: A12 := procent*A11: B1:=-1: alpha:=0.000001: beta1:=0.5: r_nach_1(t):=0: r_nach_1(t):=0.2*10^(-2):
 >
 >
 > iter_psi_c1_1:=proc(t) 0 end proc: iter_psi_c2_1:=proc(t) 0 end proc:
 > s1:=proc(t) 0 end proc:
 >
 >
 > i:=1; (1)
 > _p11 := evalf(dsolve({diff(p1(t), t) = A11*(p1(t)-'s1'[i](t))+B1*(r_nach_1[i+1](t)-r_nach_1[i](t))+A12*(p1(t)-'s1'[i](t))^2+ss1, p1(0) = pI1}, numeric,method = dverk78, abserr = 1.*10^(-8), relerr = 1.*10^(-8),optimize,output = listprocedure, known=[s1[i],iter_psi_c1_1,iter_psi_c2_1])); (2)
 > p1F := rhs(_p11(t1F)); (3)
 > s1[i+1] := subs(_p11, p1(t)); (4)
 > q11 := evalf(dsolve({diff(q1(t), t) = c1*r_nach_1[i+1](t), q1(0) = 0},numeric,range=0..t1F,known=[iter_psi_c1_1,iter_psi_c2_1])); (5)
 > q1F := rhs(q11(t1F)); (6)
 > F[i]:= beta1*q1F; (7)
 > _psi_c1_1 :=evalf(dsolve({diff(psi_c1_1(t), t) = A11+2*A12*('s1'[i+1](t)-'s1'[i](t))*psi_c1_1(t), psi_c1_1(t1F) =  -1+beta1},numeric,method = dverk78, abserr = 1.*10^(-8), relerr = 1.*10^(-8),optimize,known=[s1[i],s1[i+1]],output=listprocedure)); (8)
 > _psi_c2_1 :=evalf(dsolve({diff(psi_c2_1(t), t) = 0, psi_c2_1(t1F) =  -beta1},numeric,output=listprocedure));