I'm working on a code to display(Print[]) the answers of some excercises for my students. Some of the answers have parts like 1/Cot(x). I want to prevent Mathematica to transform this expression into Tan(x).
I've tried (as a suggestion from another thread)
Simplify[1/Cot[y], Trig -> False]
But it doesn't work. I can't use Hold[] either because the expression is making reference to a previous calculation and I need to evaluate it. Any tips?? I have Mathematica 11.2 and pardon my english. Thanks!!
It doesn't work, it just display Tan[y] but If I have
Then it does display 1/Cot[y]
Not sure why this is the case
– Alberto Sierraalta Jun 10 '21 at 00:04$PrePrint = # /. {1/Cot[z_] :> 1/Defer@Cot[z]} &;then1/Cot[y]will remain as is, but thenTan[x]will now will become1/Cot[x]as well, which is probably not what you want. – Nasser Jun 10 '21 at 00:35