Add 2nd derivative function.