Prove that $f(x)= \begin{cases} \frac{x+1}{e^{2x}+1}, & x≠0 \\ 1/2, & x=0 \end{cases}$ is continuous and differentiable.

183 Views Asked by At

Let's say that you want to prove that $f(x)=\begin{cases} \displaystyle \frac{x+1}{e^{2x}+1} &\text{if}\, x \ne 0\\ 1/2 &\text{if}\, x = 0\end{cases}$ is differentiable and continuous for $f:\mathbb R \to \mathbb R$. Is it enough to state that, since we know that linear and exponential functions are continuous then if you divide one by the other the result would still be a continuous function?

Then to show that $f(x)$ is differentiable, you'd have to use the formula $$\lim\limits_{h \to 0} \frac{f(x+h)-f(x)}{h}$$ $$=\lim\limits_{h \to 0} \frac{(\frac{x+1}{e^{2x}+1}+h)-(\frac{x+1}{e^{2x}+1})}{h}$$ $$=\lim\limits_{h \to 0} \frac{\frac{x+1}{e^{2x}+1}+h-\frac{x+1}{e^{2x}+1}}{h}$$ $$=\lim\limits_{h \to 0} \frac{h}{h}=1$$

Is that enough to show that $f(x)$ is differentiable and continuous? Also how would the fact that $f(x)$ is a piece-wise function affect the result?

3

There are 3 best solutions below

6
On BEST ANSWER

Inasmuch as the derivative exists for $x\ne 0$, we need only show that $f$ is differentiable at $x=0$.

Using the definition of the derivative, we find

$$\begin{align} f'(0)&=\lim_{h\to 0}\frac{\frac{h+1}{e^{2h}+1}-\frac12}{h}\\\\ &=\lim_{h\to 0}\frac{1+2h-e^{2h}}{2h(e^{2h}+1)}\\\\ &=\lim_{h\to 0}\frac{1+2h-(1+2h+O(h^2))}{2h(e^{2h}+1)}\\\\ &=0 \end{align}$$

Hence, $f$ is differentiable for all $x$.


As a side note, $f$ is also continuously differentiable at $0$ since for $x\ne 0$, we have

$$\lim_{x\to 0}f'(x)=\lim_{x\to 0}\frac{(e^{2x}+1)-2e^{2x}(x+1)}{(e^{2x}+1)^2}=0$$

4
On

$$ \frac{x+1}{e^{2x}+1} \underset{x \rightarrow 0}{\rightarrow}\frac{1}{2} \ne 1 $$ Hence it is not continuous ?

Edit : Great. Now you wrote $$ f\left(x+h\right)=\frac{x+1}{e^{2x}+1}+h $$ Do you understand why it is false ? In fact

$$ \frac{f\left(x+h\right)-f\left(x\right)}{h}=\frac{1}{h}\left(\frac{x+h+1}{e^{2x+2h}+1}-\frac{x+1}{e^{2x}+1}\right) $$

1
On

"Also how would the fact that f(x) is a piece-wise function affect the result?"

It's a red herring. $f$ is not piecewise.

$\frac 12 = \frac {0 + 1}{e^{2*0} + 1}$ so $f(x) = \frac {x + 1}{e^{2x} +1}$ if $x\ne 0$ and $f(x) = \frac {x + 1}{e^{2x} +1}$ if $x = 0$.

So $f(x) = \frac {x + 1}{e^{2x} +1}$. Period.

Is it enough to state that, since we know that linear and exponential functions are continuous then if you divide one by the other the result would still be a continuous function?

It would be if $f$ weren't piecewise. Other wise you have to state that and also prove $\lim_{x\to 0} f(x) = f(0)$. That's easy to prove.

However as it's even easier to show that $f(x)$ isn't actually piecewise we do not have to.

So yes, that statement is enough.

Then to show that f(x) is differentiable, you'd have to use the formula ...

Yes. (Or I assume so... I didn't scrutinize it because the lines and layout looked good so I assumed it's correct.)

But if the function were peicewise we'd have to make special cases for $x = 0$ and do a case for $x \ne 0$ that $x + h < 0$ and $0 < x < x+h$ and have a general pain in the ass. An easy pain in the ass but still...

But as the function is not piecewise we don't have to do that.