# Finding the range and domain of $h(x) = \sec (x)$

I am attempting to show how to find the range and domain of $h(x) = \sec (x)$. Here's my working so far.

Consider $h(x) = \sec (x)$, which is defined as $h(x) = \sec (x)=\frac{1}{\cos(x)}$. We know that $f(x)$ is undefined whenever $cos(x)=0$; $cos(x)=0$ whenever $x=\frac{\pi}{2} +\pi k$ for integers $k$. Hence the domain for $h(x) = \sec (x)$ is {$x \in \mathbb{R} , x \ne\frac{\pi}{2} +\pi k, \text {for integers k}$}.

$h(x) = \sec (x)$ is dependent on $f(x)=cos(x)$, as $h(x) = \sec (x)=\frac{1}{\cos(x)}$. The range of $cos(x)$ lies in the interval $[-1,1]$, since $h(x) = \sec (x)$ is undefined when $cos(x)=0$, $h(x)=sec(x)$ is only valid when $f(x)=cos(x)$ takes the values in the following intervals: $- 1 \leqslant \cos (x) < 0$ and $0<\cos(x)\leqslant 1$.

Considering the first case $- 1 \leqslant \cos (x) < 0$:

As $\cos (x)\to0^-$; $\sec(x)=\frac{1}{\cos (x)}\approx \frac{1}{\text {Very small (negative)}}\approx \text{Very big (negative)}$. So in other words as $\cos (x)\to 0^-$, $\sec(x)\to-\infty$.

Consider the interval $0<\cos(x)\leqslant 1$:

As $\cos (x)\to0^+$; $\sec(x)=\frac{1}{\cos (x)}\approx \frac{1}{\text {Very small (positive)}}\approx \text{Very big (positive)}$. So in other words as $\cos (x)\to 0^+$, $\sec(x)\to+\infty$.

Having done this, how do I now show that $h(x)=sec(x)$ is undefined in the interval for which $-1\leqslant \cos(x) \leqslant 1$, so that I can finally state the range of the function.

Please be easy on me, I have a pre-calculus background.

i.e. we know that $sec(x$) is undefined when $x = \pi/2$.
When $x --> \pi/2$ from the left, when $0 < x < \pi/2,$ $cos(x)$ decreases, so $\frac{1}{cos(x)}$ goes towards infinity. similarly, when $x --> \pi/2$ from the right, when $\pi/2 < x < \pi,$ $cos(x)$ increases negatively, so $\frac{1}{cos(x)}$ goes towards negative infinity.
Since the left and right limits don't equal, $sec(x)$ is undefined at $x =\pi/2$