<s>[INST] 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.
 [/INST] Since $f(x) = a^x + b$ will be continuous on $|x| < 1$ for $a > 0$, we only need to match up this portion of $f$ with it's definition on $|x| \geq 1$ at the endpoints $x = \pm 1$. Evidently, $f(-1) = -1$ and $f(1) = 1$. So we need $a^{-1} + b = -1$ and $a + b = 1$. Using the latter gives $b = 1 -a$, so substitution yields:
$$
\frac{1}{a} + 1 - a = -1.
$$
This becomes:
$$
a^2 -2a -1 = 0.
$$
A quick application of the quadratic formula yields $a = 1 \pm \sqrt{2}$, and we can discard $a = 1 - \sqrt{2}$ since we require $a > 0$. Thus,
$$
a = 1 + \sqrt{2},
\; \; \; \; \; \;b = -\sqrt{2}.
$$
Indeed, the function:
$$
f(x) = \begin{cases} (1+\sqrt{2})^x - \sqrt{2} & |x| < 1, \\
x & |x| \geq 1, \end{cases}
$$
is continuous, as shown below:

</s>