     TOPIC: Differential equation solver
     PRODUCT:  TI-85
---- end abstract ----
---- begin documentation ----
     TOPIC: Differential equation solver
     PRODUCT:  TI-85

     A question has been asked about the algorithm used in the TI-85
     for solving systems of first order ordinary differential equations.
     The method used is adaptive stepsize Runge-Kutta.	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
     by the algorithm 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.  You may notice this 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 which 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.

     References:

     "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.

---------------------------------------------------------------------------
  TI GRAPHIC PRODUCTS TEAM
  Texas Instruments (Consumer Products)
  P.O. Box 650311  M/S 3908		  Internet: ti-cares@lobby.ti.com
  Dallas, Texas  75265			  Fax: 214-917-7103
---------------------------------------------------------------------------

---- end documentation ----
---- begin ascii ----
---- end ascii ----
---- begin uue ----
---- end uue ----
