I have looked at some Maple help documents, but it was hard to find what I wanted to do..
My situation is quite simple. I have a couple ODE for (say) 5 variables,
$a_1 '(t) = a_2 (t) a_3(t) - a_1 (t)^2 $, $a_2 '(t) = ...$, (some quadratic expression) ..., $a_5'(t) = ...$.
And I want to numerically keep track of a quantity, say, the energy
$E(t)=\sum_i a_i^2 (t)$ as a function of time, given initial data.
Is there a simple Maple or Mathematica code to do this?
Maple's dsolve will numerically solve a differential-algebraic initial-value problem (DAE IVP) just as readily as it will solve a system of ODEs. You simply need to include your $E(t)$ equation in the system. Example: