While MATLAB does an excellent job at giving a large amount of easily available functionality, where it lacks is performance. There are also dde23 and ddesd for delay differential equations, and in the financial toolbox there’s an Euler-Maruyama method for SDEs. Every one of these methods is setup with event handling, and there are methods which can handle differential-algebraic equations. You’re given access to the “dense output function” (this is the function which computes the interpolations). The methods allow you to use complex numbers. Shampine’s scheme is a good quick fix to this problem which most people probably never knew was occurring under the hood! This is because high order ODE solvers are good enough at achieving “standard user error tolerances” that they actually achieve quite large timesteps, and in doing so step too infrequently to make a good plot. So between any two steps that the solver takes, it automatically adds in 4 extra points using a 4th order interpolation. When you solve an equation using ode45, the Runge-Kutta method uses a “free” interpolation to fill in some extra points. That method just works and creates good plots, right? Well, Shampine added a little trick to it. Let’s take for example the classic ode45. MATLAB documents its ODE solvers very well, there’s a similar interface for using each of the different methods, and it tells you in a table in which cases you should use the different methods.īut the modifications to the methods goes even further. The MATLAB ODE Suite does extremely well at hitting these goals. Instead of focusing on efficiency, they key for this group is to have a clear and neatly defined (universal) interface which has a lot of flexibility. The idea is pretty simple: users of a problem solving environment (the examples from his papers are MATLAB and Maple) do not have the same requirements as more general users of scientific computing. Shampine also had a few other papers at this time developing the idea of a “methods for a problem solving environment” or a PSE. MATLAB’s differential equation solver suite was described in a research paper by its creator Lawerance Shampine, and this paper is one of the most highly cited SIAM Scientific Computing publications. MATLAB’s Built-In Methodsĭue to its popularity, let’s start with MATLAB’s built in differential equation solvers. All other packages were benchmarked by looking at the same set of problems implemented by modifying the example code from their documentation. For general benchmarks of the algorithms which are mentioned in this post, see the SciMLBenchmarks.jl repository and the associated benchmarks result website. For the current state of the reproducible benchmarks on the overhead of the various wrapper packages, see the ODE Solver Multi-Language Wrapper Package Work-Precision Benchmarks (MATLAB, SciPy, Julia, deSolve (R)) (which includes direct benchmarks of Sundials and Hairer’s methods as well). However, we are beginning to wrap all of the packages together within a single interface to allow for reproducible benchmarking. The packages mentioned in this blog post were originally benchmarked individually by investigating the same set of standard benchmark problems in each of their respective modeling languages. If you just want a quick summary, I created a table which has all of this information. You will see at the end that DifferentialEquations.jl does offer pretty much everything from the other suite combined, but that’s no accident: our software organization came last and we used these suites as a guiding hand for how to design ours.) Quick Summary Table (Full disclosure, I am the lead developer of DifferentialEquations.jl. I hope that by giving you the details for how each suite was put together (and the “why”, as gathered from software publications) you can come to your own conclusion as to which suites are right for you. This is a good way to reflect upon what’s available and find out where there is room for improvement. What I would like to do is take the time to compare and contrast between the most popular offerings. For the field of scientific computing, the methods for solving differential equations are one of the important areas. Many times a scientist is choosing a programming language or a software for a specific purpose.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |