Can the function $x\mapsto \frac1{x+1}$,be defined over $\mathbb R$? I am getting confused between what it means for a function to be defined over a domain and continuity.
My understanding is that a function being defined over an interval or domain means that all the elements of domain should have only one image in co-domain (it's not necessary for the image to be unique).
This means a function like $x\mapsto \frac1{x+1}$ from $\mathbb R\to\mathbb R$, which clearly is discontinuous at $x=-1 \in\mathbb R$, can still be defined over domain $\mathbb R$ because $-1$ has only $1$ image i.e $\infty$ and its co-domain is also $\mathbb R=(-\infty, \infty)$.
Am I right in my understanding , or do we need to restrict the domain to $\mathbb R\setminus\{-1\}$?
 A: First: $\infty$ and $-\infty$ are not real numbers, they are not elements of $\mathbb{R}$.
Second: to avoid confusion it is helpful to use precise language when talking about maps or functions. A map $f:A\rightarrow B$ consists of the domain $A$, the co-domain $B$ and a procedure (for example a formula) to assign an element $f(a)\in B$ to an element $a\in A$.
Third: If you want to use the formula $f(x):=\frac{1}{x+1}$ to assign a real number $f(x)$ to a real number $x$, then you can do this only for $x\in\mathbb{R}\setminus\{-1\}$, which will give you a function
$f:\mathbb{R}\setminus\{-1\}\rightarrow\mathbb{R}$.
However you can extend the function $f$ to a function $g:\mathbb{R}\rightarrow\mathbb{R}$ for example by defining $g(x):=f(x)$ for $x\neq-1$ and $g(-1):=0$. Of course the function $g$ is not continous at $-1$.
You can now see that your statement "$f$ is not continous at $-1$" is without meaning, because $f$ is not defined at $-1$. A meaningful statement is "$f$ cannot be extended continously to the whole of $\mathbb{R}$".
A: If $x = -1$, then the expression $\frac{1}{1+x}$ is meaningless; but $\frac{1}{1+x}$ is meaningful for all $x \neq -1$, so we can map $\mathbb{R} \setminus \{ -1 \}$ to $\mathbb{R}$ via $x \mapsto \frac{1}{1+x}$.
However,
you can map $\mathbb{R}$ to $\mathbb{R}$ via a function, say
$$
x \mapsto \begin{cases}\frac{1}{1+x},\ \text{if}\ x \neq -1;\\ 0,\ \text{if}\ x = -1,  \end{cases}
$$
but not via $x \mapsto \frac{1}{1+x}$ alone.
A: Strictly speaking one should say that the function $1/(x+1)$ has domain $\mathbb{R}\setminus\{-1\}$ and is continuous. It is not defined at $-1$ so it does not make sense to discuss continuity there. Sometimes this is expressed as "the function is continuous where defined".
If you are given a piecewise definition like that in Gudson example than you could say that your function, which now has domain $\mathbb{R}$, is not continuous at $-1$ as the limit for $x \rightarrow -1$ is plus or minus infinity (depending on the direction) rather than 0.
However, while improper terminology, I have often heard people saying that a function like yours is not continuous at $-1$ instead of saying that it is not defined. As far as one understand what is meant that is not a big issue, I think.
