MathGroup Archive 2012

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

Search the Archive

Re: NDSolve solutions

  • To: mathgroup at
  • Subject: [mg125132] Re: NDSolve solutions
  • From: Alexei Boulbitch <Alexei.Boulbitch at>
  • Date: Thu, 23 Feb 2012 05:47:26 -0500 (EST)
  • Delivered-to:

On Feb 20, 8:46 am, Niles <niels.martin... at> wrote:
> Hi
> I have solved an ODE using NDSolve, and I plot the solution like this:
> ParametricPlot[{z[t], z'[t]} /. solution, {t, 0, 2 maxTime}, PlotRange
> -> {{0, 0.2}, {0, 450}}, AspectRatio -> 0.75]
> The curve shown (the velocity as a function of position) I want to use
> in a new mathematical expression. How can I do that? If I use z'[t],
> then it is as a function of time, which is no good to me.
> I appreciate your help.
> Best regards,
> Niles.

To clarify, what I have is a system of ODEs of the form

dx/dt = v
dv/dt = a = C*f(x),

where C denotes a constant and f(x) is some function of x. This system
is easy to solve using e.g.

NDSolve[x''[t] == -C*f(x), x[0] == 0, x'[0] == 0}, x, {t, 0, tMax}];

The solution x[t] (or rather, its derivative x'[t]) I need to use in
the following expression:

B(x) = A + v(x)

where A denotes a constant and v(x) is the velocity as a function of
position x. But please note that v is as a function of x, not t. What
should I do to achieve this?

Best regards,

Hi, Niles,

The answer depends upon what are you going to do with B(x). But generally, you may want to operate with B in the parametric form. That is, the pair
{x(t), B(t)} defines the B(x) dependence. If you need to build plot B=B(x) than do it like in the example below:



But you may also do anything else in the parametric form.

Have fun, Alexei

Alexei BOULBITCH, Dr., habil.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch at<mailto:alexei.boulbitch at>

  • Prev by Date: Re: Why the FourierTransform gives two different answers?
  • Next by Date: Re: Why HoldForm[] shows this expression in red in notebook?
  • Previous by thread: Re: NDSolve solutions
  • Next by thread: what type of InterpolatingFunction?