Integration ( 1 – cot x)/(1 + cot x) dx explain in great detail

write cotx as cosx/sinx

u get 1-(cos/sinx)divided by 1+(cosx/sinx)

u get (sinx-cosx)/(sinx+cosx)

substitute sinx+cosx=u

differentiate both sides

u get (cosx-sinx).dx=du

-(-cosx+sin x)dx=du

-cosx+sinx dx= -du

sinx-cosx dx=-du

substitute back in the integral expression

u get integral of(-du/u)

= -log u

substitute value of u