[PD] derivative function