Chaos and Strange Attractors: Lorentz Equations
Dr. Frank Wang
| > | restart: |
| > | with(DEtools): with(plots): |
Warning, the name changecoords has been redefined
| > | sigma, b, r := 10, 8/3, 21; |
| > | Eq1 := diff(x(t),t) = sigma*(-x(t) + y(t)); |
| > | Eq2 := diff(y(t),t) = r*x(t) - y(t) - x(t)*z(t); |
| > | Eq3 := diff(z(t),t) = -b*z(t) + x(t)*y(t); |
| > | DEplot3d({Eq1, Eq2, Eq3}, [x(t), y(t), z(t)], t=0..20, [[x(0)=5, y(0)=5, z(0)=5]], stepsize=0.01, linecolor=t, orientation=[-30,60]); |
![[Plot]](images/lorentz_5.gif)
| > | Soln1 := dsolve({Eq1, Eq2, Eq3, x(0)=5, y(0)=5, z(0)=5}, {x(t), y(t), z(t)}, type=numeric); |
| > | Soln2 := dsolve({Eq1, Eq2, Eq3, x(0)=5.01, y(0)=5, z(0)=5}, {x(t), y(t), z(t)}, type=numeric); |
| > | p1 := odeplot(Soln1, [t, x(t)], t=0..12, numpoints=800): |
| > | p2 := odeplot(Soln2, [t, x(t)], t=0..12, numpoints=800, color=blue): |
| > | display([p1, p2]); |
![[Plot]](images/lorentz_8.gif)
| > |