#tan((3pi)/8) = tan((3pi)/4 / 2)#

To get the half-angle identity, recall that:

#sin(x/2) = pmsqrt((1-cosx)/2)#

#+# in quadrants I and II

#-# in quadrants III and IV

#cos(x/2) = pmsqrt((1+cosx)/2)#

#+# in quadrants I and IV

#-# in quadrants II and III

You can get the quadrant conditions by saying that #y = sinx# is above the x-axis on the first-two #90^o#-intervals and below the x-axis on the second-two #90^o#-intervals. Similar for #y = cosx#.

Thus:

#tan(x/2) = pmsqrt((1-cosx)/(1+cosx))#

#+# in quadrants I and III

#-# in quadrants II and IV

(you can get these quadrant conditions after dividing the quadrant conditions of #sin# and #cos#.)

#(3pi)/8*(180^o/pi)# is #67.5^o# and so it's in quadrant I (#67.5^o < 90.0^o#), making the condition #+#.

#tan((3pi)/8) = sqrt((1-cos((3pi)/4))/(1+cos((3pi)/4)))#

Now we need to figure out #cos((3pi)/4)#. #cosx# in #pi/4# intervals has the pattern #1, sqrt2/2, 0, -sqrt2/2, -1, -sqrt2/2, 0, sqrt2/2, 1, ...#, with #cos((0pi)/4) = 1#.

Thus:

#cos((3pi)/4) = -sqrt2/2#

#=> sqrt((1+sqrt2/2)/(1-sqrt2/2)#

Get common denominators of 2:

#= sqrt(((2+sqrt2)/2)/((2-sqrt2)/2)#

Cancel:

#= sqrt((2+sqrt2)/(2-sqrt2))#

Now let's just make it look nicer. Multiply by the conjugate of the bottom #(sqrt(2+sqrt2))#:

#= (sqrt(2+sqrt2))^2/sqrt(4-(sqrt2)^2)#

#= (2+sqrt2)/sqrt(2)#

Split and simplify by multiplying by "#1#", cancel things out:

#= 1 + 2/(sqrt2) = 1*1 + (2*sqrt2)/(sqrt2*sqrt2) = 1*1 + (2sqrt2)/(2) = 1 + sqrt2#