ENDLESSYOU
- 29
- 0
I wonder which one is more accurate when solving differential equations?
The discussion centers on the accuracy of MATLAB versus Mathematica when solving differential equations, particularly in the context of the restricted circular three-body problem. Participants explore various numerical methods and their implications for accuracy, stability, and user experience.
Participants express differing views on the accuracy and stability of MATLAB versus Mathematica, with no consensus reached on which is definitively better for solving differential equations. The discussion remains unresolved regarding the best approach for the specific problem at hand.
Participants highlight the importance of specific problem contexts and numerical methods, indicating that the choice of solver may significantly affect results. There are also mentions of potential differences in global parameters between software versions that could impact outcomes.
Hmm. I would have thought ode45 would be a better choice for that problem in most cases. It's the one Mathworks use in their documentation - http://www.mathworks.co.uk/help/matlab/math/ordinary-differential-equations.html?s_tid=doc_12bENDLESSYOU said:Thanks. I'm dealing with the restricted circular three-body problem and solving the differential equations though numerical methods, ode15s on MATLAB and NDSolve on mathematica.
NemoReally said:Hmm. I would have thought ode45 would be a better choice for that problem in most cases. It's the one Mathworks use in their documentation - http://www.mathworks.co.uk/help/matlab/math/ordinary-differential-equations.html?s_tid=doc_12b
What led you to ask the question? Do you see any significant differences between Mathematica and Matlab? It doesn't address your particular case, but several years ago I partially-validated Matlab 6-dof simulation in Mathcad - the two applications gave very good agreement using a fixed 4th-order RK.
Are running modified DEs or getting very close to the "mass" centres? IME, the 3-body problem isn't generally treated as still, and the adaptive rk45 solver is usually good enough. Have you compared the results of running ode15 vs ode45?ENDLESSYOU said:They're stiff differential equations so ode15s might be a better choice.
OK, that would make the Mathematica implementation a bit more suspect. Are there global parameters in the 2 versions of Mathematica that might be different? How does the Mathematica version compare to the Matlab in the same environment?In my experience, MATLAB is more 'stable' than Mathematica. I once executed a same nb file on Windows and Ubuntu, but I got two different results.