A Comparison of Maple and Mathematica: Solving Odes
A Comparison of Maple and Mathematica: Solving Odes
A Comparison of Maple and Mathematica: Solving Odes
The famous text, Differentialgleichungen by Kamke, contains 1429 linear and non-linear ODEs. These equations
were used to test the symbolic ODE solving abilities of Maple™ and Mathematica®. The tests looked at their ability
to find solutions to the 1345 ODEs from the text known of have a solution, as well as how long it takes them to
recognize when they cannot solve the problem.
Maple Mathematica
Solves 97.5% of solvable ODEs Solves 80.3% of solvable ODEs
Completes test in 45 minutes Completes test in 7 hours 8 minutes
Maple Mathematica
Kamke Solvable Problems All Solvable Problems All
ODEs No No
response response
Returned Not % Total Returned Not % Total
within within
Solution Solved Solved Time Solution Solved Solved Time
time limit time limit
Spent Spent
(3 min) (3 min)
1st order: 576 541 6 99% 2 19 min 473 74 86% 65 250 min
solvable: 547
2nd order
nonlinear: 188 157 5 97% 2 13 min 114 48 70% 8 63 min
solvable: 162
2nd order
nonlinear 50 8 86% 0 3 min 0 58 0% 1 23 min
reducible 58
2nd order
linear 448 424 3 99% 1 5 min 387 40 91% 8 40 min
solvable: 427
3rd order
linear: 85 73 7 91% 1 3.5 min 58 22 72% 4 28 min
solvable: 80
4th order
linear: 45 40 3 93% 0 22 sec 33 10 77% 1 8 min
solvable: 43
High order
nonlinear: 12 11 0 100% 0 21 sec 6 5 54% 1 2.5 min
solvable: 11
High order
nonlinear 5 0 100% 0 7 sec 0 5 0% 0 30 sec
reducible: 5
The 1429 Ordinary Differential Equations (ODE) of Kamke’s book were tackled with Mathematica’s DSolve
and Maple’s dsolve commands, with a time limit of 3 minutes per ODE (Maple function timelimit and
Mathematica function TimeConstrained), in a Macbook Pro (2013) 2.7 GHz Intel Core I7, 4 cores, 16 GB
of RAM. No optional arguments were allowed when calling DSolve and dsolve.
The test focused on: time consumed, number of equations solved versus unsolved, and also number of “no
response within time limit” equations, as a measure of the ability of the system to understand that a problem
is beyond its capabilities.
In this report we say that the ODE solver gave “no response within time limit” for an equation when the
solver did not terminate within a three minutes time limit. At that point, the computation was automatically
interrupted, with the system moving to tackling the next equation.
By “Not Solved” equations it is meant equations for which we know a solution exists (either because Kamke
shows it or because we were able to derive it and test it), and for which the ODE solver terminates before
3 minutes or returns without a solution. Problems for which the returned answer involved DESol in Maple
or the equivalent DifferentialRoot in Mathematica are considered unsolved, because the answer does not
provide more information than the original problem.
Regarding the unsolvable equations of Kamke’s book, naturally, neither Mathematica nor Maple are ex-
pected to solve them, but it is expected that these systems recognize their inability to solve these equations
within a reasonable period of time.
To compare the time spent in tackling only the portion of the 1429 ODEs for which the solver returns before
the time limit, multiply the number of “no response within time limit” equations by 3 minutes and then
subtract this number from the total time consumed.
The Kamke’s numbers of the 26 unsolvable ODEs are: 3, 5, 6, 8, 9, 13, 16, 18, 19, 27, 29, 52, 55, 59, 85, 95,
112, 114, 139, 147, 149, 161, 207, 211, 212, 217.
The Kamke numbers of the 58 second order nonlinear ODEs that are only reducible are: 11, 15, 21, 22, 25,
26, 28, 34, 36, 37, 44, 46, 47, 49, 53, 54, 58, 68, 69, 70, 72, 73, 74, 75, 76, 77, 82, 83, 87, 90, 92, 94, 96,
100, 102, 103, 105, 106, 115, 116, 118, 123, 129, 131, 144, 148, 152, 172, 187, 198, 199, 225, 226, 230,
231, 235, 242, 246.
Maple conveys solutions for the reducible equations using ‘ODESolStruc’, showing the solution for the
original problem in terms of the solution of the reduced ODE, as well as the reduced ODE and
transformation used to reduce the problem. Mathematica does not convey reductions of order, thus failing
with all the 58 equations of ‘only reducible to first order’ type.
The Kamke numbers of the 5 higher order ODEs that are only reducible are: 2, 3, 4, 5, 14.
Mathematica performance with solvable ODEs: 54.6 %; with reducible ODEs: 0 %, in 3 minutes
Mathematica took 3 minutes in tackling the 17 ODEs, solved 6 of the 11 solvable ones, 0 of the 5 reducible
ones, and failed to return a solution for 5 fully solvable equations: 1, 8, 9, 17, 12. Mathematica does not
respond within the time limit for 1 equation: 12, which is fully solvable.
Maple performance with solvable ODEs: 100%; with reducible ODEs: 100%, in 28 seconds
Maple took 24 seconds in tackling the 17 ODEs. Maple responds within the time limit for all equations,
and solves both the solvable and reducible sets of equations completely.
www.maplesoft.com | [email protected]
© Maplesoft, a division of Waterloo Maple Inc., 2014. Maple is a trademark of Waterloo Maple Inc.
Mathematica is a registered trademark of Wolfram Research, Inc.
A Cybernet Group Com pany