In sagemath 7.5, we can use this code: t=var('t'); M=matrix(4,[[0,0,5/4,2],[t,0,0,0],[0,1,0,0],[0,0,1,0]]); P=charpoly(M); P.substitute(x=1)
Then, we get the correct answer -13/4*t + 1 However, the same code gives an error with sagemath 8.2. A workaround that again gives the correct answer with sagemath 8.2 is the following: t=var('t'); M=matrix(4,[[0,0,5/4,2],[t,0,0,0],[0,1,0,0],[0,0,1,0]]); P=charpoly(M); y=var('y') P.substitute(x=y).substitute(y=1) What is happening? Is this a bug or a strange feature of the "x" obtained from charpoly? Thanks in advance! Juan Luis Varona -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.