Question: Ho do I substitute special variables in a list of polynomials?

Could you please help me at the solution of my problem?

Let us consider the following list:

A := [x[1, 1]*(a*x[1, 1] + E[1, 1]) + x[2, 1]*(a*x[1, 2] + E[1, 2]) + x[3, 1]*(a*x[1, 3] + E[1, 3]), x[1, 2]*(a*x[1, 1] + E[1, 1]) + x[2, 2]*(a*x[1, 2] + E[1, 2]) + x[3, 2]*(a*x[1, 3] + E[1, 3]), x[1, 3]*(a*x[1, 1] + E[1, 1]) + x[2, 3]*(a*x[1, 2] + E[1, 2]) + x[3, 3]*(a*x[1, 3] + E[1, 3]), x[1, 1]*(a*x[2, 1] + E[2, 1]) + x[2, 1]*(a*x[2, 2] + E[2, 2]) + x[3, 1]*(a*x[2, 3] + E[2, 3]), x[1, 2]*(a*x[2, 1] + E[2, 1]) + x[2, 2]*(a*x[2, 2] + E[2, 2]) + x[3, 2]*(a*x[2, 3] + E[2, 3]), x[1, 3]*(a*x[2, 1] + E[2, 1]) + x[2, 3]*(a*x[2, 2] + E[2, 2]) + x[3, 3]*(a*x[2, 3] + E[2, 3]), x[1, 1]*(a*x[3, 1] + E[3, 1]) + x[2, 1]*(a*x[3, 2] + E[3, 2]) + x[3, 1]*(a*x[3, 3] + E[3, 3]), x[1, 2]*(a*x[3, 1] + E[3, 1]) + x[2, 2]*(a*x[3, 2] + E[3, 2]) + x[3, 2]*(a*x[3, 3] + E[3, 3]), x[1, 3]*(a*x[3, 1] + E[3, 1]) + x[2, 3]*(a*x[3, 2] + E[3, 2]) + x[3, 3]*(a*x[3, 3] + E[3, 3])]

I want to subs E[k,k]=1 when there is "a*x[k,k]+E[k,k]" as a part of polynomial in the above list.

Thank you so much in advance

Please Wait...