Why are Desmos and W/A not plotting the graph correctly for a rational function?

1.9k Views Asked by At

I had this question to plot this rational fraction function:

$$y=\frac{x-2}{x^2-4}$$ With asymptotes at $x=2,-2$

Now, I did immediately realise that this could be simplified to: $$y=\frac{1}{x+2}$$

But, when one immediately simplifies it into this form, wouldn't one lose one of the asymptotes at $x=2$?

When I went to check online, on both Desmos and WolframAlpha, both gave this result (which does not have the x=2 asymptote):

Enter image description here

This is the way I thought was correct:

Enter image description here

I further justify myself by subbing in x = 2 into the original formula, which produces a divide by zero case.

Could someone point me in the right direction or is Desmos/Wolfram at fault here?

2

There are 2 best solutions below

6
On BEST ANSWER

Let $f(x)=\frac{x-2}{x^2-4}$. Let us prove that there is an asymptote at $x = -2$:

$$\lim_{x\to -2^+}f(x)=\lim_{x\to -2^+}\frac{x-2}{x^2-4} = \lim_{x\to -2^+}\frac{1}{x+2} = +\infty,$$

$$\lim_{x\to -2^-}f(x)=\lim_{x\to -2^-}\frac{x-2}{x^2-4} = \lim_{x\to -2^-}\frac{1}{x+2} = -\infty.$$

However, there is actually no asymptote at $x = 2$. Your mistake is that you didn't check the limit:

$$\lim_{x\to 2}f(x)=\lim_{x\to 2}\frac{x-2}{x^2-4} = \lim_{x\to 2}\frac{1}{x+2} = \frac 14.$$

As you can see, the limit is not $\pm\infty$, which would be needed for it to be an asymptote. Actually, $f$ can be extended continuously:

$$g(x):=\begin{cases} f(x),& x\neq 2\\ \lim_{t\to 2}f(t),& x= 2\\ \end{cases}$$ and immediately it follows that $g(x) = \frac{1}{x+2}$.

This explains why the graph of $f$ looks like the graph of $g$; the only difference is that one point must be erased from the graph: $(2,\frac 14)$. If you want to emphasize it, this would be a way to do it:

enter image description here

If you want similar example, plot function $x\mapsto \frac{\sin x}x$ and observe that there is no asymptote at $x = 0$.

0
On

To complement Ennar's excellent answer, a less formal reason why there's not a singularity at $x = 2$ is that, although the denominator of the fraction $\frac{x-2}{x^2 - 4}$ equals zero there, the numerator does too. This means that you effectively have $\frac 0 0$ (which is undefined rather than equal to $\infty$) so you need to take the limit to work out the value of the function at $x=2$, and proceed as Ennar described.