6

2

I am trying to use the `Animate`

command to vary a parameter of the Lorenz Equations in 3-D phase space and I'm not having much luck.

The equations are:

$\begin{align*} \dot{x} &= \sigma(y-x)\\ \dot{y} &= rx-y-xz\\ \dot{z} &= xy-bz \end{align*}$

Where $\sigma, r, b > 0$ are parameters to be varied.

Insofar, I am using the `NDSolve`

command to numerically integrate these equations, then `ParametricPlot3D`

and the `Evaluate`

command to plot them.

Just for starters, I am trying to create an animate command to vary $\sigma$ for example from 0 to 10. Can anyone guide me in the right direction? My code looks like this so far:

```
σ = 10;
NDSolve[{x'[t] == σ (y[t] - x[t]),
y'[t] == 28 x[t] - y[t] - x[t] z[t], z'[t] == x[t] y[t] - 8/3 z[t],
x[0] == z[0] == 0, y[0] == 2}, {x, y, z}, {t, 0, 25}]
Animate[ParametricPlot3D[
Evaluate[{x[t], y[t], z[t]} /. solution], {t, 0, 25}], {σ, 0, 25},
AnimationRunning -> False]
```

This will generate an animated plot but obviously as `σ`

varies, nothing is changing since I am not implementing new `NDSolve`

commands. Can anyone guide me as to how I can implement successive `NDSolve`

's inside the animate command? Thank you

EDIT: I am using $r=28$ and $b=\frac83$ in place of `r`

and `b`

in my code.

I'm using Mathematic 10 on Linux and I'm unable to get these animations working. I succeed to get the result box (as show in the screenshot), but the animate button is stuck, I can't move it. Any clue ?

– Pol Dellaiera – 2016-02-23T12:53:24.0101Have a look at

`ParametricNDSolveValue`

. – b.gates.you.know.what – 2013-04-24T08:38:43.060Can I apply ParametricNDSolveValue or ParametricNDSolve to animations in 3D? – Abudin – 2013-04-24T09:19:28.353

Yes, please give it a try. – b.gates.you.know.what – 2013-04-24T10:08:21.823

1I don't think my version of mathematica actually has those functions in them Lol.. I have mathematica 8.0, are these 9.0 commands? – Abudin – 2013-04-24T10:21:20.170

Indeed, they are new in 9.0. – b.gates.you.know.what – 2013-04-24T10:23:05.827

Unfortunate :(, I have made some progress, not enough though. I have currently been able to Correctly animate my lorenz equations using time, but insofar I haven't been able to alter those parameters. – Abudin – 2013-04-24T10:30:21.320

For visualization, see also this answer by @kguler.

– Jens – 2013-04-24T17:14:16.183