Range of $f(x)= \frac{\tan{x}}{\tan{3x}} $ 
Prove that for the values of $x$ where the following $f(x)$ is defined, $f(x)$ does not lie between $\frac{1}{3}$ and $3$. $$f(x)=\frac{\tan{x}}{\tan{3x}}$$

My Attempt:
I wrote down, $$\tan{3x}=\frac{3\tan{x}-\tan^3{x}}{1-3\tan^2{x}}$$
This reduced $f(x)$ to,
$$f(x)=\frac{1-3\tan^2{x}}{3-\tan^2{x}}$$
I don't know how to solve any further. I thought of using derivative, but the function is dicontinuous at times. How do I solve it? Any hints would be helpful.
Thanks.
 A: Note that $\tan(x)^2 \ge 0$ and 
$$f(x)= \frac{1-3\tan(x)^2}{3-\tan(x)^2} = 3+\frac{8}{\tan(x)^2-3}.$$
Clearly, for $\tan(x)^2 > 3$, $\frac{8}{\tan(x)^2-3} > 0$, and $f(x) >3$.
For $0 \le \tan(x)^2 < 3$, we have $-3 \le \tan(x)^2-3 < 0 \implies \frac{8}{\tan(x)^2-3}\le-\frac{8}{3} \implies f(x) = 3+\frac{8}{\tan(x)^2-3} \le 3-\frac{8}{3} = \frac{1}{3}.$
A: Suppose there is an $x$ so that $$1/3\leq \frac{1-3\tan^2{x}}{3-\tan^2{x}}\leq 3$$
so $$\frac{-8}{3-\tan^2{x}}\leq 0\;\;\;\;{\rm and }\;\;\;\;0\leq \frac{-8\tan^2x}{3-\tan^2{x}}$$
so $$0<3-\tan^2x <0$$ which is a contradiction.
A: \begin{align*}
f(x)&=\frac{1-3\tan^2{x}}{3-\tan^2{x}}\\
&=\frac{1-3\frac{\sin^2{x}}{\cos^2{x}}}{3-\frac{\sin^2{x}}{\cos^2{x}}}\\
&=\frac{\cos^2{x}-3\sin^2{x}}{3\cos^2{x}-\sin^2{x}}\\
&=\frac{\cos^2{x}-3(1-\cos^2{x})}{3\cos^2{x}-(1-\cos^2{x})}\\
&=\frac{4\cos^2{x}-3}{4\cos^2{x}-1}\\
&=\frac{4\cos^2{x}-1}{4\cos^2{x}-1}-\frac{2}{4\cos^2{x}-1}\\
&=1-\frac{2}{4\cos^2{x}-1}
\end{align*}
Now $0\le \cos^2{x}\le1$, so at $\cos^2{x}=0$, $1-\frac{2}{4\cdot0-1}=1-\frac{2}{-1}=3$, and at at $\cos^2{x}=1$ $1-\frac{2}{4\cdot1-1}=1-\frac{2}{3}=\frac{1}{3}$. 
To investigate further take the derivative of $f$:
$$f'(x)=-\frac{16 \cos x \sin x}{(4 \cos x^2-1)^2}$$
Now at $\cos^2x=0$, we have $\cos x=0$ and so $f'(x)=0$. Similarly at $\cos^2x=1$, we have $\sin x=0$ and so $f'(x)=0$. Hence these are both stationary points for $f(x)$.
To investigate these stationary points take the scond derivative of $f$:
$$f''(x)=-\frac{256 \cos^2x \sin^2x}{(4 \cos x^2-1)^3}+
\frac{16 (\sin^2x -\cos^2x)}{(4 \cos x^2-1)^2}$$
Now at $\cos^2x=0$, we have $\sin^2x=1$ and so $f''(x)=16$, implying $f(x)=3$ is a local minimum. Similarly at $\cos^2x=1$, we have $\sin^2x=0$ and so $f''(x)=-16$ implying $f(x)=\frac{1}{3}$ is a local maximum. Putting these two results together shows $f(x)$ cannot have any value between $\frac{1}{3}$ or $3$ as required. (See plot of $f(x)$ below for illustration of result.)

A: Let $y=\dfrac{1-3t^2}{3-t^2}$
For finite $t, y\ne3$
$\iff3y-yt^2=1-3t^2\iff t^2=\dfrac{3y-1}{y-3}$
For real $t,$ we need $\dfrac{3y-1}{y-3}\ge0$
either $3y-1=0$
or $(3y-1)(y-3)>0$
$\implies$ 
either $y>$max$\left(\dfrac13, 3\right)=?$
or $y<$min$\left(\dfrac13, 3\right)=?$
