# 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 ?

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 ?

add a comment

0

Use symbolic variables ?

```
sage: X=var('X')
sage: ((X+1)**2+1)
(X + 1)^2 + 1
```

Asked: **
2014-11-27 14:24:13 -0600
**

Seen: **181 times**

Last updated: **Nov 27 '14**

how to find solutions of a system of polynomial equations [closed]

Sage not returning roots of polynomimal

Find minimum value of polynomial

Segmentation fault when multiplying by variable

Why doesn't Sage evaluate to zero on its own found roots?

S.from_polynomial(f) -- convert a polynomial to symmetric functions BUT with a parameter

Fast evaluation of big polynomials

polynomials rings over transcendental field extensions

How to find a polynomial identity to evaluate sum of fifth powers?

Solving equations in polynomial ring if ideal is positive dimensional

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.