Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Show correct output of polynomial

Hi, I am new to sage and I am trying to construct a polynomial to try to transform it. However, when writing it I am getting an incorrect output.

x=var("x") s = (x^2+2x+1) + 1/(x^2+2x+1) s.show()

And this is the output I am getting -

x^2+2x + 1/x^2+2x+1 +1 (I am unsure why the 1 is carrying over all the way to right side)

I am looking to obtain the following output to begin transforming it -

x^2+2x+1 + 1/x^2+2x+1

Appreciate any help!