I'd like to ask you about the way to plot discontinuous function $\frac{2-x}{|x-2|}(x + 2)$.
What Wolfram Alpha produces:
"DIY" version is below. How to achieve similar effect in Mathematica?
Use Exclusions and Epilog.
Plot[(2 - x) (x + 2)/Abs[x - 2], {x, 0, 4}, Exclusions -> {2}, Epilog -> {Red, Text[○, #] & /@ {{2, 4}, {2, -4}}}] or
Plot[f[x], {x, 0, 4}, Exclusions -> {2}, Epilog -> {Red, Text[○, #] & /@ { {2, Limit[f[x], x -> 2, Direction -> 1]}, {2, Limit[f[x], x -> 2, Direction -> -1]}}}]