We have,
1+sin2θ+cos2θ1+sin2θ−cos2θ
Then,
1+2sinθcosθ+2cos2θ−11+2sinθcosθ−1+2sin2θ
=2sinθcosθ+2cos2θ2sinθcosθ+2sin2θ
=2cosθ(sinθ+cosθ)2sinθ(cosθ+sinθ)
=cosθsinθ
=cotθ