Julia DifferentialEquations: increase maxiter

Are you sure you wrote down the equations you wanted? Your model doesn’t make too much sense.

du[3] = ((ν * u[4]) * (1 - TOT/κ)) - (ω * u[4])

simplifies with your values to du[3] = 0.68*u[4], so if the concentration of phages is always positive, then then the number of resistant diverges to infinity. As it diverges, TOT goes to infinity so (1 - TOT/κ) is going to go negative, so you’re going to then get very large negative terms. So your ODE won’t stay positive in u[1] (also the φ * u[1] * u[3] term). Once those two are negative, u[2] goes negative and…

I assume this isn’t what you wanted… but it’s what you told the computer to do. My guess is that one of those u[4] values is really u[3], so your equation should’ve been:

du[3] = ((ν * u[4]) * (1 - TOT/κ)) - (ω * u[3])