If $f(x)=\frac{x+4}{x^2+ax+b}$, and $f(x)$ has two vertical asymptotes at $x=1$ and $x=-2$, find the sum of $a$ and $b$.
To find the vertical asymptotes of $f(x)$, I need to find the values of $x$ that make the denominator zero. That means I need to solve the equation $x^2+ax+b=0$. Since I know that $x=1$ and $x=-2$ are solutions, I can use the fact that the quadratic equation can be factored as $(x-r)(x-s)$, where $r$ and $s$ are the roots. So, $x^2+ax+b=(x-1)(x+2)$. Expanding the right-hand side, I get $x^2+ax+b=x^2+x-2$. Comparing the coefficients of $x$, I see that $a=1$. Comparing the constant terms, I see that $b=-2$. Therefore, the sum of $a$ and $b$ is $1+(-2)=-1$. 