Hi!
i'm solving an equation
sol = NDSolve[{y''[t] + Sin[y[t]] == Sin[t], y[0] == 0, y'[0] == 0},
y, {t, 0, 5}]
Plot[Evaluate[y[t] /. sol], {t, 0, 5}]
I do not know how to plot y'[t] vs. y[t].
Any help appreciated!
Printable View
Hi!
i'm solving an equation
sol = NDSolve[{y''[t] + Sin[y[t]] == Sin[t], y[0] == 0, y'[0] == 0},
y, {t, 0, 5}]
Plot[Evaluate[y[t] /. sol], {t, 0, 5}]
I do not know how to plot y'[t] vs. y[t].
Any help appreciated!
Try this:
Clear[y]
sol = NDSolve[{y''[t] + Sin[y[t]] == Sin[t], y[0] == 0, y'[0] == 0},
y, {t, 0, 5}]
y[t_] = First[Evaluate[y[t] /. sol]]
yd[t_] = D[y[t], t]
ParametricPlot[{yd[t], y[t]}, {t, 0, 5}]
Amazing!!! You are genius.
Thank you !!!