derivative using difference quotient