How to parametric plot deriv of interpolating func?
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1564] How to parametric plot deriv of interpolating func?
- From: "Ronald J. Riegert" <riegerrj at esvax.dnet.dupont.com>
- Date: Sat, 24 Jun 1995 06:29:22 -0400
- Organization: DuPont Experimental Station, Wilmington, DE USA
I have recently started working with NDSolve and just
encountered Mathematica interpolating functions for the first
time. The Mathematica book says that these can be dealt with
just like any other function, but I'm having difficulty using
their derivatives in parametric plots.
In particular, I use NDSolve to solve the second-order
differential equation diffeq for x[t], and call the result
soln:
soln=
NDSolve[{diffeq,x[0.]==0.,x'[0.]==1.},x,{t,0.,50.}][[1,1]]
This gives the interpolating function:
x -> InterpolatingFunction[ {0.,50.}, <>]
I'm interested in plotting D[x[t],t], so I do:
Plot[Evaluate[D[x[t] /. soln,t]],{t,0.,50.}]
which works fine. However, I'm really want to use D[x[t],t]
in a parametric plot, so I test by entering:
ParametricPlot[{t, Evaluate[D[x[t] /. soln,t]]},{t,0.,50.}]
which should give the same graph as the above Plot command.
Instead, it produces a bunch of error messages.
My question, therefore, is how do I go about using the
derivative of an interpolating function in a parametric plot?
Ronald J. Riegert
DuPont Experimental Station
riegerrj at esvax.dnet.dupont.com