You can put this solution on YOUR website! Verify the identity.
tan^2 x/2 = sec x-1/sec x+1
..
Starting from left side
tan^2 x/2=(1-cosx)/(1+cosx)
=(1-cosx)/(1+cosx)
=[(1-1/secx)/(1+1/secx)]
=[(secx-1)/secx]/[(secx+1)/secx]
secx cancels out
(secx-1)/(secx+1)
verified: left side = right side