When a rational function such as y = (x^2)/x is shown on a graph, there is a hole at x = 0. But, for the rational trigonometric function y = (cos^2(x))/(cos(x)) is shown on a graph, there are no holes at pi/2, 3pi/2, and so on. Why does this occur?

Thank you for your help.