First time here? Check out the FAQ!
answered 2021-11-16 16:14:25 +0100
There is a difference between u and u.trace_polynomial(); the former is a polynomial and the latter is a tuple.
u
u.trace_polynomial()
It seems that what you want is just u.trace_polynomial()[0].
u.trace_polynomial()[0]