Answer
For $g(x)$ to be continuous at every $x$, $b=0$ or $b=-2$.
Work Step by Step
$g(x)=\frac{x-b}{b+1}$ for $x\lt0$ and $g(x)=x^2+b$ for $x\gt0$
For $g(x)$ to be continuous at every x, $g(x)$ must be continuous at every point on its interval, which is $(-\infty,0)\cup(0,\infty)$
We would examine 3 intervals:
- For all $x\in(−\infty,0)$, $g(x)=\frac{x-b}{b+1}$, and
$$\lim_{x\to c}\frac{x-b}{b+1}=\frac{c-b}{b+1}=f(c)$$
So $g(x)$ is continuous on $(−\infty,0)$
- For all $x\in(0,\infty)$, $g(x)=x^2+b$, and
$$\lim_{x\to c}(x^2+b)=c^2+b=f(c)$$
So $g(x)$ is continuous on $(0,\infty)$
- For $x=0$:
As $x\to0^-$, $g(x)=\frac{x-b}{b+1}$, so $$\lim_{x\to0^-}g(x)=\lim_{x\to0^-}\frac{x-b}{b+1}=\frac{0-b}{b+1}=-\frac{b}{b+1}$$
As $x\to0^+$, $g(x)=x^2+b$, so $$\lim_{x\to0^+}g(x)=\lim_{x\to0^+}(x^2+b)=0^2+b=b$$
For $g(x)$ to be continuous at $x=0$, $\lim_{x\to0}g(x)$ must exist, which requires that $$\lim_{x\to0^+}g(x)=\lim_{x\to0^-}g(x)$$ $$-\frac{b}{b+1}=b$$ $$b+\frac{b}{b+1}=0$$ $$b\Big(1+\frac{1}{b+1}\Big)=0$$ $$b=0\hspace{1cm}\text{or}\hspace{1cm}1+\frac{1}{b+1}=0$$ $$b=0\hspace{1cm}\text{or}\hspace{1cm}\frac{1}{b+1}=-1$$ $$b=0\hspace{1cm}\text{or}\hspace{1cm}b+1=-1$$ $$b=0\hspace{1cm}\text{or}\hspace{1cm}b=-2$$
In conclusion, for $g(x)$ to be continuous at every $x$, $b=0$ or $b=-2$.