# Solving a system of nonlinear ODEs (Lotka-Volterra equations) [closed]

I am trying to solve the following system of nonlinear ODEs (Lotka-Volterra equations: Predator-Prey Model, see: http://greenteapress.com/matlab/PhysModMatlab.pdf p. 108)

eq1 = R'[t] - r R[t] - alpha R[t] F[t];
eq2 = F'[t] - delta F[t] + beta R[t] F[t];


with the following set of parameters

r = 5/10; alpha = 1/100; delta = -5/10; beta = 1/100;


Initial conditions are F[0] == 0 and R[0] == 0 and the time interval of interest is {t,0,50}. I use NDSolve.

NDSolve[
eq1 == 0 && eq2 == 0 && R[0] == 80 && F[0] == 100, {R, F}, {t, 0,
50}]


I get an error message:

Error test failure at t == 47.273657697681124; unable to continue.


and as an output two interpolating functions. I have solved the same initial problem in Octave making use of ode45 function. Mathematica's interpolating solutions behavior does not match that obtained in Octave.

How can I ameliorate NDSolve performance (Mathematica version number: 11.3)?

## closed as off-topic by Chris K, eyorble, MarcoB, Henrik Schumacher, m_goldbergMay 9 '18 at 22:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Chris K, eyorble, MarcoB, Henrik Schumacher, m_goldberg
If this question can be reworded to fit the rules in the help center, please edit the question.

• Try Method -> "Adams" in NDSolve. And other methods. – Αλέξανδρος Ζεγγ May 9 '18 at 11:00
• You can try with, Quiet@NDSolve[ eq1 == 0 && eq2 == 0 && R[0] == 80 && F[0] == 100, {R, F}, {t, 0, 50}] – Gopal Verma May 9 '18 at 12:02
• As @Alan mentioned, please check your equations and parameter setups, e.g., with Lotka-Volterra equations. – Αλέξανδρος Ζεγγ May 9 '18 at 12:11

With[{r = 5/10, alpha = 1/100, delta = 5/10, beta = 1/100},
`