MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NDSolve

  • To: mathgroup at
  • Subject: [mg4390] Re: NDSolve
  • From: Paul Abbott <paul at>
  • Date: Mon, 15 Jul 1996 09:51:54 -0400
  • Organization: University of Western Australia
  • Sender: owner-wri-mathgroup at

Aleksey Nudelman wrote:

> Hi
> I am trying to find out what all these numbers in the Interpolaing 
> function means.(I could figure out that on every step Mathematica 
> stores value of the current argument,value of the argument at the 
> previos step,function and its derivative)

Hon-Wa Tam, formerly from WRI sent me the following note on the 
Structure of One-dimensional InterpolatingFunctions:

Interpolation uses Newton polynomials to construct an interpolation 
table.   The object InterpolatingFunction[ range, table ] consists of 
the range of the interval and the table.  Each element of table is 
responsible for a subinterval (t_{n-1}, t_n].  A table element has the 

	{ t_n, t_{n-1}, divided differences, coefficients }

The order of the particular polynomial for (t_{n-1}, t_n] is equal to 
Length[ coefficients ].

Interpolation within (t_{n-1}, t_n] is done by

dvdf[1] + ( x - (t_n-coeff[1]) ) * dvdf[2] +
     ( x - (t_n-coeff[1]) ) * ( x - (t_n-coeff[2]) ) * dvdf[3] + ...

Each table has a degenerate element whose subinterval is of width 0. 
This is for the purpose of finding the right subinterval by binary 

InterpolatingFunction objects can be constructed by Interpolation[] or 
by NDSolve[].

If an InterpolatingFunction object is constructed by Interpolation[], 
we have t_{n-1} < t_n in each table element.  This is also true for 
NDSolve[] when the given initial point is at the left of the domain, as 

	NDSolve[ { y'[x] == y[x], y[0] == 1 }, y, { x, 0, 1 } ]

In this normal case, the degenerate subinterval is on the left-hand 
side and is the first element of the interpolation table.

However, NDSolve can also integrate in the negative direction:

	NDSolve[ { y'[x] == y[x], y[0] == 1 }, y, { x, 0, -1 } ]

In this case all subintervals are processed "backward" and we have 
t_{n-1} t_n.  The degenerate subinterval is now on the right-hand side 
and is the last element of the interpolation table.

It is also possible that some subintervals are in the positive, and 
some in the negative direction:

	NDSolve[ { y'[x] == y[x], y[0] == 1 }, y, { x, -1, 1 } ]

Here the degenerate subinterval is somewhere in the middle of the 
interpolation table.

Paul Abbott
Department of Physics                       Phone: +61-9-380-2734 
The University of Western Australia           Fax: +61-9-380-1014
Nedlands WA  6907                         paul at 

          Black holes are where God divided by zero


  • Prev by Date: Re: hiding definitions
  • Next by Date: Re: Re: help! to input data...
  • Previous by thread: NDSolve
  • Next by thread: signal detection theory and MMA