Hi,
For expressive reasons, in some applications I name my symbols as IndexedBased, but really I want to consider U[x,y] and U[x,y-1] etc to be unrelated.
I got equations of relations between bunch of such symbols, and I want to express some of them with the others, but somehow solve() doesn't work for simultaneous equations.
In this example:
U = IndexedBase('U')
x,y = symbols('x y')
eq1 = Eq(U[x,y]+5*U[x,y-1]-2,0)
eq2 = Eq(-4*U[x,y-1]+5*U[x-1,y],0)
solve(eq1,U[x,y]) # this works and give -5*U[x,y-1]+2 as expected
solve([eq1,eq2],U[x,y]) # but this gives errors
tracing down the errors message and it seems to related to testing if the equations are constant
/home/anaconda/lib/python2.7/site-packages/sympy/solvers/solvers.pyc in solve(f, *symbols, **flags)
844 ok = True
845 else:
--> 846 if fi.is_constant():
847 ok = True
848 if ok:And I tried swapping symbols with Idx which gives same result.
I figure it's probably due to sympy trying to remove equations from the list that are constant. But I don't have a good explanation as to 1) why Indexed symbols are different and 2) why it works in the previous case?
Thanks,
-TS