# Continuity of piecewise function using limits

I am stuck on this calculus question. I have a piecewise function as follows:

$f(x) = 1/(x+2), \quad x \neq -2$ or

$f(x) = 1, \quad x = -2$

The question is if this function is continuous at $x = -2$. I believe it is, but I have to prove using LHS and RHS limits, which I am not too sure how to do. Wouldn't both limits in this case approaching -2 from the left side and right side both equal 1?

Thanks!

• Why do you think this limit exists and equal to 1? Try to plot the function to get some intuition – Ofek Gillon May 25 '17 at 19:31
• Oh. Okay, upon plotting it, I see now that approaching -2 from the left hand side, the function diverges to negative infinity, and approaching -2 from the right-hand side the function diverges to positive infinity. Therefore, the function is discontinuous at x = -2. That is strange, because it is defined at x = -2! – Thomas Moore May 25 '17 at 19:36
• Why is it strange? The fact that a function is defined doesn't imply it is continuous, and if that were the case, there wasn't any motivation defining a new term 'continuous' :) – Ofek Gillon May 25 '17 at 19:39
• Okay, that makes sense! Thanks! – Thomas Moore May 25 '17 at 19:40
• You're welcome! Tip for writing math: if you want to write a fraction, you can use the \frac{}{} option. for example, \frac{x^2}{y+5} = $\frac{x^2}{y+5}$ – Ofek Gillon May 25 '17 at 19:42