Question: How do i solve this list

I have Zipped 2 equations together to equate their equivalent Coefficients.  I now need to assign solve the list fot each value of N (1...9) How do I get Maple to do this reliably for the list as N 1..9 does not necessarily occour in sequence.

restart
p[z1] := collect((1/2)*c[3]*s[15]*c[1]*c[2]+(1/2)*c[3]*s[35]*c[1]*c[2]-(1/2)*c[1]*c[2]*s[32]*c[3]-(1/2)*c[1]*c[2]*s[33]*c[3]^2-(1/2)*c[1]*c[2]*s[13]*c[3]^2-(1/2)*c[1]*c[2]*s[12]*c[3]+(1/2)*c[1]^2*s[26]*c[2]^2-(1/2)*s[35]*c[1]^2*c[2]^2+(1/2)*s[33]*c[3]^3+(1/2)*c[3]*s[31]+(1/2)*s[32]*c[3]^2+(1/2)*s[12]*c[3]^2+(1/2)*s[13]*c[3]^3+(1/2)*c[3]*s[11]-(1/2)*s[23]*c[3]^2-(1/2)*s[24]*c[1]^2-(1/2)*s[26]*c[2]^2+(1/2)*s[42]*c[3]+(1/2)*s[43]*c[3]^2+(1/2)*s[44]*c[1]^2+(1/2)*s[46]*c[2]^2-(1/2)*s[22]*c[3]-(1/2)*c[1]*c[2]*s[11]-(1/2)*s[15]*c[1]^2*c[2]^2-(1/2)*c[2]*s[34]*c[1]^3-(1/2)*c[1]*c[2]*s[31]+(1/2)*c[1]^2*s[43]*c[3]^2-(1/2)*c[1]*s[16]*c[2]^3-(1/2)*c[1]*s[36]*c[2]^3-(1/2)*c[2]*s[14]*c[1]^3+(1/2)*s[45]*c[1]^3*c[2]+(1/2)*c[1]^2*s[23]*c[3]^2+(1/2)*c[1]^2*s[46]*c[2]^2+(1/2)*c[1]^2*s[42]*c[3]+(1/2)*s[25]*c[1]^3*c[2]+(1/2)*c[1]^2*s[22]*c[3]+(1/2)*c[3]*s[14]*c[1]^2+(1/2)*c[3]*s[36]*c[2]^2+(1/2)*c[3]*s[34]*c[1]^2-(1/2)*s[25]*c[1]*c[2]+(1/2)*c[3]*s[16]*c[2]^2+(1/2)*s[45]*c[1]*c[2]+(1/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2*c[2]^2+N[8]*c[1]*c[2]^3+N[9]*c[2]^4

(2)

List := zip(`=`, [coeffs(p[z1]-pz1N, [c[1], c[2]], 't')], [seq(0, i = 1 .. nops([t]))])

[-(1/2)*s[23]*c[3]^2+(1/2)*s[42]*c[3]+(1/2)*s[43]*c[3]^2-(1/2)*s[22]*c[3]-(1/2)*s[21]+(1/2)*s[41]-N[1]+(1/2)*s[33]*c[3]^3+(1/2)*c[3]*s[31]+(1/2)*s[32]*c[3]^2+(1/2)*s[12]*c[3]^2+(1/2)*s[13]*c[3]^3+(1/2)*c[3]*s[11] = 0, -N[7]-(1/2)*s[35]+(1/2)*s[46]-(1/2)*s[15]+(1/2)*s[26] = 0, (1/2)*s[45]-(1/2)*s[14]-(1/2)*s[34]+(1/2)*s[25]-N[6] = 0, -N[8]-(1/2)*s[36]-(1/2)*s[16] = 0, (1/2)*c[3]*s[15]-(1/2)*s[12]*c[3]-(1/2)*s[33]*c[3]^2-(1/2)*s[31]-(1/2)*s[11]-(1/2)*s[32]*c[3]+(1/2)*s[45]-(1/2)*s[25]+(1/2)*c[3]*s[35]-(1/2)*s[13]*c[3]^2-N[3] = 0, -(1/2)*s[26]+(1/2)*c[3]*s[16]+(1/2)*s[46]+(1/2)*c[3]*s[36]-N[4] = 0, (1/2)*s[23]*c[3]^2+(1/2)*s[44]+(1/2)*c[3]*s[34]+(1/2)*s[22]*c[3]+(1/2)*c[3]*s[14]-(1/2)*s[24]+(1/2)*s[42]*c[3]+(1/2)*s[43]*c[3]^2+(1/2)*s[21]+(1/2)*s[41]-N[2] = 0, -N[5]+(1/2)*s[44]+(1/2)*s[24] = 0, -N[9] = 0]

(3)

t

1, c[2]^2*c[1]^2, c[1]^3*c[2], c[2]^3*c[1], c[1]*c[2], c[2]^2, c[1]^2, c[1]^4, c[2]^4

(4)

N[11]

N[11]

(5)

N[1]

N[1]

(6)

List[1]

-(1/2)*s[23]*c[3]^2+(1/2)*s[42]*c[3]+(1/2)*s[43]*c[3]^2-(1/2)*s[22]*c[3]-(1/2)*s[21]+(1/2)*s[41]-N[1]+(1/2)*s[33]*c[3]^3+(1/2)*c[3]*s[31]+(1/2)*s[32]*c[3]^2+(1/2)*s[12]*c[3]^2+(1/2)*s[13]*c[3]^3+(1/2)*c[3]*s[11] = 0

(7)

List[2]

-N[7]-(1/2)*s[35]+(1/2)*s[46]-(1/2)*s[15]+(1/2)*s[26] = 0

(8)

``

``

 

Download test.mw

Please Wait...