# Finding points of continuity on piecewise function

For what values of $a$ and $b$ is the function continuous at every $x$?

$$\displaystyle f(x)=\begin{cases} -1 & \text{if }\;\; x \leq -1\\ ax+b & \text{if }\;\; -1<x<3\\ 13 & \text{if} \;\;\;x \geq3 \end{cases}$$

The answers are: $a=\frac{7}{2}$ and $b=-\frac{5}{2}$.

I have no idea how to do this problem. What comes to mind is: to equate the inequality expressions with the function values. Does that make sense? But then by equating, would I be equating the function values with points of continuity or discontinuity?

Also, the limit is a necessary condition for continuity, so could I equate a right-hand limit with a left-hand limit, and if they match, that would be the point of continuity?

I'm really unsure about how to execute this problem, steps and explanations would be greatly appreciated.
Thank you.

• HINT: A graph is continuous if, informally, you can draw a line on your graph without lifting your pencil up. – Don Larynx Nov 6 '13 at 3:45
• @DonLarynx OK, thanks...but I am interested in solving it without graphing/drawing. – Emi Matro Nov 6 '13 at 3:50
• SECOND HINT: Hints are tips, not answers. What can you conclude about a piece-wise function if its graph is one straight line? – Don Larynx Nov 6 '13 at 3:51

If you think about the graph of this function, it is a horizontal line on $(-\infty,-1]$, a line with some nonzero slope on $(-1,3)$, and then another horizontal line on $[3,\infty)$.
What you are trying to do is find the equation of the line segment on $(-1,3)$ so it matches your two horizontal lines at the endpoints. That is, so $f(-1) = -1$ and $f(3) = 13$.
• OK, thanks! But how would I solve for $a$ and $b$? – Emi Matro Nov 6 '13 at 4:03