| 1 | initial version |
It is not z to be considered, but z25, which is a free parameter that plays the role of $n$ in your own solution. Note that free variables are generated on demand, so if you run the same solve command at the beginning of a Sage session, you will get z1.
It is indeed a symbolic variable (defined by the system), as you can see with:
sage: solve(sin(x)-cos(x) == 0, x, to_poly_solve=True)[0].variables()
(x, z25)
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.