Question: How to differentiate an equation having fluctuating numbers of variables during the simulation?

I have an equation were build with many unfixed numbers of variables as below:

eq:=f(U[i,j],V[i,j],W[i,j],S[i,j],T[i,j]), i,j=0,1,2,...(changing during the program running)

How do you suggest to calculate the first derivative of such equation with respect to U[i,j],V[i,j],W[i,j],S[i,j],T[i,j]?

Suppose that i,j=22, in this way to calculate the metioned derivative with respect to U[0,0] only, I must write:

diff( eq(U[0,0],U[0,1],U[0,2],...U[22,22], V[0,0],V[0,1],...,T[22,22]), U[0,0])  ( More than 2420 terms)

As you see it needs cumbersome writings if i,j be constants, and because the i and j are changing during the program, I dont know how to cope with this derivatives in Maple??

Please Wait...