sage automatically expanding polynomial
R.<X>=PolynomialRing(ZZ,'X')
X=R.gen()
P=(X+1)²+1
show(P)
The result is X²+2X+2 while i would like sage to show (X+1)²+1.
How can i do that ?
Use symbolic variables ?
sage: X=var('X')
sage: ((X+1)**2+1)
(X + 1)^2 + 1
Asked: 2014-11-27 21:24:13 +0200
Seen: 1,282 times
Last updated: Nov 27 '14