Different functions or same functions

I have a question in my booklet :

$f(x) = \frac{x}{x}$ and $f(x) = 1$ are different or not why or why not?

I can only think that the functions are different because the second one is a constant function irrespective of the value of $x$.

But on evaluating the first function we will always get $1$. and in the first function is undefined at $x = 0$ while the second function is defined at $x = 0$.

Is there any other way of thinking it mathematically and my instructor never covered anything related to this. Kindly help.

• The functions have the same range (they both take on the value $1$ identically) but as you noted the first one is obviously undefined at $x=0$ so the functions have different domains. If you restrict the domain of the second one to exclude $0$ then they are the same function, otherwise no. – Nap D. Lover Apr 15 '16 at 16:07
• You need to specify a domain. If the domain does not include $0$ then both are the same. If the domain does include $0$, then you need to specify what $0 \over 0$ means. – copper.hat Apr 15 '16 at 16:14
• @LoveTooNap29 I think you should write it as an answer (elaborating a bit) so that I can accept it. – Hisenberg Apr 15 '16 at 16:15
• @user109256 sure, but is Max's answer below not sufficient? It's essentially what I'd write anyway. Youd have to be more specific on what you'd want me to elaborate on. – Nap D. Lover Apr 15 '16 at 16:22

Two functions are identical if they have the same domain, and if they have the same functional values at every point in that domain. If $f(x) = \frac{x}{x}$ and $g(x) = 1$, then f(x) = g(x) for all x within the domain of f, but as LoveTooNap29 pointed out, their domains are different. Therefore the functions are not identical.

• Nothing in the OP actually says that the domains of $f$ and $g$ are different. It's up to speculation, the only thing that's clear is that $f$ must not have $0$ in its domain, but what either of the functions does have in its domain would first need to be specified. – leftaroundabout Apr 15 '16 at 20:05
• @leftaroundabout: At OP's level, functions have a domain of $\mathbb{R}\setminus \text{all the values at which the function is undefined}$ unless stated otherwise. – Deusovi Apr 16 '16 at 2:03
• @Deusovi: perhaps, but IMO that's a pretty big failure of education then. It should be made clear early on that real-valued functions are very much just a special case – important, but by no means a sensible “default for everything”. – leftaroundabout Apr 16 '16 at 9:15

It depends on how you phrase the question. If you say

Let $f,g : \mathbb{Q}\setminus\{0\} \to \mathbb{Q}$, $$f(x) = \frac{x}{x}, \qquad g(x)=1$$

then $f$ and $g$ are in fact equal. This is also true if you replace the rational numbers $\mathbb{Q}$ with the reals, or with complex numbers... as long as you do it consistently for both functions.

However, because $g$ doesn't actually use its argument, there's no reason to assume its domain should be $\mathbb{Q}\setminus\{0\}$. I could write

Let $g : \{1, 2, (0,5), i,\mathrm{cucumber}\} \to \mathbb{R}$, $$g(x)=1$$

or, more reasonably, just

Let $g : \mathbb{Q} \to \mathbb{Q}$, $$g(x)=1.$$

Then, $g$ would be a completely different kind of object from $f$, and depending on your philosophy they would either be nonequal or it wouldn't even make sense to ask whether they're equal.

note that $$\frac{x}{x}=1$$ if $$x\ne 0$$ and $$1=1$$ for all real $$x$$

• This only proves the ranges are equal so the functions are equal everywhere they are defined. The domains remain different, however, so theyre technically different functions. – Nap D. Lover Apr 15 '16 at 16:21

Technically, $f(x)=x/x$ does not equal $g(x)=1$, because $f(x)$ is technically undefined at 0. In the same way, the sinc function technically does not equal $\sin(x)/x$.

However this is merely a technicality: the limit at 0 exists, and you can redefine $f(x)$ to equal its limit at 0, in which case $f(x)=g(x)=1$. Usually, this is exactly what you should do.