Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Do you mean:

sage: var("r,g,a,c,d")
(r, g, a, c, d)
sage: Exp=(r+1)*(r+2)+g+a; Exp
(r + 2)*(r + 1) + a + g
sage: Exp.expand()-(2*r+a)+(c+d)
r^2 + c + d + g + r + 2

?