As we notice, tanθ is a fraction. Fractions are undefined when the denominator is equal to or approaching 0 because one cannot divide by zero. Thus, the denominator in this case is cosθ, and therefore it cannot equal zero for the equation to be true.