I have some code that I am happy with:
ClearAll["Global`*"]; Show[
Table[sol =
NDSolve[{D[xtraj[t],
t] == (Sinh[2 xtraj[t] (t - 2)])/(Cosh[2 xtraj[t] (t - 2)]),
xtraj[0] == n}, xtraj[t], {t, 0, 4}];
ParametricPlot[{xtraj[t], t} /. sol, {t, 0, 4},
PlotRange -> All], {n, -3, 4 - 1, 1}]]
But I want to add a 3rd axis with the following equation:
P1 = (E^(-(1/2) (t + x - xi)^2 σ^2) Sqrt[π/ 2] σ (1 + E^(2 x (t - xi) σ^2) +
2 E^(x (t - xi) σ^2) Cos[2 k0 x]))
REMEMBER: I am using the value of xtraj[t] to plot, not sol.
So it will be a 3D plot with: xtraj[t], t, P1.
Any help would be much appreciated.


k0 = 1; \[Sigma] = 1; xi = 1; p1 = (E^(-(1/2) (t + x - xi)^2 \[Sigma]^2) Sqrt[\[Pi]/2] \[Sigma] (1 + E^(2 x (t - xi) \[Sigma]^2) + 2 E^(x (t - xi) \[Sigma]^2) Cos[2 k0 x])); Show[Table[ sol = NDSolve[{D[xtraj[t], t] == (Sinh[2 xtraj[t] (t - 2)])/(Cosh[2 xtraj[t] (t - 2)]), xtraj[0] == n}, xtraj[t], {t, 0, 4}]; ParametricPlot3D[{xtraj[t], t, p1 /. x -> xtraj[t]} /. sol, {t, 0, 4}, PlotRange -> All], {n, -3, 4 - 1, 1}]]? $\endgroup$