Integrate 1+sinx/sinx(1+cosx)

^{2}

Denominator can be written as 2sin(x/2).cos(x/2){ 2cos^{2}(x/2) }

Now split to get ,

1/4 { cosecx + tan(x/2).sec^{2}(x/2) + 2sec^{2}(x/2) }

which can be integrated as

I = 1/4 { log(cosecx - cotx) + tan^{2}(x/2) + 4tan(x/2) } + C