I have a problem with an unevaluated derivative. In the example code below, i need the integration wrt to y be evaluated, while the differentation wrt x needs to stay unevaluated. I see the point that it is exactly the purpose of Inactive[ ] to hold the function to be differentiated "as is", but i would like to know if there is a workaround to "extract" anything not dependent on x from the inactive derivative. Any help would be highly appreciated.
Integrate[Cos[y]*Inactive[D][-Cos[y]*f[x]*Inactive[D][f[x], x], x], {y, 0, 2*Pi}]