Solution 10399: Differential Equation Solver for the TI-85.
What method is used in the Differential Equation solver for the TI-85?
The method used in the TI-85 to solve differential equations is known as an adaptive stepsize Runge-Kutta method.
In this method, a proposed step is taken by computing a solution with two separate Runge-Kutta formulas of different order (but which share evaluation points). An error estimate is formed from the two solutions and compared with a user tolerance. Based on this comparison, the step is either rejected and a reduced step is taken, or the step is accepted and the step size is generally increased. This step taken is independent of the tStep value selected in the Range screen as mentioned in the TI-85 manual (pg 7-5). Probably the most common example of this technique is what is commonly called Runge-Kutta-Fehlberg, most often using a 4,5 order pair.
The TI-85 uses a 2,3 pair, which is a tradeoff between lower accuracy (in the sense of being able to get solutions to a smaller tolerance) and calculation speed. Since the ODE solver on the TI-85 is primarily a graphing tool, the choice was to maximize graphing speed. One consequence of this choice, however, is that the code becomes inefficient for small tolerances (typically less than 1e-5). A tolerance of 1e-2 or 1e-3 is most efficient for this method.
It should also be noted that the plotted solution is determined by interpolation between solution points that are based on the adaptive step size. This is noticeable as a solution plots a number of pixels in "spurts" or during a trace when the calculator pauses to calculate for some time on some pixel jumps. To be more specific, the calculator computes a solution value at each "t" value of (tMin + n*tStep) based on interpolation between the "adaptive" steps that this value of "t" falls between. The interpolant is a cubic that preserves the derivative at the ends and so may be thought of as a cubic spline. Then straight-line interpolation is used between these "tStep" points. Because of the interpolation, it is important to not make "tol" so loose that significant behavior of the solution is neglected. In this case, the interpolation will draw something through the region, but it may not be correct. Likewise, making tStep larger than the adaptive step size will lose detail that the calculator has computed. To get maximum graph detail, tStep should be approximately (xMax - xMin)/126 if "t" is on the x-axis. There is very little computational cost in interpolating many pixels between adaptive steps, but computing more than one interpolated point per pixel is wasted effort.
"Numerical Methods A Software Approach", R.L. Johnston, John Wiley and Sons, 1982, pp 243-248.
"A (2,3) pair of Runge-Kutta Formulas", Appl. Math. Lett., 2 (1989), pp 321-325.Please see the TI-85 guidebook for additional information.