Determine the values of a and b that makes the function differentiable everywhere Given $$f(x)=ax^3\cos(1/x)+bx+b$$ for $$x<0$$
and
$$f(x)=\sqrt{a+bx}$$
for $$x\ge0$$
Where $$a,b$$
are positive constants.
Determine the values of a and b, if any, that make f differentiable everywhere.
Proposed solution:
(1) $$f'(x)=3ax^2\cos(\frac{1}{x})+ax\sin(\frac{1}{x})+b$$
and (2) $$f'(x)=\frac{1}{2}(a+bx)^{-\frac{1}{2}}b$$ 
From (2), $$f(0)=a^{\frac{1}{2}}, f'(0)=\frac{1}{2}(a^{-\frac{1}{2}})b$$ and
From (1), $$\lim_{x \rightarrow 0-}f(x)=b$$ (Using Squeeze theorem)
Since differentiability implies continuity,
(3)
$$\lim_{x \rightarrow 0-}f(x)=\lim_{x \rightarrow 0}f(x)=b=f(0)=a^{\frac{1}{2}}$$
For f(x) to be differentiable at 0, using (3),
$$\frac{1}{2}=3ax^2\cos(\frac{1}{x})+ax\sin(\frac{1}{x})+a^{\frac{1}{2}}$$
which is unsolvable.
So a,b does not exist.
Am I right? Thanks.

From continuity, we indeed get $b = \sqrt{a}$.
Plugging this in the derivatives, we get 
$$\lim_{ x \uparrow 0} f'(x) = b =  \lim_{x \downarrow 0 } f'(x) = \frac{1}{2} \frac{ b}{\sqrt{a}} = \frac{1}{2}$$
So $a= \frac{1}{4}$ and $b= \frac{1}{2}$ makes the function differentiable.
