0
$\begingroup$

I used the following commands:

s = NDSolve[{X'[t] == 10 (X[t] - Y[t]), 
   Y'[t] == X[t] (28 - Z[t]) - Y[t], Z'[t] == X[t] Y[t] - (8/3) Z[t], 
   X[0] == Y[0] == Z[0] == 0.001}, {X, Y, Z}, {t, 100}]

ParametricPlot3D[Evaluate[{X[t], Y[t], Z[t]} /. s], {t, 0, 100}]

but I am not sure if I am right, the results are strange. Am I right? How can I plot $X,Y,Z?$

$\endgroup$
5
  • $\begingroup$ Try restricting the PlotRange: ParametricPlot3D[Evaluate[{X[t], Y[t], Z[t]} /. s], {t, 0, 100}, PlotRange -> 40] -- looks like it then goes off to infinity instead of getting orbiting another critical point. $\endgroup$
    – Michael E2
    Commented Nov 23, 2019 at 16:27
  • $\begingroup$ nice, is the command "s=..." right? How can i plot $X,Y,Z$? $\endgroup$
    – George
    Commented Nov 23, 2019 at 16:29
  • 1
    $\begingroup$ Do you mean separately? Use Plot, look in the documentation for NDSolve, or look at these examples: mathematica.stackexchange.com/questions/134222/… $\endgroup$
    – Michael E2
    Commented Nov 23, 2019 at 16:34
  • $\begingroup$ the link doesn't help me. I am trying to understand, I am a beginner. I used reference.wolfram.com/language/ref/NDSolve.html, but I need to plot them in one graph $\endgroup$
    – George
    Commented Nov 23, 2019 at 16:43
  • $\begingroup$ Did you try replacing ParametricPlot3D with Plot? -- Also, if you want the Lorenz system, I think the first equation has X and Y switched. $\endgroup$
    – Michael E2
    Commented Nov 23, 2019 at 17:03

1 Answer 1

3
$\begingroup$

As long as this system is the Lorenz attractor, you have a changed sign in the first equation, so it blows up. Now it is fixed.

s = Quiet @ NDSolve[{X'[t] == -10 (X[t] - Y[t]), Y'[t] == X[t] (28 - Z[t]) - Y[t], Z'[t] == X[t] Y[t] - (8/3) Z[t], X[0] == Y[0] == Z[0] == 1/100}, {X[t], Y[t], Z[t]}, {t, 0, 10}]

ParametricPlot3D[Evaluate[{X[t], Y[t], Z[t]} /. s], {t, 0, 10}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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