Answer
For $f(x)$ to be continuous at every $x$, $a$ and $b$ must have these values: $a=2.5$ and $b=-0.5$
Work Step by Step
- For $x\lt-1$: $\lim_{x\to c}f(x)=\lim_{x\to c}-2=-2=f(c)$
- For $-1\lt x\lt1$: $\lim_{x\to c}f(x)=\lim_{x\to c}(ax-b)=ac-b=f(c)$
- For $x\gt1$: $\lim_{x\to c}f(x)=\lim_{x\to c}3=3=f(c)$
So $f(x)$ is already continuous on $(-\infty,-1)\cup(-1,1)\cup(1,\infty)$. We only need to examine continuities at $x=-1$ and $x=1$.
1) $x=-1$
Here $f(x)=-2$, so $f(-1)=-2$
For $f(x)$ to be continuous at $x=-1$, $$\lim_{x\to-1}f(x)=f(-1)$$ $$\lim_{x\to-1^-}f(x)=\lim_{x\to-1^+}f(x)=f(-1)$$ $$\lim_{x\to-1^-}(-2)=\lim_{x\to-1^+}(ax-b)=-2$$ $$-2=a(-1)-b=-2$$ $$-a-b=-2$$ $$a+b=2\hspace{1cm}(1)$$
2) $x=1$
Here $f(x)=3$, so $f(1)=3$
For $f(x)$ to be continuous at $x=1$, $$\lim_{x\to1}f(x)=f(1)$$ $$\lim_{x\to1^-}f(x)=\lim_{x\to1^+}f(x)=f(1)$$ $$\lim_{x\to1^-}(ax-b)=\lim_{x\to1^+}3=3$$ $$a\times1-b=3=3$$ $$a-b=3\hspace{1cm}(2)$$
Combining $(1)$ and $(2)$, we have 2 equations with 2 variables. Solving them, we come up with the following result: $a=2.5$ and $b=-0.5$
In conclusion, for $f(x)$ to be continuous at every $x$, $a$ and $b$ must have these values: $a=2.5$ and $b=-0.5$