* In the first tutorial, we learned how to enter a single first-order ODE
into ODE Toolkit. In this tutorial, we greatly expand the types of
equations that we can work with to include second-order (and higher) ODE's.
In addition, we learn how to define and use parameters in our equations.
Note: In this tutorial, red text denotes invalid input to ODE Toolkit while
green text denotes valid input.
*

Consider the following equation, used to model the motion of simple harmonic oscillators,

x'' + (omega^2)*x = 0The state variable

v' + omega^2*x = 0 v=x'

Remember, however, that all ODE's must be entered in normal form, so to enter the system into ODE Toolkit, you would type the following into the text input box:

v' = -omega^2*x x' = v

Note that the derivatives of the state variables are always given on the
left-hand-side of the equations and that the right-hand-sides of the
equations are functions of the state variables and *t* only.

The above input is incomplete, however, since we have not defined
*omega*. To define *omega* and set it equal to pi, enter the
following line anywhere in the text input box:
*omega = pi*. Thus, the final input should look something like this:

v' = -omega^2*x x' = v omega = pi

There are three useful things to note about this input. First, although
each equation was entered on a separate line, they didn't have to be.
Equations can be entered on the same line as long
as they are separated from each other by semi-colons. Second, the order
in which the equations are entered does not matter. We could have just as
well have defined *omega* first or defined *x'* before *v'*,
for instance. Third, ODE Toolkit ignores all spaces between identifiers
and operators, so the spaces around the equal signs are unnecessary.
For example, we could have entered the system like this:

omega=pi; v'= - omega ^ 2 * x;x' = v

...or like this:

x' = v omega = pi; v' = - omega ^ 2 * x

...but not like this:

v' = -omega^2*x x' = v omega = pi