This notebook calculates the polynomial S in the case 
d_  1  =  d_  2  =  d_  3  = 5,  
    in an alternative and slighly
more efficient form .   
It is recommended that the result is stored and the 
checks on the coefficients performed separately.

(x*H1  +  y*H2  +  z*H3)^3  (a1*H1  + b1*H2  + 
            c1*H3) (a2*H1  + b2*H2  + c2*H3) (a3*H1  + b3*H2  + 
            c3*H3) (a4*H1  + b4*H2  + c4*H3) (a5*H1  + b5*H2  + 
            c5*H3) (a6*H1  + b6*H2  + c6*H3) (a7*H1  +  
            b7*H2  +  c7*H3)  (a8*H1  +  b8*H2  +  
            c8*H3) (a9*H1  +  b9*H2  +  c9*H3) (a10*H1  +  
            b10*H2  +  c10*H3) (a11*H1  +  b11*H2  +  
            c11*H3) (a12*H1  +  b12*H2  +  c12*H3);

P  =  Expand[%];

F  =  
        P /. {H1^15  -> 0, H1^14  -> 0, H1^13  -> 0,  
            H1^12  -> 0,  H1^11  -> 0, H1^10  -> 0,  
            H1^9  -> 0,  H1^8  -> 0,  H1^7  -> 0,  
            H1^6  -> 0,   H2^15  -> 0 , H2^14  -> 0 , 
            H2^13  -> 0 , H2^12  -> 0 ,  H2^11  -> 0, 
            H2^10  -> 0,  H2^9  -> 0,  H2^8  -> 0,  
            H2^7  -> 0,  H2^6  ->  0,  H3^15  -> 0,  
            H3^14  -> 0,  H3^13  -> 0, H3^11  -> 0,  
            H3^10  -> 0,  H3^9  -> 0,  H3^8  -> 0,  
            H3^7  -> 0, H3^6 -> 0,   H1^5  ->  1,  
            H2^5  ->  1,  H3 ^5 -> 1};

F11  =  D[F,  x, x]/6;  F12  =  D[F, x, y]/6;  
    F13  =  D[F,  x, z]/6;  
    F22  =  D[F, y, y]/6;   F23  =  D[F, y, z]/6;  
    F33  =  D[F, z, z]/6;

B33  =  F11 F22  -  F12^2;  B11  =  F22 F33  -  F23^2;  
    B22  =  F11 F33  -  F13^2;  B12  =  F13 F23  -  F12 F33;  
    B13  =  F12 F23  -  F13 F22;  
    B23  =  F12 F13  -  F11 F23;

T1  =  
      B33  /. {x  ->  0,  y  ->  0,  z  ->  1};  
    T1  =  T1^2;

T2  =  (B23 /. {x  ->  0,  y  ->  0,  
                z  ->  1}) D[B33, y, z];

T3  =  (B22 /. {x  ->  0,  y  ->  0,  
                z  ->  1})  (B33 /. {x  ->  0,  
                y  ->  1,  z  ->  0});

T4  =  (B13 /. {x  ->  0,  y  ->  0,  
                z  ->  1})  D[B33,  x, z];

T5  =  (B12 /. {x  ->  0,  y  ->  0,  
                z  ->  1}) D[B33, x, y];

T6  = (B11 /. {x  ->  0,  y  ->  0,  
                z  ->  1})  (B33 /. {x  ->  1,  
                y  ->  0,  z  ->  0});

T  = T1  +  T2  +  T3  +  T4  +  T5  +  T6;

T  >> tsave