Given that the curve $y=ax^2+\frac{b}{x}$ has a gradient of $-5$ at the point $(2,-2)$, find the value of a and b.
I did this way:
$$-2=a(2)^2+\frac{b}{2}$$
$$-2=4a+\frac{b}{2}$$ x 2
$$-4=8a+b$$
$$-\frac{1}{2}a+\frac{b}{8}$$
But the answer is $a=-1$, $b=4$.
Could you help me out?
(this chapter is about differentiation of polynomials, power functions and rational functions)