A function \( f(x) \) is said to be continuous at a point \( x = a \) if:
\[
\lim_{x \to a} f(x) = f(a).
\]
We need to prove that \( \tan x \) is continuous for all \( x \in \mathbb{R} \) except for the points where it is undefined.
The function \( \tan x \) is defined as:
\[
\tan x = \frac{\sin x}{\cos x}.
\]
Since the sine and cosine functions are continuous, the continuity of \( \tan x \) depends on the continuity of \( \cos x \). The function \( \cos x \) is continuous everywhere except for the points where it becomes zero. These points correspond to the values \( x = \frac{\pi}{2} + n\pi \) where \( n \in \mathbb{Z} \). At these points, \( \tan x \) is undefined.
Thus, \( \tan x \) is continuous at every point where \( \cos x \neq 0 \). Therefore, the function is continuous for all \( x \in \mathbb{R} \) except for \( x = \frac{\pi}{2} + n\pi \), where \( n \in \mathbb{Z} \).
Conclusion:
The function \( f(x) = \tan x \) is continuous for all \( x \in \mathbb{R} \) except for \( x = \frac{\pi}{2} + n\pi \), where \( n \in \mathbb{Z} \).