2. (10%) Find the derivative of the functions f. $$(a) \ f(x) = \sin^2(x^3 + 2x), \quad (b) \ f(x) = \frac{x^2 - 1}{x^3(x^2 + 1)}.$$