MathGroup Archive 2009

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

Search the Archive

Re: How to get data from solvin' numerically differential

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104188] Re: How to get data from solvin' numerically differential
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Thu, 22 Oct 2009 02:19:52 -0400 (EDT)
  • References: <200910200852.EAA06203@smc.vnet.net> <20091020074951.EUPPU.620828.imail@eastrmwml47> <hbmo9i$jtj$1@smc.vnet.net>

Hi,

> Should all the values(points of numerical solution of differential equation)
> appear after the command ListLinePlot?

No, what you will get is the points that Plot (heuristically) chooses to
show the most important features of the function, this might or might
not be the data you want.

> I can't see values of this points.

to get the points that really were used by NDSolve you should look at
the InterpolatingFunctionValuesOnGrid-Function from
DifferentialEquations`InterpolatingFunctionAnatomy`

> Do you know, how can I integrate this interpolated function?

you can use Integrate directly on the InterpolatingFunction-Objects,
Integrate knows about interpolating functions and integrates them as
correct and fast as possible, e.g.:

s=y/.NDSolve[{y'[x]==y[x] Cos[x+y[x]],y[0]==1},y,{x,0,30}][[1]];

si=Head[Integrate[s[x],x]]

Plot[{s[x],si[x]},{x,0,30}]

hth,

albert


  • Prev by Date: Re: Suggestions on how to use standard engineering symbols
  • Next by Date: Re: Mapping colours in DensityPlot
  • Previous by thread: Re: How to get data from solvin' numerically differential
  • Next by thread: How to get data from solvin' numerically differential equation?