Continuity of $a^x+b$ with $a, b \in \mathbb R$ Let $a,b \in  \mathbb{R}$ with $a > 0$. find $a$, $b$ so the function would be continuous
$$
f(x) = \begin{cases} a^x + b, & |x|<1 \\
x, & |x| \geq 1 \end{cases}
$$
I got $b = -a^x+x$ as my answer, but I'm unsure.

Just do the definitions.  $x$, and $a^x + b$ are continuous so the the only possible point of discontinuity is as $|x| = 1$.
If $f$ is continuous at $x = 1$ then $\lim_{x\to 1^-} f(x) = \lim_{x\to 1^-}a^x + b = a+b$ must equal $f(1) = x|_1 = 1$  which must equal $\lim_{x\to 1^+} f(x) = \lim_{x\to 1^+} x = 1$.  So we must have $a+b = 1$
If $f$ is continuous at $x =-1$ then $\lim_{x\to -1^+} f(x) = \lim_{x\to -1^+} a^x + b = \frac 1a + b$ must equal $f(-1) = x|_{-1} = -1$ which must equal $\lim_{x\to -1^-}f(x) = \lim_{x\to -1^-}x = -1$.  So we must have $\frac 1a+b =-1$.
So $a+b =1$ and $\frac 1a + b = -1$.  So $b= 1-a=-1-\frac 1a$ so $a \ne 0$ and $1-a=-1-\frac 1a$ so $a-a^2=-a-1$ so $a^2-2a-1=0$ so $a =\frac {2 \pm\sqrt{4+4}}2=1\pm \sqrt 2$.
So $b =1-(1\pm \sqrt 2)=\mp \sqrt 2$ [Note: $b= -1-\frac 1{1\pm\sqrt 2} = -1-\frac {1\mp \sqrt 2}{(1\pm \sqrt 2)(1\mp \sqrt 2)} = -1-\frac {1\mp \sqrt 2}{1-2}=-1+(1\mp \sqrt 2= \mp \sqrt 2$]
so we can have $a = 1+\sqrt 2$ and $b= -\sqrt 2$ (then $\lim_{x\to 1^-} f(x) = (1+\sqrt 2)^1 + (-\sqrt 2) = 1+\sqrt 2 -\sqrt 2 = 1$ and $\lim_{x\to -1^+} f(x) = \frac 1{1+\sqrt 2} -\sqrt 2 =\frac 1{1+\sqrt 2}\frac {1-\sqrt 2}{1-\sqrt 2} - \sqrt 2=\frac {1-\sqrt 2}{1-2} - \sqrt 2 = (-1+\sqrt 2)-\sqrt 2 = -1$)
or we can have $a=1-\sqrt 2$ and $b = \sqrt 2$ (then $\lim_{x\to 1^-} f(x) = (1-\sqrt 2)^1 + \sqrt 2 = 1$ and $\lim_{x\to -1^+} f(x) = \frac 1{1-\sqrt 2} +\sqrt 2 =\frac 1{1-\sqrt 2}\frac {1+\sqrt 2}{1+\sqrt 2} + \sqrt 2=\frac {1+\sqrt 2}{1-2} + \sqrt 2 = (-1-\sqrt 2)+\sqrt 2 = -1$)
