If (x-a)^2 | g(x) then g(x) = (x-a)^2 p(x) for some polynomial p(x). Take the derivative of g(x) and see if (x-a) | g'(x)
Okay, I can see that, but I am still stuck on the "if and only if" part. If (x-a) | g', then g' = (x-a)q(x) for some polynomial q, but then how exactly would I integrate that? Would it just be g = ((x-a)^2)q(x)/2 + b, and if so, how would I deal with the "+b"? or do I have to treat the q(x) as more than a constant like I suspect, and if so, how?