Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

i want sage to do that for me!

Okay then let Sage do it for you:

sage: var('a, b, c, d, e')
(a, b, c, d, e)
sage: P = a*d + b*c + d^2 + d*e
sage: P.subs(e=(a + b - d)).expand()
b*c + 2*a*d + b*d

This is exactly what you want: It simplified the expression given that a + b = d + e.