I am sorry if my question led to misunderstanding, but my question was not about differentiation after all; I added this part because anyway someone would ask this. Essentially I ended up with a series expansion of the integrand and then symbolic integration of this series via SymPy.