# $f(x) \begin{cases} \frac{x^2+4x}{1-2x} , x<0\\ \int^x_0 e^{cos(t)} , x\geq 0\\ \end {cases}$ is the function differentiable in all $\Bbb R$

$$f(x) \begin{cases} \frac{x^2+4x}{1-2x} , x<0\\ \int^x_0 e^{cos(t)} , x\geq 0\\ \end {cases}$$ is the function differentiable in all $$\Bbb R$$

start of with with the case $$x<0$$ the function is differentiable and continuous for all $$x<0$$ as an elementary function and the same for $$x\geq 0$$ case

the only problem seems to be the point where $$x=0$$

so I decided to check the derivative by definition at the given point

$$\lim \limits_{x\to 0} \frac{f(x)-f(0)}{x-0}$$ and according to the fundamental theorem of calculus for the case $$x \geq 0$$ we have $$F'(x)=(\int^x_0 e^{cos(t)})'=e^{cosx}$$ so $$\lim \limits_{x\to 0} \frac{f(x)=e^{cosx}-f(0)=0}{1-0}$$ (according to lhopital and the the fundamental theorem) so the derivative is $$e$$

so I get that it is differentiable , is that correct?

No, it is not differentiable at $$0$$, since$$\lim_{x\to0^-}\frac{f(x)-0}x=4\quad\text{and}\quad\lim_{x\to0^+}\frac{f(x)-f(0)}x=e^{\cos(0)}=e$$and $$4\ne e$$.
• but aren't the side limits of $f(x)$ both 0? in the first case we get $\frac{0}{1}$ and the second is just an integral from $0$ to $0$ Commented Jan 30, 2023 at 16:20
• Yes, $F(0)=0$; that was a typo. But$$\lim_{x\to0^-}\frac{x^2+4}{1-2x}=\frac{0^2+4}{1-2\times0}=\frac41=4.$$ Commented Jan 30, 2023 at 16:22
• I have adapted my answer to the new version of your question. The new version of the function is indeed continuous at $0$. Commented Jan 30, 2023 at 16:27
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 14, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}