Graphing Continuous Functions

My question is How do I graph a continuous function when I am only given restrictions? For example, Sketch the graph of a function that is continuous everywhere except at x=3, and is continuous from the left at x=3. I have another problem to solve, but if I can get help with this one, I am sure I will get the other one as well.

-

The first thing to realize is that there are infinitely many different correct answers. Instead of drawing a sketch, I’ll give a couple explicitly. Let’s start with a function $f(x)$ that’s continuous at every real number. It doesn’t matter what $f$ is, so let’s make it very simple: $f(x)=0$ for all $x\in\Bbb R$. Now we want to make it discontinuous at $x=3$; one simple way to do that is to make it jump at $x=3$. For instance, we could set

$$g(x)=\begin{cases} 0,&\text{if }x<3\\ 1,&\text{if }x>3\\ ?,&\text{if }x=3\;. \end{cases}$$

This function $g$ will certainly be discontinuous at $x=3$ no matter how we fill in the question mark, because

$$\lim_{x\to 3^-}g(x)=0\quad\text{ and }\quad\lim_{x\to 3^+}g(x)=1\;;$$

if $g$ were continuous at $x=3$, the two one-sided limits would have to be equal.

Now what about $g(3)$? We want $g$ to be continuous from the left at $x=3$, which means that we want

$$g(3)=\lim_{x\to 3^-}g(x)=0\;.$$

Thus, the desired function is

$$g(x)=\begin{cases} 0,&\text{if }x\le 3\\ 1,&\text{if }x>3\;. \end{cases}$$

Note that I could have pulled the same trick with any continuous function $f$ by defining

$$g(x)=\begin{cases} f(x),&\text{if }x\le 3\\ f(x)+1,&\text{if }x>3\;. \end{cases}$$

-

In order to sketch such a function, you need to come up with a function with this property.

I suggest the function $f : \mathbb{R} \rightarrow \mathbb{R}$ defined by

$f(x) = \begin{cases} 1 & \quad x \leq 3 \\ -1 & \quad x > 3 \end{cases}$

It is clear that the function is continuous everywhere except $3$. It is continuous from the left since $\lim_{x \rightarrow 3; x\leq 3} f(x) = 1 = f(3)$. It is not continuous at the $3$ since the right limit $\lim_{x \rightarrow x; x > 3} f(x) = -1$.

-
Actually, one can produce a sketch without having an explicit function. Just draw something that’s continuous on $(\leftarrow,3]$ and $(3,\to)$ and has a jump at $x=3$; this is typically indicated by making a heavy dot at the righthand end of the left half of the graph and an open circle at the lefthand end of the right half. – Brian M. Scott Jul 14 '12 at 19:27