Let #sqrtcosalpha=m#
#rarrcos^(-1)(m)-tan^(-1)(m)=x#
Let #cos^(-1)m=y# then #cosy=m#
#rarrsiny=sqrt(1-cos^2y)=sqrt(1-m^2)#
#rarry=sin^(-1)(sqrt(1-m^2))=cos^(-1)m#
Also, let #tan^(-1)m=z# then #tanz=m#
#rarrsinz=1/cscz=1/sqrt(1+cot^2z)=1/sqrt(1+(1/m)^2)=m/sqrt(1+m^2)#
#rarrz=sin^(-1)(m/sqrt(1+m^2))=tan^(-1)m#
#rarrcos^(-1)(m)-tan^(-1)(m)#
#=sin^(-1)(sqrt(1-m^2))-sin^(-1)(m/sqrt(1+m^2))#
#=sin^-1(sqrt(1-m^2)*sqrt(1-(m/sqrt(1+m^2))^2)-(m/sqrt(1+m^2))*sqrt(1-(sqrt(1-m^2))^2))#
#=sin^(-1)(sqrt((1-cosalpha)/(1+cosalpha))-cosalpha/sqrt(1+cosalpha))#
#=sin^(-1)(tan(alpha/2)-cosalpha/(sqrt2cos(alpha/2)))=x#
#rarrsinx=sin(sin^(-1)(tan(alpha/2)-cosalpha/(sqrt2cos(alpha/2))))=tan(alpha/2)-cosalpha/(sqrt2cos(alpha/2))#