I have the following pair of nonlinear ordinary differential equations

m'[t] == gamma*v[t]*m[t] - mu*m[t];
v'[t] ==
  v[t]*(k - epsilon - mu) - v[t]^2*k + m[t]*l - m[t]^2*l - m[t]*v[t]*(k + l + gamma);

So there are five parameters gamma, epsilon, mu, k and l. Now I would like to estimate these parameters from data that is only related to the function m[t]. I have tried using ParametricNDSolveValue together with FindFit as usual. The problem what arises is that ParametricNDSolveValue gives me a function with two variables m and v and four parameters. I'm not sure how to write the FindFit so it understands that the data is only for m and not for v at all.

If I only had one differential equation with five parameters, I could easily do the fitting because then it's just a straightforward application of ParametricNDSolveValue and FindFit. However, as I have two differential equations depending on each other, I cannot do this.

Any suggestions?

  • 2
    $\begingroup$ You could specify that only one function should be returned: ParametricNDSolve[equations, m, {t, tmin, tmax}, {epsilon, mu, k, l}] $\endgroup$ – J. M.'s discontentment Oct 1 '18 at 15:26
  • $\begingroup$ Initial data and gamma are also parameters? $\endgroup$ – Alex Trounev Oct 1 '18 at 16:20
  • $\begingroup$ @AlexTrounev The gamma is. Forgot it. But I think that J.M.s solution might work, but I’m not on my pc to try it yet. $\endgroup$ – NPHA Oct 1 '18 at 16:36
  • $\begingroup$ @J.M.issomewhatokay. Thank you, that seemed to work. However this whole method seems to be super inefficient, see my new question mathematica.stackexchange.com/questions/182960/… $\endgroup$ – NPHA Oct 2 '18 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.