Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab or mathematica

  1. Feb 17, 2013 #1
    I wonder which one is more accurate when solving differential equations?
     
  2. jcsd
  3. Feb 17, 2013 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    Accurate in which way?
    Smaller numerical errors? Depends on the way you try to solve it, internal details of the programs and the accurary you need.
    Less bugs? No idea
     
  4. Feb 18, 2013 #3

    jim mcnamara

    User Avatar

    Staff: Mentor

    Since both have been used extensively for a long time, the chance of "accuracy" problems is very small. I would use the one that that I was most familiar with.

    Generally, software that is inaccurate or does calculations incorrectly either gets corrected by its authors or people stop using it. And users find something that does work as intended.
     
  5. Feb 18, 2013 #4
    All things being equal, they're probably about the same numerically in most cases and they both have symbolic DE solvers that cover a reasonable number of physical cases ... I think you'd have to have something in mind or a set of test cases to make a comparison. If you were to hold a pistol against my head, I'd probably guess Mathematica ... but I'm rather unlucky ... I once failed an ESP test dismally (least sensitive person they'd ever seen, apparently), I got 100% wrong. :frown:
     
  6. Feb 18, 2013 #5
    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.
     
  7. Feb 18, 2013 #6
    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.
     
  8. Feb 18, 2013 #7
    They're stiff differential equations so ode15s might be a better choice. 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.
     
  9. Feb 18, 2013 #8
    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?

    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?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Matlab or mathematica
  1. Mathematica NDSolve (Replies: 2)

  2. Help in Mathematica (Replies: 4)

Loading...