=[sin²(a/2)-2sin(a/2)cos(a/2)+cos²(a/2)]/[sin²(a/2)-cos²(a/2)]
=[sin(a/2)-cos(a/2)]²/[cos(a/2)-sin(a/2)][cos(a/2)+sin(a/2)]
=[cos(a/2)-sin(a/2)]/[cos(a/2)+sin(a/2)]
=[1-tan(a/2)] / [1+tan(a/2)]
= -1 + 2 / [1+tan(a/2)]
=[sin²(a/2)-2sin(a/2)cos(a/2)+cos²(a/2)]/[sin²(a/2)-cos²(a/2)]
=[sin(a/2)-cos(a/2)]²/[cos(a/2)-sin(a/2)][cos(a/2)+sin(a/2)]
=[cos(a/2)-sin(a/2)]/[cos(a/2)+sin(a/2)]
=[1-tan(a/2)] / [1+tan(a/2)]
= -1 + 2 / [1+tan(a/2)]