implement derivative sum function