How to take derivative of a rational function using quotient rule