[Math] How to plot this function that has a fraction that has an absolute value in the denominator

algebra-precalculusfunctionsgraphing-functions

I have this piecewise function:

$$f(x)=\begin{cases}
\dfrac{x^2-x-2}{|x-2|}, & x \neq 2 \\
0, & x = 2\text{.}
\end{cases}$$

I can't figure out how to graph it. I punched these numbers into my calculator, and it created a parabola, but I haven't been able to get there on my own without the calculator.

So far I have plotted the point $(2,0)$ on my graph, and I factored the first function to
$\dfrac{(x-2)(x+1)}{|x-2|}$
and now I am stuck. I tried multiplying both the top and bottom by $x+2$, but after simplifying I ended up with $x+1$, which I am pretty positive is not correct.

Where did I go wrong?

Best Answer

Hint: recall (ignoring the $x = 2$ case): $$|x-2| = \begin{cases} x-2, & x-2 > 0 \\ -(x-2), & x-2 < 0 \end{cases} = \begin{cases} x-2, & x > 2 \\ -(x-2), & x < 2\text{.} \end{cases}$$ So $$\dfrac{x^2-x-2}{|x-2|} = \begin{cases} \dfrac{x^2-x-2}{x-2} = \dfrac{(x-2)(x+1)}{x-2} = x+1, & x > 2 \\ \dfrac{x^2 - x - 2}{-(x-2)} = -(x+1), & x < 2\text{.} \end{cases}$$

Related Question