Continuity of a Piecewise Function

Let f: R->R be defined by

f(x)={x^{2} for x in Q, x+2 for x not in Q}

Find all points (if any) where f is continuous.

We learned that a function is continuous at a point where f(x)=limit as x->p f(x). I'm just not really sure how to go about finding these.

I think for all x in Q this function is discontinuous for all x not equal to zero, since that will be only case where f(x) will equal its limit. Is this correct thinking?

Re: Continuity of a Piecewise Function

Quote:

Originally Posted by

**renolovexoxo** Let f: R->R be defined by

f(x)={x^{2} for x in Q, x+2 for x not in Q}

Find all points (if any) where f is continuous.

Is $\displaystyle f$ continuous at $\displaystyle x=2~?$

Re: Continuity of a Piecewise Function

f is continuous at the points satisfying x^2=x+2