Question: Find all values of real number a such that $ \lim_{x\to1}\frac{ax^2+a^2x-2}{x^3-3x+2} $ exists. Thanks in advance for looking at my question.
I was tackling this limits problem using this method, but I can't seem to find any error with my work.

Question: 
  Find all values of real number a such that
  $$
\lim_{x\to1}\frac{ax^2+a^2x-2}{x^3-3x+2}
$$
  exists.

My Solution: Suppose $\lim_{x\to1}\frac{ax^2+a^2x-2}{x^3-3x+2}$ exists and is equals to $L$.
We have $$\lim_{x\to1}{ax^2+a^2x-2}=\frac{\lim_{x\to1}ax^2+a^2x-2}{\lim_{x\to1}x^3-3x+2}*\lim_{x\to1}x^3-3x+2=L*0=0$$
Therefore, $\lim_{x\to1}{ax^2+a^2x-2}=0$
implying $a(1)^2+a^2(1)-2=0$.
Solving for $a$, we get $a=-2$ or $a=1$. 
Apparently, the answer is only $a=-2$. I understand where they are coming from, but I can't see anything wrong with my solution either. 

Since the denominator's limit is 0, the numerator cannot have a nonzero limit if the limit of the quotient is to be defined. The only hope is that the numerator's limit is also 0, and that after analyzing the indeterminate form, it does have a limit.
So, it must be the case that $\lim_{x\to1} ax^2+a^2x-2=0$, and consequently $a^2+a-2=0$.
The solutions to that are $a=-2$ and $a=1$, and if you substitute them into the expression, you will find that the numerator now factors into $-2(x-1)^2$ in the first case, and $(x+2)(x-1)$ in the second case. 
In either one, the $(x-1)$ can be cancelled with the $(x-1)$ factor in the denominator, so that the singularity (a pole of order 2) might disappear.
$\lim_{x\to1}\frac{x^2+x-2}{x^3-3x+2}=\lim_{x\to1}\frac{x^2+x-2}{(x-1)(x^2+x-2)}=\lim_{x\to 1}\frac{1}{x-1}$ does not exist, so the $a=1 $ case is a false positive.
In the other case:
$\lim_{x\to1}\frac{-2(x-1)^2}{(x-1)^2(x+2)}=\lim_{x\to1}\frac{-2}{(x+2)}=\frac{-2}{3}$
