fitting Data with genfit and a model based on a numerical solved ODE
- July 7, 2021
- 1 reply
- 2793 views
Hello,
I have a very complex differential equation that can only be solved numerically. Here I use a simple differential equation as a proxy for the sake of clarity. This differential equation contains the parameter a. I would like to determine this parameter a by fitting it with the method of least squares with my data X and Y. I need the numerical solution of the differential equation. From the numerical solution of the differential equation I only need the last value for each row of my data X. This is done by the function xsolvend. This is done by the function xsolvend.
Because the differential equation is complex, I use genfit. For this I need the function xsolvend_fit which contains the derivative after the fitting parameter a.
The numerical solution of the differential equation with determination of the final value works. See comparison with the analytical solution, which I can easily determine in this simple example.
Already with xsolvend_fit there are problems and Mathcad cannot calculate this.
Mathcad returns the following error for genfit: "There is no convergent solution for this regression. Check your derivatives, let genfit calculate the derivatives numerically, check your model for singularities, or try different starting values."
How can I have the derivatives of xsolvend_fit calculated numerically?
Does anyone have an idea for a solution?
Thank you very much.
Best regards
Paul


