Re: NDSolve documentation
- To: mathgroup at smc.vnet.net
- Subject: [mg42252] Re: NDSolve documentation
- From: Robert Knapp <rknapp at wolfram.com>
- Date: Wed, 25 Jun 2003 01:53:48 -0400 (EDT)
- Organization: Wolfram Research, Inc.
- References: <bd8no0$lmu$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
JAN PROSKA wrote:
> Hello Everyone,
>
> I am looking for any documentation which covers an "inner output" from the
> NDSolve function in detail.
>
> Example:
>
> Eq=y/. First[NDSolve[{y''[x]+y[x]==0, y[0]==1, y'[0]==0}, y, {x, 0, 2*Pi}]]
>
> Eq[[1]]
> Eq[[2]]
> Eq[[3]]
> Eq[[4]]
>
>
> Something can be "deciphered" easily (in the case). But more comprehensive
> documentation would be of great serviceability.
>
The output from NDSolve is an InterpolatingFunction object which is documented
in the Mathematica book in terms of how it works. The elements of these are
subject to change between versions and so are not documented.
That said, it is useful, however, to access some of the data within and
InterpolatingFunction object for various reasons. With Mathematica 5, an
informal package is included which allows you to access the data. Shown below
is how you load the package and a simple example of using one of the functions.
>math
Mathematica 5.0 for Linux
Copyright 1988-2003 Wolfram Research, Inc.
-- Motif graphics initialized --
In[1]:= Eq = y /.
First[NDSolve[{y''[x] + y[x] == 0, y[0] == 1, y'[0] == 0},
y, {x, 0, 2*Pi}]]
Out[1]= InterpolatingFunction[{{0., 6.28319}}, <>]
In[2]:= Needs["DifferentialEquations`InterpolatingFunctionAnatomy`"]
In[3]:= ?InterpolatingFunction*
InterpolatingFunction
InterpolatingFunctionCoordinates
InterpolatingFunctionDerivativeOrder
InterpolatingFunctionDomain
InterpolatingFunctionGrid
InterpolatingFunctionInterpolationOrder
InterpolatingFunctionValuesOnGrid
In[4]:= InterpolatingFunctionDomain[Eq]
Out[4]= {{0., 6.28319}}
In[5]:=