Rather than explicitly integrating and then taking the derivative of the result, use the fundamental theorem of calculus.