# Graph of the function (2x^2-2)/(x^2-1)

I am learning precalculus and my precalculus book gives this equation:

for this graph:

But when I enter that equation into some online graph tool like Symbolab ( https://www.symbolab.com/graphing-calculator ) I get this graph:

It seems that (many) online calculators cancel (x+1)(x-1) in numerator/denominator before drawing a graph.

So, which graph of those 2 is "correct"? Why?

P.S. My previous question was downvoted and removed as "not interesting for math community". That was very rude having in mind that I am beginner, looking for a help. Perhaps I should join some other forum for math beginners but I don't know which and where?

The given diagram appears to be a graph of the function $$g(x)=\frac{2x^2-1}{x^2-1}$$ Although the supplied function is $$f(x)=\frac{2(x^2-1)}{x^2-1}=2\qquad\forall x\in\mathbb{R}\setminus\{-1,1\}$$ so the second diagram is correct.
If $$x$$ equals $$-1$$ or $$1$$, $$\frac{2x^2-2}{x^2-1}$$ does not exist. Otherwise, it is perfectly fine to divide top and bottom by $$x^2-1$$. That yields the second graph: $$y=2$$ with gaps at $$x=\pm1$$.
I will second Peter Foreman's guess at the function of $$\frac{2x^2-1}{x^2-1}$$. The first graph appears to have asymptotes at $$x=\pm1$$ and $$y=2$$. $$\frac{2x^2-1}{x^2-1}=2+\frac1{x^2-1}$$ can get close to $$2$$ without ever equaling it and is equal to $$1$$ at $$x=0$$.
• If 𝑥 does not equal −1 or 1, the fraction does not exist Don't you mean that the fraction does not exist if x DOES equal -1 or 1? – numbermaniac Aug 19 at 5:13