13

A function $f:X\rightarrow Y$ maps each $x\in X$ to some $y \in Y$. So consider $\tan{\frac{\pi}{2}}$ for which $\tan(x)$ is undefined, so in this case, $\tan(x)$ does not map to an element of its range. This conflicts with my understanding of what a function is. Why do we still consider $\tan(x)$ a function?

Newb
  • 17,672
  • 13
  • 67
  • 114
  • By the way, $\tan(x)$ is a scalar, $x\mapsto \tan(x)$ and $\tan$ are functions. As a student I thought being so meticulous was useless. I changed my mind when I started to teach... – anderstood Oct 27 '14 at 18:23

3 Answers3

22

The set $X$ in your definition is the domain of the function. The domain of $\tan(x)$ is typically taken to be

$$ X=\bigcup_{k\in\Bbb{Z}} \left(-\frac{\pi}{2}+k\pi,\frac{\pi}{2}+k\pi\right) $$

Thus $\pi/2\notin X$, and so don't need to assign a value to $\tan(\pi/2)$ (or for any $\pi/2+k\pi,k\in\Bbb{Z}$ for that matter).

icurays1
  • 17,161
  • I see. I thought the domain of $\tan(x)$ would be $\mathbb{R}$, conveniently expressed in Radians. – Newb Oct 18 '13 at 15:00
  • 4
    Not typically. For the same reason that the domain of $1/x$ is taken to be $(-\infty,0)\cup(0,\infty)$. Most functions you're probably familiar with have domains that are actually subsets of $\Bbb{R}$. – icurays1 Oct 18 '13 at 15:03
  • 8
    Failure to specify domain is failure to specify a function. – ncmathsadist Oct 18 '13 at 15:30
  • @ncmathsadist if you are right about the domain up to a null set, then it's probably good enough. – Tim Seguine Oct 18 '13 at 18:35
6

When you say $f$ is a function, you should specify its domain (and codomain, but that's not really the issue here). If the domain is not specified, we take it to be the largest set on which the expression is defined. As you've pointed out $\tan$ is not defined at $\frac{\pi}{2}$ (so you should not even write $\tan\frac{\pi}{2}$ as this means the value of the function $\tan$ at the point $\frac{\pi}{2}$). Furthermore, $\tan$ is undefined at $\frac{\pi}{2} + k\pi$ for every integer $k$. Therefore, the largest set on which $\tan$ is defined is $\mathbb{R}\setminus\{\frac{\pi}{2}+k\pi\mid k \in \mathbb{Z}\}$; this is the domain of $\tan$ if the domain is unspecified.

  • Good to know - specifically the definition of the domain as $\mathbb{R} \backslash { \frac{\pi}{2} + k\pi | k \in \mathbb{Z} } $ strikes me as pleasantly precise. – Newb Oct 18 '13 at 15:09
  • 2
    As I said, this is the domain if it is not specified. The behaviour of the function changes if we use a different domain. For example, $\tan$ on $(-\frac{\pi}{2}, \frac{\pi}{2})$ is injective (one-to-one) and surjective (onto), and therefore has an inverse $\arctan : \mathbb{R} \to (-\frac{\pi}{2}, \frac{\pi}{2})$. – Michael Albanese Oct 18 '13 at 15:15
-1

Actually that is the definition of a continuous function. The definition for a function is that for all inputs there is exactly one output. In a non-continuous function, when the input doesn't map to anything, it is not in the domain. So if f(pi/2) is undefined, pi/2 is not in the domain and therefore not an input.

linds
  • 1
  • 2
    Nothing in the question, or in your answer, relates to continuity. Why are you bringing it up? You write "that is the definition of a continuous function", but no one has written anything remotely similar to the definition of a continuous function. – dfeuer Jan 23 '14 at 07:40
  • 1
    I think you may be thinking (in a fuzzy fashion) about the distinction between a function and a partial function. In any case, I suggest you delete this answer. – dfeuer Jan 24 '14 at 06:09