# find the constants a and b so the function is continuous on a real line

piecewise function:
f(x)={5, if x<= -2; ax+b, if -2<x<3; -5, if x>=3

I know the limit x-->2- is 5 and limit x-->3+ is -5. I don't know how to find the constants

1. i have a=-2 and b=1

2. Forget about limits for a while and just consider the simple facts:
f(x) = 5 starts at -2 and goes to the left
then
f(x) = -5 starts at 3 and goes to the right.
Those two lines are "linked" by a straight line
from (-2,5) to (3,-5)
Let's just find that line .....
slope = -10/5 = -2
so (y-5) = -2(x+2)
y-5 = -2x - 4
y = -2x + 1
comparing with y = ax + b
a = -2 , b = 1