differentiate (x-1)(x-a)^2