First time here? Check out the FAQ!
answered 2019-03-26 00:22:57 +0100
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
?