[(sinx+cosx-1)(sinx-cosx+1)-2cosx]/sin2x
=[(sinx)^2-(cosx-1)^2-2cosx]/sin2x
=[(sinx)^2-(cosx)^2-1]/sin2x
=[(sinx)^2-(cosx)^2-(sinx)^2-(cosx)^2]/sin2x
=-2(cosx)^2/(2sinxcosx)
=-cosx/sinx
=-cotx
[(sinx+cosx-1)(sinx-cosx+1)-2cosx]/sin2x
=[(sinx)^2-(cosx-1)^2-2cosx]/sin2x
=[(sinx)^2-(cosx)^2-1]/sin2x
=[(sinx)^2-(cosx)^2-(sinx)^2-(cosx)^2]/sin2x
=-2(cosx)^2/(2sinxcosx)
=-cosx/sinx
=-cotx