# Getting the trace polynomial

Dear all,

I am using sagemath to get the trace polynomial from a given reciprocal polynomial of even degree. The process is described nicely on the documentation. I am not allowed to post a link. See below for a concrete example.

However, the algorithm returns a triple $(Q, R, q)$. For further calculations, I need to take out just the polynomial $Q$. Here is an example

pol.<x> = PolynomialRing(Rationals()) sage: u = x^6 +1; u1=u.trace_polynomial()

The algorithm returns $u1=(x^3 - 3*x, 1, 1)$ (in my examples, I know that $R=q=1$ always). How can I get the first component of $u1$?

Edit: Simply take $u1[0]$ as suggested below by another user.

How can we resolve this problem? I am sorry if my question is too trivial. Thank you very much!

Best wishes, Tung