Verifying the continuity of a piecewise-defined, composite function.

Let $$f(x)$$ be a function with domain $$\mathbb{R}$$ and assume that:

$$\cdot$$ $$f(0)=0$$ and $$f(x)>0$$ if $$x \neq 0$$.

$$\cdot$$ $$f$$ is differentiable at every point.

$$\cdot$$ $$f'(0) = 0$$ and $$f'(x) \neq 0$$ if $$x \neq 0$$. Let $$b \in \mathbb{R}$$ be a constant and define a function $$g(x)$$ by the rule

$$g(x) = \begin{cases} \frac{sin(f(x)}{2^{f(x)} - 1} & x \neq 0 \\ \newline b & x = 0\end{cases}$$

Justify whether it is possible to choose a constant $$b$$ so that $$g(x)$$ is continuous at zero. If so, state a correct $$b$$, otherwise prove that such a $$b$$ does not exist.

The following is my attempt: Since $$f(x)$$ is differentiable at every point, this implies $$f(x)$$ is continuous at every point. In order for $$g(x)$$ to be continuous at $$x=0$$, we require $$\lim\limits_{x \to 0} g(x) = \lim\limits_{x \to 0} \frac{\sin(f(x))}{2^{f(x)} - 1} = g(0) = b$$ i.e. $$\frac{\lim\limits_{x \to 0}\sin(f(x))}{\lim\limits_{x \to 0}2^{f(x)} - 1} = \frac{\sin(\lim\limits_{x \to 0}f(x))}{2^{\lim\limits_{x \to 0}f(x)}-\lim\limits_{x \to 0}1} = b$$ , which is an indeterminate form of $$\frac{0}{0}$$. Applying l'Hospital's Rule, we get that the limit is $$\lim\limits_{x \to 0} \frac{\cos(f(x))\cdot f'(x)}{2^{f(x)} \cdot f'(x) \cdot \ln 2}$$, and cancelling out $$f'(x)$$ in the numerator and denominator we get $$\lim\limits_{x \to 0} \frac{\cos(f(x))}{2^{f(x)}\cdot \ln 2} = \frac{\cos 0}{2^0 \cdot \ln 2} = \frac{1}{1 \cdot \ln 2} = \frac{1}{\ln 2}$$ Thus we conclude that it is indeed possible to choose such a constant $$b$$ such that $$g(x)$$ is continuous at $$x=0$$, we can take $$b=\frac{1}{\ln 2}$$

Is this the correct approach? I am very doubtful of my answer as I felt like I didn't make use of all the information given in the question, namely the fact that $$f'(x) \neq 0$$ if $$x \neq 0$$, but I'm also unsure of what else I missed out

(it seems to me that even if $$b=\frac{1}{ln2}$$ were the correct answer, my explanation is not sufficient to rigorously justify it)

• You DID use the information about $f'(x)\neq 0$ when you canceled $f'(x)$ from the numerator and denominator of your expression! – OnceUponACrinoid Nov 17 '18 at 6:15

Your approach is correct, and you have actually implicitly used the fact that $$f^{\prime}(x) \neq 0$$ when you used l'hopitals rule.
In particular when you divide out by $$f^{\prime}(x)$$ from the numerator and denominator it's important to know that the quotient that you get from l'hopitals rule is well defined everywhere.
Well you don't need so many hypotheses to prove that $$b=1/\log 2$$. It is sufficient to assume that $$f(x) \to 0$$ as $$x\to 0$$ and $$f(x) \neq 0$$ as $$x\to 0$$. Just write $$g(x) =\frac{\sin f(x)} {f(x)} \cdot \frac{f(x)} {2^{f(x)}-1}$$ and use substitution $$t=f(x)$$ to get desired limit of $$g(x)$$ as $$1/\log 2$$ as $$x, t$$ tend to $$0$$.