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

- February 15th 2010, 02:00 PMhenry25Mathematica plot
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! - February 15th 2010, 02:21 PMshawsend
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}] - February 15th 2010, 11:41 PMhenry25
Amazing!!! You are genius.

Thank you !!!