How to find domain of a function?

94 Views Asked by At

I came across a question, where in I was asked to find out the domain of the function

$$f(x)= \sqrt\frac{(1-|x|)}{( 2-|x|)}\;$$

Now I can actually put any values and get an answer out of that function. And according to the textbook I am having with me right now, domain of relation R is nothing but the set of all first elements of the ordered pairs in a relation R from a set A to set B.

But when I went ahead and typed the above function in wolfram alpha, the domain given by them was {${x \in R : x<-2 ~{\rm or}~ -1\leq x\leq1 ~{\rm or}~ x>2}\;$}. Now why the answer is like this. I did not even tell I am defining relation from $\mathbb{R}\;$ to $\mathbb{R}\;$.

Can anyone explain why domain of the above question is ${x \in R : x<-2 ~{\rm or}~ -1\leq x\leq1 ~{\rm or}~ x>2}\;$ and not $\mathbb{C}-2\;$

1

There are 1 best solutions below

2
On

There is a lot of ambiguity in the question. Apparently, Wolfram Alpha makes some assumptions when giving you the answer that the domain is given by

$$ \operatorname{Dom}(f) = \{x \in \mathbb{R} \mid x < -2 \text{ or }-1\leq x\leq 1 \text{ or }2 < x\}. $$

First of all, if we are not asking for the maximal domain, the question is not really well-posed. To define a function, one needs to specify the domain as well, and there are many choices! What I mean is that, e.g., the two functions

$$ f \colon [0,1] \to \mathbb{R}, \quad x \mapsto x^2 $$ and $$ g\colon[-1,1] \to\mathbb{R} \quad x \mapsto x^2 $$ are different, since they are defined on different domains. So just giving a formula and asking for the domain does not really make sense. We could choose many different sets to be the domain.

So let us assume that the question is actually to find the maximal domain. Even that is not enough to be sure what the answer should be, since maybe we want to restrict the domain and the codomain to be a subset of the real numbers. That is what Wolfram alpha is doing here. (In fact, we can only say for sure that it restricts the codomain to be real.) So under the assumption that $\operatorname{Dom}(f) \subseteq \mathbb{R}, \operatorname{Cod}(f) \subseteq \mathbb{R}$, the function $f$ is only well-defined if the expression in the squareroot is a non-negative number. (In particular, we must avoid dividing by 0.)

But it is perfectly fine to assume that in fact our domain and / or our codomain (see in particular @Gerry Myerson's comment) is a subset of the complex plane $\mathbb{C}$. In that case, we can make sense of the formula of $f$ also for numbers that make the expression in the square-root a negative real number, or a complex number, in which case the maximal domain would be given by points such that the denominator of $\frac{1-|x|}{2-|x|}$ does not vanish. You already figured out that $x = 2$ is problematic, but there are in fact more points to avoid.

Wherever you found that question there should be mentioned which assumptions are made, or it should be clear from context.