problem while importing a set of integro-differential equations
Hi everyone,
The following code is a minimal code from a longer code for my thesis, made for simplification of error finding procedure.
reset()
forget()
var('x,y,t, x1,y1, x2,y2')
var('x_B1,x_B2, y_B1,y_B2, T')
x_B1=-1; x_B2=1; y_B1=-1; y_B2=1; T=10
assume(x_B1<=x, 0<t)
var('q') # q is a dummy variable to fill the zeroth place in some lists
R0=[q,x,y,t]
R1=[x1,y1]
R2=[x2,y2]
phi=[q]
for i in range(1,4):
phi.append([])
for n in range(3):
phi[i].append(function('phi_%s_%s' %(i,n), x,y,t,*R1+R2))
# initial estimation
for i in (1,4):
phi[i][0]=1
# operators
g = lambda i,f: diff(f,R0[i])
It = lambda f: integral(f,t,0,t)
Ixx = lambda f: integral(integral(f,x,x_B1,x),x,x_B1,x)
IntR2 = lambda f: integral(integral(f,x2,x_B1,x_B2),y2,y_B1,y_B2)
eq=[]
# equations being imported
for n in range(2):
restore(eq) # I am not sure if reset() should be used here or restore()?
for i in range(1,4):
eq.append(phi[i][n+1]== It(g(i,phi[i][n])) \
+ It( sum( phi[j][n]*g(j,phi[i][n]) \
+ IntR2(phi[j][n](x1=x2,y1=y2)*g(j,phi[i][n])) for j in range(1,4)) ))
show(eq[i-1])
now it gives back the error that: list index out of range . It seems that the problem is with the part dedicated to the initial estimation as removing that part let us get rid of this error, but I don't understand why the error really stands for ?
Also removing that initial estimation (as this code still doesn't try to solve the set of equations imported, but only save them for later solvation which of course should be embedded in the last loop before the list eq is refreshed) gives back the Maxima's interactive question that is t positive, negative, or zero? This is so while I have already assumed t to be greater than 0!
Any idea?