Determine $a,b$ such that $y= \begin{cases} 2x^2+x+1 & x\leq 0 \\ ax+b & x > 0 \end{cases} $ is differentiable at $0$ 
Let $$y= \begin{cases} 
      2x^2+x+1 & x\leq 0 \\
      ax+b & x >  0 
   \end{cases}
$$
Determine $a,b$ such that $y$ has a derivative at $0$.

So, I used the definition of the derivative:
$$\lim_{x \to 0^+} \frac{y(x)-y(0)}{x} = \lim_{x \to 0}\frac{ax+b-1}{x}$$
but the limit is $+\infty$. What am I doing wrong?
 A: How do you know that this limit is equal to $+\infty$? It may be equal to  $+\infty$, but it not necessarily equal to  $+\infty$. Its value depends on $a$ and $b$, and it's precisely your task here to find such values of $a$ and $b$ that this limit will have a finite value. More precisely, to give you more of a hint, a certain value of $b$ guarantees that this limit is finite.
Another approach. First, you must set up the fact that this function, in order to be differentiable, at least has to be continuous. So set up the condition that $\lim\limits_{x\to0^{-}}y(x)=\lim\limits_{x\to0^{+}}y(x)$. Then the derivatives from both sided must be equal too, so that is the condition that will give you the desired value of $b$.
A: In order for the function to be differentiable, it must be continuous. Hence, $b$ must be 1. That fixes part of your problem. Matching the derivative from each side, you'll fix $a$ as well.
A: There is no need to use the definition of the derivative, we can just derive $2x^2+x+1$ and $ax+b$, which gives (evaluated at $x=0$) $1$ and $a$, therefore $\color{red}{a=1}$.
On the other side, the function needs to be continuous, so $\color{red}{b=1}$ also.
A: First of all you want your function to be continuous.
In order for it to be continuous, plug 0 into both parts of the function and see for which value b you get the same result.
Next differentiate both parts of the function and check for which a the values agree.
I hope this helps, if not I can elaborate. 
A: Your error is that the limit
$$\lim_{x \to 0}\frac{ax+b-1}{x} $$
is not $\infty$. That's only true for some values of $a$ and $b$.
If you carefully work through the reason why you think this limit is $\infty$, you'll be able to identify what assumptions you are making to arrive at that conclusion.
So, you have to choose $a$ and $b$ to violate those assumptions in order for this derivative to exist.

Aside: the limit is actually never $\infty$. For example, the limit of the particular case
$$ \lim_{x \to 0} \frac{1}{x} $$
does not exist. The right and left hand limits are different: they are $\infty$ and $-\infty$ respectively.
(aside the second: I assume you are referring to the extension of the real numbers that includes both a positive and negative infinite point. If you mean projective infinity instead, which is unusual in introductory calculus, then $\infty = -\infty$ so this limit does exist)
