Analysis of continuity and differentiability of a function Find a,b,c $\in \mathbb{R}$ for which the function is a) continuous, b) differentiable.
$$f(x)=\left\{\begin{array}{cc}
ax^2+bx+c & x<0 \\
2\sin x+cos x & x\:\ge 0
\end{array}\right.$$
From what I know a function is continuous when the following occurs:
$$\lim_{x\to 0^+\:}f(x) = \lim_{x\to 0^-\:}f(x) = f(0).$$
Calculating the limits would lead me to $c=1$, but what about a and b? 
What do I do for proving that it is differentiable? Because from what I know, a function is differentiable when $f'(x_0)$ is a finite number. But I get that $f'(x_0)=2$ which would mean I can have any $a,b,c$?
 A: Hint:  Differentiability implies continuity.
A: For continuity, following your track we get $c=0$, since for $x=0$ the lower branch is $2\sin0\cos0=2\cdot0\cdot1=0$, thus $ax^2+bx+c$ should give 0 in 0, which means $c=0$.
For differentiability, we need continuity, as Jose's answer states. So $c=0$. Then, we need the derivative to be continuous. The derivative here is:
$$f'(x)=\left\{\begin{array}{cc}
2ax+b & x<0 \\
2\cos(2x) & x>0
\end{array}\right..$$
Note that the lower branch is $\sin(2x)$, whence the above derivative. Now the lower branch is 2 in 0, so we must get 2 from above. This implies $b=2$. $a$ is therefore totally undetermined.
To sum up, $f(x)$ is continuous iff $c=0$, and so:
$$f(x)=\left\{\begin{array}{cc}
ax^2+bx & x<0 \\
\sin(2x) & x\geq0
\end{array}\right..$$
And it is differentiable iff $b=2$, thus being of the form:
$$f(x)=\left\{\begin{array}{cc}
ax^2+2x & x<0 \\
\sin(2x) & x\geq0
\end{array}\right.,$$
with derivative:
$$f'(x)=\left\{\begin{array}{cc}
2ax+2 & x<0 \\
2\cos(2x) & x\geq0
\end{array}\right..$$
Note: It is true that differentiability does not generally imply continuity of the derivative. However, a derivative cannot have a jump discontinuity, and being the derivative here bounded from both sides that is the only possible discontinuity we could get, which means that for $f$ to be differentiable it must indeed be $\mathcal{C}^1$.
Edit:
The question was missing a plus in the lower branch, and the plus was edited in after I posted this answer. The arguments are the same, but for continuity we get the lower branch giving $2\sin0+\cos0=1$, so $c=1$, and for differentiability we have:
$$f'(x)=\left\{\begin{array}{cc}
2ax+b & x<0 \\
2\cos x-\sin x & x>0
\end{array}\right.,$$
which implies the lower branch in 0 is $2\cos0-\sin0=2\cdot1-0=2$, so $b=2$ again. Then $f$ is continuous iff $c=1$, with upper branch $ax^2+bx+1$, and $f$ is differentiable iff it has $c=1,b=2$, and is thus of the form:
$$f(x)=\left\{\begin{array}{cc}
ax^2+2x+1 & x<0 \\
2\sin x+\cos x & x\geq0
\end{array}\right.,$$
with derivative:
$$f'(x)=\left\{\begin{array}{cc}
2ax+2 & x<0 \\
2\cos x-\sin x & x\geq0
\end{array}\right..$$
