I am having difficulty understanding your situation. Do you have a formula, or do you have a bunch of times and measurements of the derivative at the times? If that is the case then you should be using trapz() or cumtrapz().
I do not know what a "primitive function" is in this context? You cannot get a symbolic formula out of ode45.
