$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!
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$.