The process you mention is true, however in your example with the tangent function, you would write:
I have a small question about multiplication.
From what I learned at school 1/5/6 equals to 6/5 (I moved 6 to the top)
Is this always true ? How about this example:
It is known that x/tanx equals
x * 1/(cox/sinx)
Is it legal to say it equals
x * sinx/cosx ? (Move the sin upwards)
Thanks a lot.
also, while tan(x) is not defined at pi/2, we CAN define 1/tan(x) (another form of cot(x)) at pi/2, as 0 (this makes cot(x) continuous at 0).
this often happens: we can define something that is a/(undefined) sometimes, in a way that "doesn't lead to contradictions". you do have to be careful with this, though.