# How do you graph y= tan (2x)?

May 9, 2016

Here's the graph (mousewheel to zoom):
graph{tan(2x) [-5, 5, -2.5, 2.5]}

#### Explanation:

The graph is just like tan(x), but 2 times faster. It has period $\frac{\pi}{2}$. The roots are at $n \frac{\pi}{2}$ for all integers $n$ and graph has slope 2 at these points. The asymptotes are at $\left(n + \frac{1}{2}\right) \frac{\pi}{2}$. More info here.

Generally for any fancy function $f \left(x\right)$ we can think of its internal clock (as if it is function of time)

For real number $a > 1$

• graph of $f \left(a x\right)$ is squeezed horizontally (clock is faster)
• graph of $f \left(\frac{x}{a}\right)$ is stretched horizontally (clock is slower)
• graph of $a f \left(x\right)$ is stretched vertically
• graph of $f \frac{x}{a}$ is squeezed vertically

And for positive real number $b$

• graph of $f \left(x + b\right)$ is shifted left (clock is ahead of time)
• graph of $f \left(x - b\right)$ is shifted right (clock is delayed)
• graph of $f \left(x\right) + b$ is shifted up
• graph of $f \left(x\right) - b$ is shifted down