# prove this function is continuous on $\Bbb R$

Hi just need some help with the following question.

Is the function $$f(x)= \begin{cases} \displaystyle{\frac{e^x-2^x}{x+x^3}},&\text{for x\neq 0}\\ 1-\ln 2,&\text{for x=0} \end{cases}$$ continuous on $\Bbb R$?

I'm just confused with what theorem to use to prove it. I've tried putting the two equal to each other and computing the limit as $x$ approaches zero but I'm not sure if thats the right thing to do?? Any hints/advice would be great, thanks.

original image

• $g(x)=(e^x-2^x)/(x+x^3)$ is continuous on $\mathbb R$ \ $\{0\}$ so $f$ is continuous on $\mathbb R$ iff $\lim_{x\to 0} f(x)=f(0)=1-\ln 2.$ – DanielWainfleet Apr 18 '17 at 23:36

## 1 Answer

The function $$f(x)=\frac{e^x-2^x}{x+x^3}$$ is clearly continuous for all $x\neq 0$. Now, using the L'Hospital's Rule we get $$\lim_{x\to 0}\frac{e^x-2^x}{x+x^3}=\lim_{x\to 0}\frac{e^x-2^x\ln 2}{1+3x^2}=1-\ln 2=f(0)$$ which shows that $f$ is continuous at $x=0$.