3. Find the derivative of the function.
(a) (5%) $f(x) = x^2 \left( \frac{2}{x} - \frac{1}{x+1} \right)$