# Continuity of a piecewise function

Where is the function $$f: \mathbb R\to \mathbb R,\quad f(x)=\begin{cases}x^2 & x\le 0 \\x+1 & x\gt0\end{cases}$$ continuous?

Question from my real analysis class. I know that it is discontinuous at $0$, and i know how to prove that. i also know its continuous everywhere else, but not sure what the proof of that is. can i just say its a polynomial if its on the interval $(0,\infty)$ or $(-\infty,0)$, so its continuous on those intervals?

• "can i just say its a polynomial if its on the interval (0,infinity) or (-infinity,0), so its continuous on those intervals?" - i would say: yes. (and as you remarked, it is discontinuous at x=0.) – Zoltan Zimboras Feb 14 '14 at 3:27

Yes, provided you already have the standard result that polynomials are continuous.

If you are not allowed to use the above fact then use the following to prove the above statement:

1. $f(x)=x$ is continuous
2. If $f(x)$ and $g(x)$ are both continuous at a point, then so is $f(x)$ times $g(x)$. Use this to conclude that all powers of $x$ are continuous
3. If $f(x)$ is continuous at a point then for any constant $c$, $c f(x)$ is continuous at that point
4. If $f(x)$ and $g(x)$ are continuous at a point, then so is $f(x)+g(x)$.

Combine 2, 3, and 4 to prove that all polynomials are continuous

• Note that 3 follows immediately from 2. – Baby Dragon Feb 14 '14 at 5:24
• Good point. Actually I wanted to write $f(x)=c$, a constant is continuous (you need this). – user44197 Feb 14 '14 at 14:37