myfile = "pitor8.o"
 
eqlist = {Derivative[0, 1][u[1]][x, t] - 
    bb*u[1][x, t]*Derivative[1, 0][u[1]][x, t] - 
    cc*u[2][x, t]*Derivative[1, 0][u[2]][x, t] - 
    aa*Derivative[3, 0][u[1]][x, t], 
   Derivative[0, 1][u[2]][x, t] - 
    dd*u[2][x, t]*Derivative[1, 0][u[1]][x, t] - 
    dd*u[1][x, t]*Derivative[1, 0][u[2]][x, t]}
 
rhorank = 8
 
formrho[x, t] = 
  c[1]*u[1][x, t]^4 + c[2]*u[1][x, t]^3*u[2][x, t] + 
   c[3]*u[1][x, t]^2*u[2][x, t]^2 + c[4]*u[1][x, t]*u[2][x, t]^3 + 
   c[5]*u[2][x, t]^4 + c[6]*u[1][x, t]*Derivative[1, 0][u[1]][x, t]^2 + 
   c[7]*u[2][x, t]*Derivative[1, 0][u[1]][x, t]^2 + 
   c[8]*u[1][x, t]*Derivative[1, 0][u[1]][x, t]*
    Derivative[1, 0][u[2]][x, t] + 
   c[9]*u[2][x, t]*Derivative[1, 0][u[1]][x, t]*
    Derivative[1, 0][u[2]][x, t] + 
   c[10]*u[1][x, t]*Derivative[1, 0][u[2]][x, t]^2 + 
   c[11]*u[2][x, t]*Derivative[1, 0][u[2]][x, t]^2 + 
   c[12]*Derivative[2, 0][u[1]][x, t]^2 + 
   c[13]*Derivative[2, 0][u[1]][x, t]*Derivative[2, 0][u[2]][x, t] + 
   c[14]*Derivative[2, 0][u[2]][x, t]^2
 
system = {(bb - dd)*c[2] == 0, -6*cc*c[1] + 2*bb*c[3] - dd*c[3] == 0, 
   2*cc*c[2] - bb*c[4] - dd*c[4] == 0, cc*c[3] - 6*dd*c[5] == 0, 
   12*aa*c[1] + bb*c[6] == 0, 3*aa*c[4] + cc*c[7] == 0, 
   9*aa*c[2] + bb*c[7] + 2*dd*c[7] == 0, cc*c[8] == 0, 
   bb*(-c[7] + c[8]) == 0, -2*bb*c[7] + 2*dd*c[7] + 6*bb*c[8] - 3*dd*c[8] == 
    0, 6*aa*c[2] + 2*bb*c[7] + 2*dd*c[7] - dd*c[8] == 0, 
   -3*aa*c[2] + bb*c[8] - dd*c[8] == 0, 
   18*aa*c[2] - 2*bb*c[7] + 2*dd*c[7] + 3*dd*c[8] == 0, cc*c[10] == 0, 
   (bb + 2*dd)*c[10] == 0, 4*aa*c[3] + 2*cc*c[6] - bb*c[9] + dd*c[9] - 
     2*dd*c[10] == 0, 6*aa*c[3] + cc*c[6] + 2*dd*c[9] - 2*dd*c[10] == 0, 
   12*aa*c[3] + 6*cc*c[6] - 3*bb*c[9] + 3*dd*c[9] + 2*bb*c[10] - 
     2*dd*c[10] == 0, -4*cc*c[6] + 3*bb*c[9] + dd*c[9] + 2*dd*c[10] == 0, 
   18*aa*c[4] + 8*cc*c[7] + cc*c[8] - 4*dd*c[11] == 0, 
   3*aa*c[4] + 2*cc*c[7] - 2*dd*c[11] == 0, 
   -(cc*c[7]) + cc*c[8] + 2*dd*c[11] == 0, 
   -4*cc*c[7] + cc*c[8] + 8*dd*c[11] == 0, 3*aa*c[6] + 5*bb*c[12] == 0, 
   -5*aa*c[9] + 2*aa*c[10] - 10*cc*c[12] == 0, 
   -5*aa*c[9] + 3*aa*c[10] - 10*cc*c[12] == 0, aa*c[13] == 0, cc*c[13] == 0, 
   aa*c[8] - 10*bb*c[13] == 0, -2*aa*c[7] + 2*aa*c[8] - 5*bb*c[13] == 0, 
   -8*aa*c[7] - 3*aa*c[8] - 10*dd*c[13] == 0, 
   -2*aa*c[7] - 3*aa*c[8] - 5*dd*c[13] == 0, 
   -(aa*c[8]) + bb*c[13] - dd*c[13] == 0, 6*aa*c[7] + 5*dd*c[13] == 0, 
   dd*c[14] == 0, aa*c[10] - 10*dd*c[14] == 0, aa*c[10] - 5*dd*c[14] == 0, 
   aa*c[9] + 2*cc*c[12] - 2*dd*c[14] == 0}
 
