differentiate 1-cosx/1+cosx

Are we finding the derivative with respect to x ?

the way you typed it
you would have 0 + sinx - sinx = 0

you probably meant (1-cosx)/(1+cosx)
let y = (1-cosx)/(1+cosx)
dy/dx = (sinx(1+cosx) - (-sinx)(1-cosx))/(1+cosx)^2
= (sinx + sinxcosx + sinx - sinxcosx)/(1+cosx)^2
= 2sinx/(1+cosx)^2