# What is the domain and range of the function $f(x)= \frac{1}{\tan{x}}$?

The function:

$f(x)= \frac{1}{\tan{x}}$

We've written in class that the domain of this function is $\{x|x \ne n\pi\}$ where $n$ is an integer, and that the range is equal to $R - \{0\}$

Now what I dont underatand is that if the range doesn't include $0$ , shouldn't the domain exclude $x=\frac{\pi}{2}+ n\pi$, where n is an integer as well?

• The user is talking about $n\pi + \frac{\pi}2$ – user418131 Oct 12 '17 at 18:02
• Thanks for pointing it out. It's fixed now – Dahen Oct 12 '17 at 18:03
• I know, but isn't that related to the function's limit at that point rather than its value? Sure the limit exists, but the function is undefined at that point – Dahen Oct 12 '17 at 18:06
• Strictly speaking, you're right: $\tan x$ has to be defined for $1/\tan x$ to be defined. However, you may rewrite it as $\cos x/\sin x$, and this one is perfectly defined if $x\equiv \frac\pi 2\mod\pi$. – Bernard Oct 12 '17 at 18:08
• But the problem is we didn't do that for other functions where the limit existed at a certain point, but the function was undefined at it. So it's kind of weird to make this an exception – Dahen Oct 12 '17 at 18:11

Yes. The only way you could include $\frac{\pi}{2}+n\pi$ in the domain would be if you are allowing "$\infty$" as a value, and calculating $\dfrac{1}{\infty}=0$, in which case to be consistent, $0$ would also have to be in the range. Making that choice is done more commonly when working with meromorphic functions in complex analysis. But in terms of functions with real number inputs and outputs, if $\tan(x)$ isn't defined, then neither is $\dfrac{1}{\tan(x)}$. And if $a$ is a real number, then $\dfrac{1}{a}\neq 0$, which is the reason $0$ is not in the range in that context. So the statement of the domain is missing just what you said.
Added: However, the points of the form $\frac{\pi}{2}+n\pi$ are "removable singularities", and this function is "essentially" equal to $\cot(x)$. If it were simply $\cot(x)$, then it would have the domain you stated, and the range would include $0$. In some cases removing removable singularities is a good default position to take, but different instructors may disagree.
• "All real numbers except integer multiples of $\frac{\pi}{2}$", a.k.a. "$\mathbb R\setminus (\mathbb Z\frac{\pi}{2})$", a.k.a. "$\{x\in\mathbb R: \forall n\in\mathbb Z, x\neq n\frac{\pi}{2}\}$" (if you know what that notation means; $\mathbb R$=set of real numbers, $\mathbb Z$ = set of integers, $\forall$ = for all), or any other way that clearly conveys the same meaning to whomever needs to know what you mean. – Jonas Meyer Oct 12 '17 at 18:22