(sina+cosa-1)(sina-cosa+1)/sin2a
=[sina^2-(cosa-1)^2]/sin2a
=[sina^2-cosa^2+2cosa-1]/sin2a
=[-2cosa^2+2cosa]/sin2a
=[-2cosa^2+2cosa]/(2sina*cosa)
=[-cosa+1]/sina
=tan(a/2)
(sina+cosa-1)(sina-cosa+1)/sin2a
=[sina^2-(cosa-1)^2]/sin2a
=[sina^2-cosa^2+2cosa-1]/sin2a
=[-2cosa^2+2cosa]/sin2a
=[-2cosa^2+2cosa]/(2sina*cosa)
=[-cosa+1]/sina
=tan(a/2)