Can someone please help me work out how to get to the answer of:

tanx + tan (pi-x) + cot (pi/2+x) = tan (2pi-x)

tan (pi-x) = -tan(x)

cot(pi/2+x) = -tan(x)
tan(2pi-x) = -tan(x)

now things fall out.