# (cos (pi/12)-sin (pi/12))(tan (pi/12)+cos( pi/12) )#
#= (cos (pi/12)/cos (pi/12)-sin (pi/12)/cos (pi/12))cos (pi/12)(tan (pi/12)+cos( pi/12) )#
#=(1-tan(pi/12))(sin(pi/12)+cos^2(pi/12))#
#=(1-tan(pi/12))(sin(pi/12)+1/2(1+cos(pi/6))#
#=(1-tan(pi/12))(sin(pi/12)+1/2(1+cos(pi/6))#
Now #tan(pi/12)=tan(pi/3-pi/4)#
#=(tan(pi/3)-tan(pi/4))/(1+tan(pi/3)tan(pi/4))=(sqrt3-1)/(sqrt3+1)#
Again
#sin(pi/12)#
#=sin(pi/3-pi/4)#
#=sin(pi/3)cos(pi/4)-cos(pi/3)sin(pi/4)#
#=(sqrt3-1)/(2sqrt2)#
So
#(1-tan(pi/12))(sin(pi/12)+1/2(1+cos(pi/6))#
#=(1-(sqrt3-1)/(sqrt3+1))((sqrt3-1)/(2sqrt2)+1/2(1+sqrt3/2))#
#=(2/(sqrt3+1))((sqrt3-1)/(2sqrt2)+1/8(4+2sqrt3))#
#=(sqrt3-1)((sqrt3-1)/(2sqrt2)+1/8(sqrt3+1)^2)#
#=((sqrt3-1)^2/(2sqrt2)+1/8(sqrt3-1)(sqrt3+1)^2)#
#=((sqrt3-1)^2/(2sqrt2)+1/4(sqrt3+1))#
#=((4-2sqrt3)/(2sqrt2)+1/4(sqrt3+1))#
#=((2-sqrt3)/(sqrt2)+1/4(sqrt3+1))#
#=((2sqrt2-sqrt6)/2+1/4(sqrt3+1))#