Determining $a$ and $b$ so $f(x)$ is differentiable everywhere. $f(x)=x^2\sin(\frac{1}{x}+1)$, for $x>0$ and $f(x)=ax+b$, for x $\le 0$.

74 Views Asked by At

$f:\mathbb{R}\rightarrow \mathbb{R}$

$f(x)=x^2\sin(\frac{1}{x}+1)$, for $x>0$ and

$f(x)=ax+b$, for $x \le 0$.

How can I determine $a, b \in \mathbb{R}$ so that $f(x)$ is differentiable on whole $\mathbb{R}$?

Afterwards I also have to check if $f(x)$ is continuously differentiable respectivle even differentiable twice on $\mathbb{R}$. I think I might get that done on my own, but if you also want to help with that task I appreaciate it. But first of all I need help determining $a$ and $b$.

Thanks!

2

There are 2 best solutions below

2
On

hint

$$\lim_{0^+}\frac {f (x)-f (0)}{x}=$$

$$\lim_{0^+}(x\sin (1/x+1)-b/x) $$

but $$x|\sin (1/x+1)|\le x $$ thus $$\lim_{0^+} x\sin (1/x+1)=0$$ and $b=0.$

the left derivative should be zero, which gives $a=0$.

0
On

First we need that $f$ is continuous at $0$. To this end determine $b$ such that

$ \lim_{x \to 0+0}f(x)= \lim_{x \to 0-0}f(x)$.

Then determine $a$ such that

$ \lim_{x \to 0+0}\frac{f(x)-f(0)}{x-0}= \lim_{x \to 0-0}\frac{f(x)-f(0)}{x-0}$.