XLPack Solver – Ordinary Differential Equations (ODEs)
Compute the solution of an initial value problem of an ordinary differential equations.
Let’s solve the following example equations.
dy1/dt = y3, dy2/dt = y4, dy3/dt = -y1/r, dy4/dt = -y2/r (where r = (y1^2 + y2^2)^(3/2))
The initial values are y1 = 1, y2 = 0, y3 = 0 and y4 = sqrt(3) at t0 = 0.
This is an example of a system of ordinary differential equations with four dependent variables and four equations, but in fact this is the same problem as the example of a second-order ordinary differential equations. It is expressed as a first-order system of ordinary differential equations by setting dy1/dt = y3 and dy2/dt = y4.
The solver program will write the value of t into the independent variable (t) cell (B8 in this case) and the values of yi into the dependent variable (yi) cells (B9 to B12 in this case). The differential equation (dyi/dt) cells (B13 to B16 in this case) must contain the formulas to compute dy1/dt to dy4/dt from t and yi. To solve this example, the formulas for B13 to B16 are =B11, =B12, =-B9*(B9^2+B10^2)^(-3/2) and =-B10*(B9^2+B10^2)^(-3/2), respectively.
The initial values and output range (D8:H28 in this case) is the cell range for the value of t (input) in the first column and the computed values of yi in the second, third, … columns (output). Input the initial values (t0, y1 to y4 at t0 in this case) in the first row and the target t value in the first column of second and later rows, and click “Compute”. Then the values of yi at t of each row will be computed and output to the second and later columns of each row. If the row with a blank cell in the first column is encountered, the computation will be terminated even within the initial value and output range.
Derkfa, Dopri5a, Dop853a, Deabm, Debdf (for stiff problem) or Radaua (for stiff problem) can be selected as the solver program.
The standard value of tolerance is 1.0e-8. The tolerance value will be set to RTol and ATol of each routine.
The cell ranges can be specified as larger than required. In that case, only the necessary range will be used from left upper corner.
Please refer to here for “Save/Restore” button.
When “Help” button is clicked, this page will be displayed if the network connection is available.
The “?” button of right upper corner will not work correctly. Please use “Help” button.