NDSolve with arrays

*To*: mathgroup at smc.vnet.net*Subject*: [mg89203] NDSolve with arrays*From*: svend <domdey at tphys.uni-heidelberg.de>*Date*: Thu, 29 May 2008 07:04:05 -0400 (EDT)

hi all, i want to solve a PDE by discretizing in one variable in an array and solve. the equations are of the following type: n = 10; x0 = 1; x1 = 10; play[x_] := IntegerPart[x] eq1 := {D[f[j][x], x] == f[play[x]][x], f[j][x0] == j^2} eqs = Flatten[Table[eq1, {j, 1, n}]] fun = Flatten[Table[f[j], {j, 1, n}]]; tes = NDSolve[eqs, fun, {x, x0, x1}][[1]]; my problem is that the variable x, in which the equation is differential, also appears on the rhs in the "index" of my array. mathematica does not evaluate "play[x]" during NDSolve and just tells me that the rhs is not numerical. I tried "_NumericQ" and similar things but nothing seems. I would be very happy if someone could tell me how to resolve this. thanks svend