0
$\begingroup$

I have to solve the equation in range from 0 to 7pi:

x''[t]-(1/2)(1-x[t]^2)x'[t]+x[t]=0 

with boundary conditions

x(0)=1.5, x'[0]=0.

This is what I can do, but then I have a problem.

How to draw it with Evaluate in phase space? I also have to substitute the solution to the left side of differential equation and draw this formula in range of 0 < t < 7pi, on the y axis from -2 to 2. I have to use ParametricPlot and Evaluate, but don't know how. I mean, I tried to do so but it didn't work :/

$\endgroup$
  • 2
    $\begingroup$ Could you include your attempts with ParametricPlot in your question? $\endgroup$ – Chris K Nov 10 '18 at 19:27
3
$\begingroup$
eqn = x''[t] - (1/2) (1 - x[t]^2) x'[t] + x[t];
sol = NDSolveValue[{eqn == 0, x[0] == 3/2, x'[0] == 0}, x, {t, 0, 7 Pi}];

ParametricPlot[Evaluate[{t, sol[t]}], {t, 0, 7 Pi}, AspectRatio -> 1 / GoldenRatio]

enter image description here

Alternatively,

Plot[Evaluate @ sol[t], {t, 0, 7 Pi}]

same picture

$\endgroup$
0
$\begingroup$

enter image description here

Eq = X''[t] - (1/2) (1 - X[t]^2) X'[t] + X[t] == 0;
sol = NDSolve[{Eq, X'[0] == 0, X[0] == 3/2}, X, {t, 0, 7 Pi}];
Plot[X[t] /. sol, {t, 0, 7 Pi}]
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.