find a and b so that f(x)=x^2+ax+b has a local min at (6,-5)

i found the derivative:
f'=2x+a

then i found a

0=2x+a
0=2(6)+a
0=12+a
a=-12

but i can't seem to get the correct value for b. i plugged -5 into the original function, but my book says the answer is b=31.

To find the correct value for b, you need to use the fact that the local minimum occurs at (6, -5).

Given that f(x) = x^2 + ax + b, substitute x = 6 and f(x) = -5 into the equation:

-5 = (6)^2 + a(6) + b

This simplifies to:

-5 = 36 + 6a + b

Rearrange the equation to solve for b:

b = -5 - 36 - 6a
b = -41 - 6a

Now, substitute the previously found value of a (-12) into the equation:

b = -41 - 6(-12)
b = -41 + 72
b = 31

Hence, the correct value for b is indeed 31, as your book states.