Consider the following ODE $$ y'(t)=\alpha x(t)-\beta y(t) $$ and the following datasets $$ X=\{(t_0,x_0),...,(t_n,x_n)\}\\ Y=\{(t_0,y_0),...,(t_n,y_n)\} $$ How can I find $\alpha$ and $\beta$ that best fits this data? In particular, is it possible to use the following solution $$ y(t) = e^{-\beta t} \left( \alpha \int_0^t e^{\beta \tau} x(\tau) \, d\tau + C \right), $$ directly, where $C$ is a constant?
Thoughts: This a fairly new field for me and I have briefly heard about inverse problems in ODEs, but rather than setting up a global minimizer that numerically finds it, I am wondering whether there is an analytical way of solving this problem, to the best possible fit in some sense.
Example: As an example, one can consider the following data $$ \begin{align} X&=\{91, 110, 125, 105, 88, 84\}\\ Y&=\{1.0, 0.97, 1.0, 0.95, 0.92, 0.89\} \end{align} $$ at time points $$ T=\{0, 5, 9, 18, 28, 38\} $$ Using a numerical approach (see Python script here), I get the following fit
with $\alpha\simeq 0.000486$, $\beta\simeq 0.057717$, and a chi-square error of $0.0017296$. Is it possible to improve this? I have tried global optimizers, but to no avail, hence thinking of a potential analytical approach.




There is too little data to be able to come up with a decent fit. With the little data available, a fit must be made with few parameters to determine. In this sense, we first interpolate the data to $x(t)$ in spline form and continue with obtaining $\alpha$, $\beta$ and $y_0$ with a nonlinear least squares fit, on the solution of the integral that in this case can be obtained explicitly. The ideal would be to carry out the adjustment of $x(t)$ and $y(t)$ simultaneously, but for this, a more significant data set would be necessary. Follows a MATHEMATICA script to accomplish that.