# Suppose I have a function $y=x+1$, then is this function the same as $y=\frac{ x^2+x}{x }$?

Suppose I have a function

$y=x+1$

Then is this funcion the same as

$y=\frac{ x^2+x}{x }$ ?

The domain of x in the first function is $R$ and in the second function is $x\neq 0$.

-
Then, they are the same except at one point; $\dfrac{x^2+x}{x}$ has a removable discontinuity. Here is a related question. – J. M. Jul 14 '12 at 11:01
If you're defining domain, then the functions are same, imho. – hjpotter92 Jul 14 '12 at 11:02
So, what is a function, for you? If a function is a formula, then you may identify the two formulae. If a function is a formula together with a domain (and a codomain), then these are distinct functions. – Siminore Jul 14 '12 at 13:01

In the strict sense: they are not the same

By definition a function is a triple $(f,X,Y)$ such that $X,Y$ are sets and $f$ is a subset of $X\times Y$ with the property that for each $x$ etc.

Two functions $(f,X,Y)$ and $(g,Z,W)$ are - again by definition - equal if $f=g$, $X=Z$ and $Y=W$

If you have the functions $$f:\mathbb R \rightarrow \mathbb R \quad f(x)=1$$ and $$g:\mathbb R\setminus \{0\} \rightarrow \mathbb R \quad g(x)={x\over x}=1$$ then $f$ and $g$ are not the same function. All you can say is that $$f(x)=g(x) \quad\text{for all } x \in \mathbb R\setminus \{0\}$$ Just keep in mind that equality of functions is a tiny bit more than $f(x)=g(x)$.

-

Just to say what Blah said a bit differently.

You can think of a function as a rule that takes an element in a set $A$ to and element in a set $B$. We sometimes write: $f: A \to B$. The key thing here is that a function is always given with a domain ($A$). These have to be the same for us to say that two functions are the same.

So for example. The function $f: \mathbb{R} \to \mathbb{R}$ given by $f(x) = x$ is not the same as the function $g(x): [0,\infty) \to \mathbb{R}$ given by $g(x) = x$. So even though they have the same expression their domains differ and so they are not the same function.

As a side note we often suppress the domain and just assume that the domain is the set of all the elements where the expression makes sense. So in your case the domain of the first function $y = x + 1$ is all the real numbers, whereas the domain of the second function $\frac{x^2 + x}{x}$ is all the real numbers except zero.

-