We use the following
#costheta=2cos^2(theta/2)-1#
#cos(theta/2)=sqrt((1+costheta)/2)#
#costheta=1-2sin^2(theta/2)#
#sin(theta/2)=sqrt((1-costheta)/2)#
#tan(theta/2)=sin(theta/2)/cos(theta/2)#
#=sqrt((1-costheta)/(1+costheta))#
#=sqrt(((1-costheta)^2)/(1-cos^2theta))#
#=(1-costheta)/sintheta#
Similarly,
#cot(theta/2)=cos(theta/2)/(sin(theta/2)#
#=sqrt((1+costheta)/(1-costheta))#
#=sqrt((1+costheta)/(1-cos^2theta))#
#=(1+costheta)/sin theta#
#sin(theta/4)=sqrt((1-cos(theta/2))/2)#
#=sqrt((1-sqrt((1+costheta)/2))/2)#
And finally,
#f(theta)=sin(theta/4)+tan(theta/2)+cot(theta/2)#
#=sqrt((1-sqrt((1+costheta)/2))/2)+(1-costheta)/sintheta+(1+costheta)/sin theta#
#=sqrt((1-sqrt((1+costheta)/2))/2)+2/sintheta#