Question: factoring terms intelligently

 

> phi1[0] := unapply(`φbt`[0](x, y, t, T)-2*h2*`φbc`[0](x, y, t, T)/(h1+h2), x, y, t, T); phi2[0] := unapply(`φbt`[0](x, y, t, T)+2*h1*`φbc`[0](x, y, t, T)/(h1+h2), x, y, t, T); eta1[0] := unapply(`ηbt`[0](x, t, T)-2*h2*`ηbc`[0](x, t, T)/(h1+h2), x, t, T); eta2[0] := unapply(`ηbt`[0](x, t, T)+2*h1*`ηbc`[0](x, t, T)/(h1+h2), x, t, T); U1[0] := unapply(Ubt[0](y)-2*h2*Ubc[0](y)/(h1+h2), y); U2[0] := unapply(Ubt[0](y)+2*h1*Ubc[0](y)/(h1+h2), y);
> eqn := h1*((D(U1[0]))(1)*eta1[0](x, t, T)-(D[2](phi1[0]))(x, 1, t, T))+h2*((D(U2[0]))(1)*eta2[0](x, t, T)-(D[2](phi2[0]))(x, 1, t, T)); expand(eqn/(h1+h2)); collect(% = 0, [`φbt`[0], `φbc`[0], `ηbt`[0], `ηbc`[0], Ubt[0], Ubc[0], h1, h2]);
print(`output redirected...`); # input placeholder
     /    h1        h2   \                            
     |- ------- - -------| D[2](φbt[0])(x, 1, t, T)
     \  h1 + h2   h1 + h2/                            

          /  h1        h2   \                                
        + |------- + -------| D(Ubt[0])(1) ηbt[0](x, t, T)
          \h1 + h2   h1 + h2/                                

          /        2            2 \                                    
          | 4 h1 h2      4 h2 h1  |                                    
        + |---------- + ----------| D(Ubc[0])(1) ηbc[0](x, t, T) = 0
          |         3            3|                                    
          \(h1 + h2)    (h1 + h2) /                                    
The above equation is correct but I need to find a way to get Maple to collect the terms as I did above but also to cancel the coefficienets, some of which are simply 1, others are a bit simpler than what is shown above.  How can I do that?
 

Please Wait...