# Plotting a time delay in mathematica?

I'm having some difficulty plotting a phase space of a function f that exhibits time delay.

i.e.

s = NDSolve[{x'[t] == f[x[t - \[Tau]]], x[0] == 1 }, {x}, {t, 100}];
ParametricPlot[{x[t] /. s, x[t-\[Tau]] /. s}, PlotRange -> All]


i.e. how do I plot x(t-\[Tau]) vs x(t) ?

-
You don't show any information on v[t]. – yulinlinyu Dec 5 '12 at 5:19
apologies, those should all be x[t]. fixed! – randomafk Dec 5 '12 at 5:26
And also no information on f[x[t]]. – yulinlinyu Dec 5 '12 at 5:30
It's just a generic function. – randomafk Dec 5 '12 at 5:34
Okay, no generic solution. – yulinlinyu Dec 5 '12 at 5:36

References:

The following examples where (1) s is defined as a function of a numeric argument $\tau$, and (2) ParametricPlot is supplied with the parameter argument ({t,0,10}) that it needs, work as you intended:

 ClearAll[s];
f = Cos;
s[\[Tau]_?NumericQ] :=   NDSolve[{x'[t] == f[x[t - \[Tau]]], x[0] == t}, {x},
{t, 100}];
Quiet@ParametricPlot[Evaluate[{ x[t - #] /. First@s[#], x[t] /. First@s[#]} & /@
{1, 2, 3, 4}],  {t, 0, 100}, PlotRange -> All]


Another example with a non-constant initial function:

  ClearAll[s2];
s2[\[Tau]_?NumericQ] := NDSolve[{x'[t] == f[x[t - \[Tau]]],
x[t /; t <= \[Tau]] == t}, {x}, {t, 100}];
Quiet@ParametricPlot[ Evaluate[{x[t - #] /. First@s2[#], x[t] /.
First@s2[#]} & /@ {1, 2, 3, 4}], {t, 0, 100}, PlotRange -> All]


and, for the constant initial function in your example:

 ClearAll[s3];
s3[\[Tau]_?NumericQ] := NDSolve[{x'[t] == f[x[t - \[Tau]]], x[0] == 0.},
{x}, {t, 100}];
Quiet@ ParametricPlot[Evaluate[{x[t - #] /. First@s3[#], x[t] /.
First@s3[#]} & /@ {1, 2, 3, 4}], {t, 0, 100}, PlotRange -> All]


-