Finding the range and domain of $f(x)=\tan (x)$ I am attempting to find the range and domain of $f(x)=\tan(x)$ and show why this is the case. I can seem to find the domain relatively well, however I run into problems with the range. Here's what I have done so far.


Finding the domain of $f(x)=\tan(x)$

Consider $f(x)=\tan(x)$ is defined as $f(x)=\tan(x)=\frac{\sin(x)}{\cos(x)}$, it is clear the domain of $f(x)$ is undefined when $\cos(x)=0$. $\cos(x)=0$ whenever $x=\frac{\pi}{2}+\pi k$ for integers $k$, so the domain of $f(x) =\tan (x)$ can be stated as $x\in\mathbb{R}, x \ne \frac{\pi}{2}+\pi k\text{  for integers k}$

Finding the range of $f(x)=\tan(x)$

To find the range of $f(x)=\tan(x)$ we must refer to the definition of $f(x)=\tan(x)=\frac{\sin(x)}{\cos(x)}$. From this we can see that $f(x)$ is undefined when $\cos(x)=0$, as the interval of $\cos(x)$ is $[-1,1]$ we will now need to split this into two cases: $-1\leqslant\cos(x)<0$ and $0<\cos(x)\leqslant1$.
Considering the first interval; $-1\leqslant\cos(x)<0$, as $\cos(x)\to0^-$: $\sin(x)\to1$ and $\tan(x)=\frac{\sin(x)}{\cos(x)}\approx\frac{1}{\text{very small(negative)}}\approx\text{very big(negative)}$. 
In other words as $\cos(x)\to0^-$, $\tan(x)\to-\infty$
Considering the second interval; $0<\cos(x)\leqslant1$, as $\cos(x)\to0^+$: $\sin(x)\to1$ and $\tan(x)=\frac{\sin(x)}{\cos(x)}\approx\frac{1}{\text{very small(positive)}}\approx\text{very big(positive)}$. 
In other words as $\cos(x)\to0^+$, $\tan(x)\to+\infty$.

This is where I am up to. What I want to know is how I can show definitively that $tan(x)$ can take all the values within the interval $[-\infty,\infty]$. Some people would call it a day here, and say that this shows that the range  of $f(x)$ is $-\infty<\tan(x)<\infty$. However I nearly ran into a similar error when I was finding the range of $\sec(x)$, only to discover that although it does tend to positive and negative infinity it doesnt take any values in the interval $(-1,1)$. Where do I proceed from here?

EDIT: I am not looking for answers that use differentiation. Answers should be pre-calculus level.
 A: Firstly, I'd like to applaud you on your persistence in trying to get to a rigorous solution.
I'll give you a hint for a geometric solution: if you use the triangle definition of a tangent, can you think of a way of constructing a triangle giving any desired value of tangent?

Edit: some more detail

Lets say I want to find a value of $x$ such that $\tan(x) = y$ for some $y$. Then I can construct a right angled triangle with sides of lengths $1, y$ and $\sqrt{1+y^2}$. Then if $x$ is the appropriate angle, then $\tan(x) = y$
A: It is easiest to use the intermediate value theorem when finding the range : You know that
$$
\lim_{x\to \pi/2} \tan(x) = +\infty \text{ and } \lim_{x\to -\pi/2} \tan(x) = -\infty
$$
So the image of the interval $(-\pi/2, \pi/2)$ must be $\mathbb{R}$
A: This really is up to how rigourous you want to be. Your ideas on showing that $\tan(x)$ diverging to when $\cos(x)$ tends to 0 is fine, but rigourous proof would start from definition of 'tending to infinity' and manipulate limit definitions to show that these imply that $\tan(x)$ does tend to infinity according to definition.
Also, it is benefitial to just consider the interval $(-\frac{\pi}{2},\frac{\pi}{2})$ since by periodicity of $\tan(x)$ any result on this interval would transport to whole interval immediately.
Once you prove that $\tan(x) \rightarrow \pm\infty$ now you want to show that $\tan(x)$ is continuous on the interval $(-\frac{\pi}{2},\frac{\pi}{2})$. This can be done by showing that both $\sin(x)$ and $\cos(x)$ are continous on the interval (easy to show from definition), and appeal to algebra of limits version of continuity: since both are continous, $\tan(x)=\frac{\sin(x)}{\cos(x)}$ is continous.
Once you have shown this, then you need to use Intermediate value Theorem. Since $\tan(x)$ goes to $\pm\infty$, we can always find, for any $y\in\mathbb{R}$ you can find $x_1,x_2\in(-\frac{\pi}{2},\frac{\pi}{2})$ such that $y$ lies strictly between $\tan(x_1)$ and $\tan(x_2)$ and apply IVT to $\tan(x)$ on $[x_1,x_2]$ (or $[x_2,x_1]$ as it may be) to find that there exists $z\in(-\frac{\pi}{2},\frac{\pi}{2})$ such that $\tan(z)=y$. 

