I am solving a system of ODEs using Matlab. One particular set of parameters caused the solver to fail, so I worked my way through the different solvers Matlab provides. I was surprised to find that two of the solvers (ode23s and ode23tb) produced completely different, yet reasonable, results. Every other solver failed.
My question: Which one (if any) should I trust and why?
I'm not entirely sure if this is a mathematics question or a programming question, but I suspect it comes to a difference in the numerical methods, hence posting it here.
ode23s:
ode23tb:
For reference the ODEs are: $$\frac{dS}{dt}=-\beta IS+\xi(1-S)+3 \kappa L\\ \frac{dI}{dt}=\beta IS+\alpha IL-\xi I-\gamma I\\ \frac{dR}{dt}=\nu \beta IW+\gamma I - \xi R - 3\kappa R \\ \frac{dL}{dt}=-\alpha IL+3 \kappa W-\xi L -3 \kappa L\\ \frac{dW}{dt}=-\nu \beta IW + 3 \kappa R -\xi W - 3 \kappa W\\$$
With parameters: $$\alpha=26, \beta=260, \kappa=.1, \gamma=17, \nu=5, \xi=0.0125$$
And initial conditions:
$$S_0=.99, I_0=1-S_0, R_0=0, L_0=0, W_0=0$$


Looks a lot like you have (at least one) bifurcation point.
You can perform a stability analysis based on linerization which shows that actually both equilibria have exactly one unstable direction corresponding to an eigenvalue with negative real part.
Thus, if the trajectories from the different solvers are somewhat sufficiently aligned with those unstable directions, this causes them to miss that equilibrium / steady state. Conversely, if they progress in directions more or less aligned with the stable ones, they approach the corresponding equilibrium. In the context of your system,
ode23s"finds" thus the stable directions of the $(1, 0, 0, 0, 0)$ equilibrium or is repelled by the unstable direction of the $\sim (0.0589, 0.0021, 0.7937, 0.0655, 0.0799)$ steady state (or mixture of both). Converse holds for theode23tbsolver.I attach some Matlab files I used throughout the analysis, including a animation of the trajectories in reduced ($I, L, R + L +W$) space, showing that somewhere around $I \approx L \approx 0, R + L + W \approx 1$ the bifurcation happends.