NDSolve

• To: mathgroup at yoda.physics.unc.edu
• Subject: NDSolve
• From: Erlebacher Gordon <erlebach at icase.edu>
• Date: Fri, 22 Oct 93 09:27:26 -0400

```I have a problem with the routine NDSolve.  Spefically, I am trying
to solve the differential equation:

y'[x] = 3 y[x]

y[0] =  1

using the command  NDSolve.  Here is a transcript of my session:

----------------------------------------------------------------------

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

Out[1]= {{y -> InterpolatingFunction[{0., 3.}, <>]}}

----------------------------------------------------------------------
What is this InterpolatingFunction.  Let us try another equation:

y'[x] = 5 x y[x]

y[0] = 2

----------------------------------------------------------------------

In[3]:=  NDSolve[{y'[x] == 5 x y[x],y[0] ==2}, y,{x,0,3}]

Out[3]= {{y -> InterpolatingFunction[{0., 3.}, <>]}}

----------------------------------------------------------------------
Note that the InterpolatingFunction is the same in both cases, yet the
equation is different.

Now how do I retrieve a list of numbers from this InterpolatingFunction[]
routine?  What I really would like to do is subtract the second solution
from the first, and retrieve the value at the end points.