edit: Okay, juding from your response, I highly doubt if you have ever come across rigourous definitions of limits and continuity of functions, so I guess giving you a bunch of $\epsilon - \delta$ arguments would be inappropriate ( try googling them to see what I mean by epsilon delta definition).
I would start form 'definition' of $\sin(x)$ and $\cos(x)$. I reckon you most likely have met these definitions in terms of ratio between length of sides of triangle, and this definition does not make any sense, for instance, negative values of the fuctions: how would you have length being negative, and furthermore, how do you define the 'length?.
Thus one way of defining $\sin(x)$ $\cos(x)$ is to do the following: define
$\sin(x)$=$\sum\limits_{k=0}^\infty(-1)^k\frac{x^{2k+1}}{(2k+1)!}$
$\cos(x)$=$\sum\limits_{k=0}^\infty(-1)^k\frac{x^{2k}}{(2k)!}$


*

*This definition coincides with Talyor series of sin and cos function, in case you would wonder why anyone would define them in this way.


Now I am pretty sure you are happy with me saying functions like $f(x)=x$ are continuous. There is a theorem saying that: if $f,g$ are continous functions, then
i) $\lambda fg$ and 
ii) $\lambda f+\mu g$ are also continous functions for any $\lambda, \mu \in\mathbb{R}$. 
Moreover, given $g\neq0$ the fuction 
iii) $\lambda \frac{f}{g}$ is also continous on the same domain. 
This is really intuitive, I hope, and you can accept this for now.
Then you can see that both $\sin(x)$ and $\cos(x)$, as defined above are continous on the domain $(-\frac{\pi}{2},\frac{\pi}{2})$ (but justifying this requires the fact that both infinite series above are uniformly convergent on whole interval. But you can accept this now and, it must make intuitive sense to you: as you said, both $\sin(x)$ and $\cos(x)$ are real numberas and their quotient must exist continously). For instance, $x^{2k+1}$ is continuous for any k, by i) repeatedly applied to $f(x)=x$
Then since $\cos(x) \neq 0$ on the given domain, by third result $\frac{\sin(x)}{\cos(x)}=\tan(x)$ is continuous.
I think all you need really is to know what it means(by definition, that is) a function to be continuous on a given domain, and use of some power series (but not one bit of calculus). Do not worry too much even if you cant fully understand why tan is onto $(-\infty,\infty)$. Once you have right techniques it must not be really difficult.

I guess this one helps more: 
Consider a unit circle on x-y plane(radius=1). Consider a point P on the circumference, and let $\theta$ be angle measured from positive x axis in anticlockwise orientation. So a point (0,1) will have angle $\frac{\pi}{2}$. Define, for any point $P=(x,y)$ on circumference,
$\sin(\theta)=y$
$\cos(\theta)=x$
$\tan(\theta)=\frac{\sin(\theta)}{\cos(\theta)}$
Then observe how tan is onto $(-\infty,\infty)$ as $\theta$ varies on $(-\frac{\pi}{2},\frac{\pi}{2})$
A: When $\theta$ is in $dom(\tan)={\mathbb R}\setminus (\frac{\pi}{2}+\pi{\mathbb Z})$, then  $tan(\theta)$ is the slope of the line through the origin and the point $(\cos(\theta),\sin(\theta))$. Since we can make this line as close as we want to the $y$-axis (with positive as well with negative slope), then the slope can take any real value. Hence $range(\tan)={\mathbb R}$.
