# Continuous function?

#### Cbarker1

##### Active member
Let $f=tan(2x)/x$, x is not equal to 0.

Can the f be defined at x=0 such that it is continuous?

CBarker1

#### ThePerfectHacker

##### Well-known member
Compute limit at $0$. What do you get?

I got 2.

#### ThePerfectHacker

##### Well-known member
So,
$$\lim_{x\to 0} \frac{\tan 2x}{x} = 2$$
Now define the function,
$$f(x) = \left\{ \begin{array}{ccc}(\tan x)/x & \text{if} & x\not = 0 \\ 2 & \text{if}& x=0 \end{array} \right.$$

This function is continous everywhere because at $0$ we have $\lim_{x\to 0}f(x) = f(0) = 2$.