forgot factor 1/2 in derivative