The tangent will be undefined wherever its denominator (the cosine) is zero. Thinking back to when you learned about graphing rational functions, a zero in the denominator means you'll have a vertical asymptote. So the tangent will have vertical asymptotes wherever the cosine is zero: at –π/2, π/2, and 3π/2.