MathGroup Archive 2006

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

Search the Archive

RE: How to use the max value from the solution of NDSolve ?

You can always get better answers if you give actual evaluable code so that
responders can evaluate it. Then the responders can give you the actual code
that will do what you want. As it is we don't know what the function f is
and we don't know why Mathemataica stopped at 2.6532 instead of going to t =

In any case, the first argument of the returned InterpolatingFunction
contains the domain for the interpolating function. You can fish it out
using Part.

David Park
djmp at

From: Cham [mailto:martin465 at]

Suppose I'm solving a differential equation with NDSolve :

NDSolve[{ x'[t] == f[ x[t] ],  x[0] == 3.4 ], { x }, {t, 0, 10}]

Mathematica then finds a solution like this :

Out[]=  {{ x -> InterpolatingFunction[{{ 0.,  2.6532}}, <>}}

Next, I need to make several graphs of the solution.  How can I point to the
max value t = 2.6532 without retyping that value each time, especially if I
change the initial condition x[0] == 3.4 and redo NDSolve again ?  What is
the name of the t_max found by Mathematica ?  Or how can I point to that
special value ?  Is there a way ?

  • Prev by Date: Re: Complex Numbers to list of points
  • Next by Date: Re: Oh, those complex values!!!
  • Previous by thread: Re: How to use the max value from the solution of NDSolve ?
  • Next by thread: Hadamard Integration