$\frac{(x-1)(x+1)}{ (x+1)} \rightarrow (x-1)$ Domain Change

Forgive my ignorance. The below seems 'inconsistent'. If canceling the $(x+1)$ is 'legal', how does the domain change? I realize it does, but would someone be so kind as to provide an explanation?


$$ \frac{x^2 - 1}{x + 1} \mbox{ is undefined when } x = -1 $$

Its domain (the values that can go into the expression) does not include $ -1 $.

Now, we can factor $ x^2 - 1 $ into $ (x - 1)(x + 1) $ so we get:

$$ \frac{(x - 1)(x + 1)}{(x + 1)} $$

It is now tempting to cancel $ (x + 1) $ from top and bottom to produce:

$$ x - 1 $$

$$ \mbox{Its domain now } \textbf{does} \mbox{ include } -1 \mbox{.} $$

But it is now a different function because it has a different domain.


Thanks!


The function $f$ given by $$ f(x):=\frac{(x-1)(x+1)}{x+1} $$ with values in $\mathbb{R}$ can't be defined at $x:=-1$ (because the denominator will be $0$). Hence the domain of $f$ is at most $\mathbb{R}\backslash\{-1\}$.

The function $g$ given by $$ g(x):=x-1 $$ with values in $\mathbb{R}$ is defined for every $x\in\mathbb{R}$, so its domain is $\mathbb{R}$.

Thus, as functions, $f\neq g$ because their domains are not the same.

Perhaps your confusion comes from the fact that $$ \lim_{x\to-1}f(x)=\lim_{x\to-1}\frac{(x-1)(x+1)}{x+1}=\lim_{x\to-1}(x-1)=\lim_{x\to-1}g(x) $$ But this is true because the limit of a function as $x\to-1$ is completely independent of the value of the function at $-1$ and $f(x)=g(x)$ for every $x\in\mathbb{R}\backslash\{-1\}$.


Simply put, the first equation's domain does not include $-1$, while the second equation does.


Consider the three different functions.

The first function is the function that you original function. $$f:\mathbb{R} \setminus\{ -1\} \rightarrow \mathbb{R}$$ $$f(x)=\frac{(x-1)(x+1)}{x+1}$$

The second function is as follows. $$g:\mathbb{R} \setminus\{ -1\} \rightarrow \mathbb{R}$$ $$g(x)=x-1$$

It is actually the same function as $f$. It is alright to cancel the common terms from both numerator and denominator., as long as you know what you are doing and keeping track of your domain.

Now the third function is not exactly the same function as $f$ but it is very close, with an extra point in the domain. $$h:\mathbb{R} \rightarrow \mathbb{R}$$ $$h(x)=x-1$$

I think the book isn't very clear as it does not state the domain of the functions explicitly and just look at the formula and take the largest possible subset of real numbers.

You are right that in cancelling out common terms, the domain shouldn't change.