coefmatrix = {{0, bb - dd, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
   {-6*cc, 0, 2*b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0, 0, 3*aa, 0, 0, 2*cc, 0, 0, 0, -2*dd, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 0, -cc, cc, 0, 0, 2*dd, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 0, -4*cc, cc, 0, 0, 8*dd, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 3*aa, 0, 0, 0, 0, 0, 5*bb, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, -5*aa, 2*aa, 0, -10*cc, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, -5*aa, 3*aa, 0, -10*cc, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, aa, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, cc, 0}, 
   {0, 0, 0, 0, 0, 0, 0, aa, 0, 0, 0, 0, -10*bb, 0}, 
   {0, 0, 0, 0, 0, 0, -2*aa, 2*aa, 0, 0, 0, 0, -5*bb, 0}, 
   {0, 0, 0, 0, 0, 0, -8*aa, -3*aa, 0, 0, 0, 0, -10*dd, 0}, 
   {0, 0, 0, 0, 0, 0, -2*aa, -3*aa, 0, 0, 0, 0, -5*dd, 0}, 
   {0, 0, 0, 0, 0, 0, 0, -aa, 0, 0, 0, 0, bb - dd, 0}, 
   {0, 0, 0, 0, 0, 0, 6*aa, 0, 0, 0, 0, 0, 5*dd, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, dd}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, aa, 0, 0, 0, -10*dd}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, aa, 0, 0, 0, -5*dd}, 
   {0, 0, 0, 0, 0, 0, 0, 0, aa, 0, 0, 2*cc, 0, -2*dd}}
 
unknownlist = {c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10], 
   c[11], c[12], c[13], c[14]}
 
parameters = {aa, bb, cc, dd}
myfile = "mvdnlsr3.o"
 
eqlist = {Derivative[0, 1][u[1]][x, t] + beta*Derivative[1, 0][u[1]][x, t] + 
    3*u[1][x, t]^2*Derivative[1, 0][u[1]][x, t] + 
    u[2][x, t]^2*Derivative[1, 0][u[1]][x, t] + 
    2*u[1][x, t]*u[2][x, t]*Derivative[1, 0][u[2]][x, t] - 
    Derivative[2, 0][u[2]][x, t], 
   Derivative[0, 1][u[2]][x, t] + 
    2*u[1][x, t]*u[2][x, t]*Derivative[1, 0][u[1]][x, t] + 
    u[1][x, t]^2*Derivative[1, 0][u[2]][x, t] + 
    3*u[2][x, t]^2*Derivative[1, 0][u[2]][x, t] + Derivative[2, 0][u[1]][x, t]
    }
 
rhorank = 3
 
formrho[x, t] = 
  beta^2*c[1]*u[1][x, t]^2 + beta*c[2]*u[1][x, t]^4 + c[3]*u[1][x, t]^6 + 
   beta^2*c[4]*u[1][x, t]*u[2][x, t] + beta*c[5]*u[1][x, t]^3*u[2][x, t] + 
   c[6]*u[1][x, t]^5*u[2][x, t] + beta^2*c[7]*u[2][x, t]^2 + 
   beta*c[8]*u[1][x, t]^2*u[2][x, t]^2 + c[9]*u[1][x, t]^4*u[2][x, t]^2 + 
   beta*c[10]*u[1][x, t]*u[2][x, t]^3 + c[11]*u[1][x, t]^3*u[2][x, t]^3 + 
   beta*c[12]*u[2][x, t]^4 + c[13]*u[1][x, t]^2*u[2][x, t]^4 + 
   c[14]*u[1][x, t]*u[2][x, t]^5 + c[15]*u[2][x, t]^6 + 
   beta*c[16]*u[2][x, t]*Derivative[1, 0][u[1]][x, t] + 
   c[17]*u[1][x, t]^2*u[2][x, t]*Derivative[1, 0][u[1]][x, t] + 
   c[18]*u[1][x, t]*u[2][x, t]^2*Derivative[1, 0][u[1]][x, t] + 
   c[19]*u[2][x, t]^3*Derivative[1, 0][u[1]][x, t] + 
   c[20]*Derivative[1, 0][u[1]][x, t]^2 + 
   c[21]*Derivative[1, 0][u[1]][x, t]*Derivative[1, 0][u[2]][x, t] + 
   c[22]*Derivative[1, 0][u[2]][x, t]^2
 
