# Revision history [back]

When you make a vague request (e.g. 'simplify'), there is a risk that the answer will change if you ask it again.

Unfortunately I don't know what has changed or why. Maybe e.g. using git blame someone can find it out.

I am guessing that you are interested in the expression as a polynomial in $x,y,Z$.

A precise way to request the expression in that form is as follows (using polynomial rings):

sage: var('Z,x,y,a,w1,w2,w3,G')
sage: eqn = (Z*a + Z*w2 - a + w2)*(Z*a + Z*w3 - a + w3)*y == (Z*a + Z*w1 - a + w1)*G*(Z + 1)*x
sage: A = PolynomialRing(QQ, names='a,w1,w2,w3,G')
sage: B = PolynomialRing(A, names='Z,x,y')
sage: SR(B(eqn.lhs())) == SR(B(eqn.rhs()))
(a^2 + a*w2 + a*w3 + w2*w3)*Z^2*y - 2*(a^2 - w2*w3)*Z*y + (a^2 - a*w2 - a*w3 + w2*w3)*y == (G*a + G*w1)*Z^2*x + 2*G*Z*w1*x - (G*a - G*w1)*x


You could also factor each coefficient:

sage: sum(SR(C).factor()*SR(X) for C,X in B(eqn.lhs())) == sum(SR(C).factor()*SR(X) for C,X in B(eqn.rhs()))
Z^2*(a + w2)*(a + w3)*y - 2*(a^2 - w2*w3)*Z*y + (a - w2)*(a - w3)*y == G*Z^2*(a + w1)*x + 2*G*Z*w1*x - G*(a - w1)*x