
myfile = "d_5kdv12.o"
 
eqlist = {Derivative[0, 1][u[1]][x, t] + 
    aa*u[1][x, t]^2*Derivative[1, 0][u[1]][x, t] + 
    bb*Derivative[1, 0][u[1]][x, t]*Derivative[2, 0][u[1]][x, t] + 
    cc*u[1][x, t]*Derivative[3, 0][u[1]][x, t] + Derivative[5, 0][u[1]][x, t]}
 
rhorank = 12
 
formrho[x, t] = 
  c[1]*u[1][x, t]^6 + c[2]*u[1][x, t]^3*Derivative[1, 0][u[1]][x, t]^2 + 
   c[3]*Derivative[1, 0][u[1]][x, t]^4 + 
   c[4]*u[1][x, t]^2*Derivative[2, 0][u[1]][x, t]^2 + 
   c[5]*Derivative[2, 0][u[1]][x, t]^3 + 
   c[6]*u[1][x, t]*Derivative[3, 0][u[1]][x, t]^2 + 
   c[7]*Derivative[4, 0][u[1]][x, t]^2
 
system = {15*bb*c[1] - 90*cc*c[1] - 2*aa*c[2] == 0, 
   -360*c[1] - 3*bb*c[2] + 9*cc*c[2] - 12*aa*c[3] + 4*aa*c[4] == 0, 
   -150*c[1] - bb*c[2] + 5*cc*c[2] + 5*aa*c[4] == 0, 
   -3600*c[1] - 27*bb*c[2] + 105*cc*c[2] - 60*aa*c[3] + 80*aa*c[4] == 0, 
   375*c[2] - 36*bb*c[3] + 54*cc*c[3] + 28*bb*c[4] - 60*cc*c[4] + 
     66*aa*c[5] - 216*aa*c[6] == 0, 
   210*c[2] + 18*cc*c[3] + 23*bb*c[4] - 57*cc*c[4] + 24*aa*c[5] - 
     174*aa*c[6] == 0, 195*c[2] + 36*cc*c[3] + 16*bb*c[4] - 39*cc*c[4] + 
     48*aa*c[5] - 138*aa*c[6] == 0, 
   135*c[2] + 18*cc*c[3] + 13*bb*c[4] - 32*cc*c[4] + 24*aa*c[5] - 
     104*aa*c[6] == 0, 135*c[2] - 12*bb*c[3] + 6*cc*c[3] + 14*bb*c[4] - 
     32*cc*c[4] + 6*aa*c[5] - 96*aa*c[6] == 0, 
   120*c[2] - 12*bb*c[3] + 24*cc*c[3] + 7*bb*c[4] - 14*cc*c[4] + 
     30*aa*c[5] - 60*aa*c[6] == 0, 
   15*c[2] + 2*bb*c[4] - 5*cc*c[4] - 14*aa*c[6] == 0, 
   -5*c[4] - bb*c[6] + 9*aa*c[7] == 0, 
   -30*c[4] - 3*cc*c[5] - 7*bb*c[6] - cc*c[6] + 56*aa*c[7] == 0, 
   60*c[3] - 90*c[4] + 6*bb*c[5] + 3*cc*c[5] - 8*bb*c[6] + 252*aa*c[7] == 0, 
   -130*c[4] - 27*cc*c[5] - 35*bb*c[6] - 9*cc*c[6] + 252*aa*c[7] == 0, 
   60*c[3] - 230*c[4] + 6*bb*c[5] + 3*cc*c[5] - 36*bb*c[6] + 504*aa*c[7] == 
    0, 180*c[3] - 160*c[4] + 18*bb*c[5] + 6*cc*c[5] - 3*bb*c[6] - cc*c[6] + 
     560*aa*c[7] == 0, 120*c[3] - 240*c[4] + 12*bb*c[5] - 21*cc*c[5] - 
     37*bb*c[6] - 9*cc*c[6] + 630*aa*c[7] == 0, 
   180*c[3] - 400*c[4] + 18*bb*c[5] - 18*cc*c[5] - 59*bb*c[6] - 9*cc*c[6] + 
     1008*aa*c[7] == 0, 720*c[3] - 790*c[4] + 72*bb*c[5] + 9*cc*c[5] - 
     47*bb*c[6] - 9*cc*c[6] + 2520*aa*c[7] == 0, 
   5*c[6] + 2*bb*c[7] + 5*cc*c[7] == 0, 
   -15*c[5] + 10*c[6] + 18*bb*c[7] + 12*cc*c[7] == 0, 
   -30*c[5] + 35*c[6] + 42*bb*c[7] + 39*cc*c[7] == 0, 
   -15*c[5] + 55*c[6] + 36*bb*c[7] + 57*cc*c[7] == 0}
 
coefmatrix = {{15*bb - 90*cc, -2*aa, 0, 0, 0, 0, 0}, 
   {-360, -3*bb + 9*cc, -12*aa, 4*aa, 0, 0, 0}, 
   {-150, -bb + 5*cc, 0, 5*aa, 0, 0, 0}, 
   {-3600, -27*bb + 105*cc, -60*aa, 80*aa, 0, 0, 0}, 
   {0, 375, -36*bb + 54*cc, 28*bb - 60*cc, 66*aa, -216*aa, 0}, 
   {0, 210, 18*cc, 23*bb - 57*cc, 24*aa, -174*aa, 0}, 
   {0, 195, 36*cc, 16*bb - 39*cc, 48*aa, -138*aa, 0}, 
   {0, 135, 18*cc, 13*bb - 32*cc, 24*aa, -104*aa, 0}, 
   {0, 135, -12*bb + 6*cc, 14*bb - 32*cc, 6*aa, -96*aa, 0}, 
   {0, 120, -12*bb + 24*cc, 7*bb - 14*cc, 30*aa, -60*aa, 0}, 
   {0, 15, 0, 2*bb - 5*cc, 0, -14*aa, 0}, {0, 0, 0, -5, 0, -bb, 9*aa}, 
   {0, 0, 0, -30, -3*cc, -7*bb - cc, 56*aa}, 
   {0, 0, 60, -90, 6*bb + 3*cc, -8*bb, 252*aa}, 
   {0, 0, 0, -130, -27*cc, -35*bb - 9*cc, 252*aa}, 
   {0, 0, 60, -230, 6*bb + 3*cc, -36*bb, 504*aa}, 
   {0, 0, 180, -160, 18*bb + 6*cc, -3*bb - cc, 560*aa}, 
   {0, 0, 120, -240, 12*bb - 21*cc, -37*bb - 9*cc, 630*aa}, 
   {0, 0, 180, -400, 18*bb - 18*cc, -59*bb - 9*cc, 1008*aa}, 
   {0, 0, 720, -790, 72*bb + 9*cc, -47*bb - 9*cc, 2520*aa}, 
   {0, 0, 0, 0, 0, 5, 2*bb + 5*cc}, {0, 0, 0, 0, -15, 10, 18*bb + 12*cc}, 
   {0, 0, 0, 0, -30, 35, 42*bb + 39*cc}, {0, 0, 0, 0, -15, 55, 36*bb + 57*cc}}
 
unknownlist = {c[1], c[2], c[3], c[4], c[5], c[6], c[7]}
 
parameters = {aa, bb, cc}
