While finding domain and range of function f(x) = (4-x)/(x-4), domain should be not equal to 4, but this function can also be written as f(x) = -1, if considering this, there should not be any limitation of not having domain should also include 4. Are these functions equal? if not, then what is the difference between these functions?
-
What do you mean domain equal to $4?$ I think you want to say domain contains $4.$ – Sahiba Arora Jul 01 '20 at 13:55
-
sorry, my mistake, I mean to say that, domain should also include 4 – Maninder Jul 01 '20 at 13:56
-
1This is like asking if anything divided by the opposite of itself is equal to $-1$. Is this the case for all numbers? – WaveX Jul 01 '20 at 13:57
-
1no, for 0 this is not true – Maninder Jul 01 '20 at 13:59
-
Correct. And in this case we end up attempting to compute $0/0$ if we have $x=4$ in the first function – WaveX Jul 01 '20 at 14:01
-
1but, if i do some arithmetic, i got, f(x) = -1, and this does not means that we are dividing two opposite numbers. Where I am wrong? – Maninder Jul 01 '20 at 14:02
2 Answers
Given some formal expression $f(x)=(\dots)$ it is up to you to choose domain and codomain in a sensible way, depending on what you want to express with the function. There is no god-given choice that can be derived from the formal expression.
Now, assuming you want $x$ to be a real number, you see that the denominator vanishes at $x=4$, which might be a problem. So you could define $f:D\rightarrow \mathbb{R}$ on the domain $D=\{x\in \mathbb{R},x\neq 4\}$. As $f$ is continuous on $D$, a reasonable question is, whether it extends continuously across the gap, or more precisely, whether there is a continuous function $\tilde f:\mathbb{R}\rightarrow \mathbb{R}$ with $f(x) = \tilde f(x)$ for all $x\neq 4$. Indeed, this is possible, by chosing $\tilde f(x) = -1$ for all $x$. The formal expression you started with is however completely independent of this question about maps.
- 6,183
-
thank you for you answer, but, I didn't get what you said in last two lines, if possible can you elaborate more? – Maninder Jul 01 '20 at 14:11
Although there is another answer I'll post this because I had already typed it out.
It comes down to the definition you use for your function. The first expression has no meaning when $x=4$, so the point $x=4$ is excluded from the domain. The second is defined for all $x$. The two functions just happen to agree at all points that they are defined.
There are ways around this. One is to include the point $x=4$ explicitly in your first definition, for example,
$$ f(x) = \left\{ \array{ \frac{4-x}{x-4}, & \text{ when } x \neq 4 \\ -1, & \text{ when } x = 4 } \right. $$
Which causes the two version to agree everywhere. But of course if you chose a different value at $x=4%$ they would agree everywhere except when $x=4$.
Another approach is to argue using continuity. Although the first form is undefined at $x=4$, it can be extended uniquely if you add the condition that the extended function should be continuous. Then the function $y = -1$ is the unique continuous extension.
I hope this is a useful explanation.
- 4,488