The first example is also the very first example in the docs[1], but rather <i>f!(du,u,p,t)</i> that modifies <i>du</i>, it passes <i>f(u,p,t)</i> that returns <i>du</i>. Searching the help for <i>ODEProblem()</i> function, it's explained[2] that the first way is more memory-efficient, but if mutation is not allowed, the second way is more suitable. It will be of interest to write a follow-up post elaborating on this part.<p>[1]: <a href="https://docs.sciml.ai/DiffEqDocs/stable/examples/classical_physics/#Radioactive-Decay-of-Carbon-14" rel="nofollow">https://docs.sciml.ai/DiffEqDocs/stable/examples/classical_p...</a>
[2]: <a href="https://docs.sciml.ai/DiffEqDocs/stable/types/ode_types/#SciMLBase.ODEProblem" rel="nofollow">https://docs.sciml.ai/DiffEqDocs/stable/types/ode_types/#Sci...</a>