I've been working with Maxima and its thrown me an expression like this
$$ \left( \left( \left( 6\,{w}_{1}-6\right) \,{p}_{2}-6\,{p}_{1}\,{w}_{1}+6\,{p}_{0}\right) \,{w}_{2}^{2}+\left( \left( 6\,{w}_{1}-6\,{w}_{1}^{2}\right) \,{p}_{2}+6\,{p}_{1}\,{w}_{1}^{2}+\left( 6\,{p}_{1}-12\,{p}_{0}\right) \,{w}_{1}\right) \,{w}_{2}+\left( 6\,{p}_{0}-6\,{p}_{1}\right) \,{w}_{1}^{2}\right) \,{t}_{3}+\left( \left( \left( 6-6\,{w}_{1}\right) \,{t}_{2}+6\,{t}_{1}\,{w}_{1}-6\,{t}_{0}\right) \,{w}_{2}^{2}+\left( \left( 6\,{w}_{1}^{2}-6\,{w}_{1}\right) \,{t}_{2}-6\,{t}_{1}\,{w}_{1}^{2}+\left( 12\,{t}_{0}-6\,{t}_{1}\right) \,{w}_{1}\right) \,{w}_{2}+\left( 6\,{t}_{1}-6\,{t}_{0}\right) \,{w}_{1}^{2}\right) \,{p}_{3}+\left( \left( 6\,{p}_{0}\,{w}_{1}-6\,{p}_{0}\right) \,{t}_{2}+\left( 6\,{t}_{0}-6\,{t}_{0}\,{w}_{1}\right) \,{p}_{2}+\left( 6\,{t}_{0}\,{p}_{1}-6\,{p}_{0}\,{t}_{1}\right) \,{w}_{1}\right) \,{w}_{2}^{2}+\left( \left( 6\,{p}_{0}\,{w}_{1}-6\,{p}_{0}\,{w}_{1}^{2}\right) \,{t}_{2}+\left( 6\,{t}_{0}\,{w}_{1}^{2}-6\,{t}_{0}\,{w}_{1}\right) \,{p}_{2}+\left( 6\,{p}_{0}\,{t}_{1}-6\,{t}_{0}\,{p}_{1}\right) \,{w}_{1}^{2}+\left( 6\,{p}_{0}\,{t}_{1}-6\,{t}_{0}\,{p}_{1}\right) \,{w}_{1}\right) \,{w}_{2}+\left( 6\,{t}_{0}\,{p}_{1}-6\,{p}_{0}\,{t}_{1}\right) \,{w}_{1}^{2} $$
I can see that this polynomial can be simplified, e.g. over 3 dozen multiplications by 6 can be replaced by a single multiplication by 6, and lots of computations of $t_1 - t_0$ can be precomputed. This is important because I'm going to evaluating this expression (and others like it, generated by Maxima) hundreds of thousands of times in a computer program. Can anyone recommend a symbolic maths application that does a better job than Maxima on such tasks.
Here is the formula readable for Maxima:
(((6*w[1]-6)*p[2]-6*p[1]*w[1]+6*p[0])*w[2]^2+((6*w[1]-6*w[1]^2)*p[2]+6*p[1]*w[1]^2+(6*p[1]-12*p[0])*w[1])*w[2]+(6*p[0]-6*p[1])*w[1]^2)*t[3]+(((6-6*w[1])*t[2]+6*t[1]*w[1]-6*t[0])*w[2]^2+((6*w[1]^2-6*w[1])*t[2]-6*t[1]*w[1]^2+(12*t[0]-6*t[1])*w[1])*w[2]+(6*t[1]-6*t[0])*w[1]^2)*p[3]+((6*p[0]*w[1]-6*p[0])*t[2]+(6*t[0]-6*t[0]*w[1])*p[2]+(6*t[0]*p[1]-6*p[0]*t[1])*w[1])*w[2]^2+((6*p[0]*w[1]-6*p[0]*w[1]^2)*t[2]+(6*t[0]*w[1]^2-6*t[0]*w[1])*p[2]+(6*p[0]*t[1]-6*t[0]*p[1])*w[1]^2+(6*p[0]*t[1]-6*t[0]*p[1])*w[1])*w[2]+(6*t[0]*p[1]-6*p[0]*t[1])*w[1]^2
If I set $X$ to the expression and execute factor(X) I get $$6\,\left(w_{2}-w_{1}\right)\,\left(w_{1}\,p_{2}\,w_{2}\,t_{3}-p_{2} \,w_{2}\,t_{3}-p_{1}\,w_{1}\,w_{2}\,t_{3}+p_{0}\,w_{2}\,t_{3}+p_{1} \,w_{1}\,t_{3}-p_{0}\,w_{1}\,t_{3}-w_{1}\,t_{2}\,w_{2}\,p_{3}+t_{2} \,w_{2}\,p_{3}+t_{1}\,w_{1}\,w_{2}\,p_{3}-t_{0}\,w_{2}\,p_{3}-t_{1} \,w_{1}\,p_{3}+t_{0}\,w_{1}\,p_{3}+p_{0}\,w_{1}\,t_{2}\,w_{2}-p_{0} \,t_{2}\,w_{2}-t_{0}\,w_{1}\,p_{2}\,w_{2}+t_{0}\,p_{2}\,w_{2}-p_{0} \,t_{1}\,w_{1}\,w_{2}+t_{0}\,p_{1}\,w_{1}\,w_{2}+p_{0}\,t_{1}\,w_{1} -t_{0}\,p_{1}\,w_{1}\right)$$
Not sure what further simplification is possible.
Added in response to comment
Here is how I would isolate the $w$'s (you can do the same for other variables also:
So your expression is $$ 6 (w_1 - w_2 ) ~(A w_1 + B w_2 + C w_1 w_2) $$
I use the wxmaxima front end.