Here:
(1+cosx+isinx) divided by (sinx-i(1+cosx))
Write in trigonometry form.
(1+cosx+isinx) /(sinx-i(1+cosx))=((2Cos^2(x/2)+i2sin(x/2)cos(x/2))/((2sin(x/2)cos(x/2))-i2Cos^2(x/2))
=(cos(x/2)+isin(x/2))/(sin(x/2)-icos(x/2))=(cos(x/2)+isin(x/2))/[(-i)((cos(x/2)+isin(x/2))]
=(-1)/i= i (proved in 3 steps)