system = {beta^2*c[4] == 0, beta^3*c[4] == 0, beta*c[5] == 0, 
   beta^2*(2*c[4] + 3*c[5]) == 0, c[6] == 0, beta*(6*c[5] + 5*c[6]) == 0, 
   beta^2*(c[1] - c[7] - c[8]) == 0, beta*(6*c[2] - 3*c[8] - 2*c[9]) == 0, 
   3*c[3] - c[9] == 0, beta^2*(2*c[4] - 3*c[10]) == 0, beta*c[10] == 0, 
   5*c[6] - 3*c[11] == 0, beta*(2*c[5] - 2*c[10] - c[11]) == 0, 
   beta*(3*c[8] - 6*c[12] - 2*c[13]) == 0, c[9] - c[13] == 0, 
   beta*(6*c[10] - 5*c[14]) == 0, 3*c[11] - 5*c[14] == 0, c[14] == 0, 
   c[13] - 3*c[15] == 0, beta*(2*c[8] - c[16]) == 0, 
   beta^2*(-2*c[1] + 2*c[7] + c[16]) == 0, 4*c[9] - c[17] == 0, 
   -12*c[3] + c[17] == 0, -15*c[3] + c[9] + c[17] == 0, 
   beta*(-12*c[2] + 2*c[8] + 2*c[16] + c[17]) == 0, 
   beta*(-12*c[2] + 3*c[16] + c[17]) == 0, 9*c[11] - 4*c[18] == 0, 
   -3*c[11] + 10*c[14] - 2*c[18] == 0, 3*c[14] - c[18] == 0, 
   beta*(-3*c[5] + c[18]) == 0, -3*c[6] + c[18] == 0, 
   beta*(3*c[10] + c[18]) == 0, beta*(-3*c[5] + 3*c[10] + c[18]) == 0, 
   3*c[11] + 2*c[18] == 0, -10*c[6] + 3*c[11] + 2*c[18] == 0, 
   4*c[13] - 3*c[19] == 0, -c[13] + 15*c[15] - 3*c[19] == 0, 
   4*c[15] - c[19] == 0, beta*(4*c[12] - c[16] + c[19]) == 0, 
   beta*(-2*c[8] + 12*c[12] - 2*c[16] + 3*c[19]) == 0, 
   -6*c[9] + 6*c[13] - c[17] + 3*c[19] == 0, 
   12*c[13] - 5*c[17] + 6*c[19] == 0, -12*c[9] - 2*c[17] + 15*c[19] == 0, 
   c[17] - 6*c[20] == 0, c[19] - 2*c[20] == 0, c[18] - 9*c[21] == 0, 
   c[18] - 3*c[21] == 0, 2*c[18] - 3*c[21] == 0, c[18] - c[21] == 0, 
   c[21] == 0, beta*c[21] == 0, c[17] - 6*c[22] == 0, c[19] - 2*c[22] == 0, 
   c[20] - c[22] == 0}
 
coefmatrix = {{0, 0, 0, beta^2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0, 0}, {0, 0, 0, beta^3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0, 0}, {0, 0, 0, 0, beta, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
   {0, 0, 3, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, beta, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 5, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 0,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 12, 0, 0, 0, -5, 0, 6, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, -12, 0, 0, 0, 0, 0, 0, 0, -2, 0, 15, 0, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -6, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -9, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -3, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -3, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, beta, 0}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -6}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -2}, 
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1}}
 
unknownlist = {c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10], 
   c[11], c[12], c[13], c[14], c[15], c[16], c[17], c[18], c[19], c[20], 
   c[21], c[22]}
 
parameters = {beta}
