First time here? Check out the FAQ!
answered 2022-06-20 21:40:12 +0100
slelievre's answer is general, and should be kept in mind ; in this specific case, SR has a specific suitable method :
slelievre
SR
sage: a.trig_reduce() tan(x^2 + x + 1)
HTH,