Hi, There is not enough info in your post on the code. I can not obtained the info about what are the fitted parameters, and what the constants in the code.
But I do find that you want to fit to an integral function with fitted parameters.
Better use other integral integrator (like NAG integrator) to perform integration for your defined function instead of doing it yourself.