RE: How to use the max value from the solution of NDSolve ?
- To: mathgroup at smc.vnet.net
- Subject: [mg72194] RE: [mg72169] How to use the max value from the solution of NDSolve ?
- From: "David Park" <djmp at earthlink.net>
- Date: Thu, 14 Dec 2006 05:49:09 -0500 (EST)
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 = 10. 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 earthlink.net http://home.earthlink.net/~djmp/ From: Cham [mailto:martin465 at sympatico.ca] 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 ?