When is this sine function differentiable at all points? I have a hard time solving these kinds of problems, here is an example. For which values of a and b is the following function differentiable at all points? $$f(x)=\sin(|x^2+ax+b|)$$
Thanks in advance.
 A: Whenever the quadratic isn't positive, namely when $\;\Delta =a^2-4b\le0\;$ . Can you see what's the problem with the absolute value of something that vanishes?
Added: suppose the quadratic vanishes at $\;x_0< x_1\;$ , so that $\;x^2+ax+b=(x-x_0)(x-x_1)\;$ .
Observe that if $\;h<0\;$ is such that $\;x_0-x_1+h>0\;$ , then $\;f(x_0+h)=\sin|h(x_0+h-x_1)|\;$ , with $\;h(x_0+h-x_1)<0\;$ .
Now, by definition:
$$\lim_{h\to 0^-}\frac{f(x_0+h)-f(x_0)}h=\lim_{h\to0^-}\frac{sin(|h(x_0+h-x_1)|)-\overbrace{0}^{=f(x_0)}}{h}=$$
$$=\lim_{h\to 0^-}\,(x_0+h-x_1)\frac{\sin\left(-h(x_0+h-x_1)\right)}{h(x_0+h-x_1)}=\color{red}-\lim_{h\to 0^-}\,(x_0+h-x_1)\frac{\sin\left(h(x_0+h-x_1)\right)}{h(x_0+h-x_1)}=$$
$$=x_1-x_0$$
whereas
$$\lim_{h\to 0^+}\frac{f(x_0+h)-f(x_0)}h=\lim_{h\to0^+}\frac{\sin(|h(x_0+h-x_1)|)-\overbrace{0}^{=f(x_0)}}{h}=$$
$$=\lim_{h\to 0^+}\,(x_0+h-x_1)\frac{\sin\left(h(x_0+h-x_1)\right)}{h(x_0+h-x_1)}=x_0-x_1$$
Thus, both one sided limits aren't equal so the limit definint the derivative at $\;x_0\;$ doesn't exist and thus $\;f'(x_0)\;$ doesn't exist.
Now you try to do something similar when $\;x_0=x_1\;$...but this time you'll find out the function is differentiable at $\;x_0\;$ !
