It perhaps will help if you write down the rule for integration by parts in the following way:

, where

Writing F for the primitive of f makes things clearer imo, and now it's a standard exercise to show the derivative of the RH equals the function under the integral sign in the LH.

Tonio