Paras31

255 Reputation

9 Badges

1 years, 360 days
Agricultural University of Athens
PhD Candidate

Social Networks and Content at Maplesoft.com

Teacher of Mathematics with a proven track record of working in education management. Proficient in Ease of Adaptation, Course Design, and Instructional Technology. Holds a Bachelor's degree in Mathematics from the University of the Aegean and a Master's in Applied Mathematics at the Hellenic Open University, focusing on Ordinary and Partial Differential Equations. His enthusiasm lies in the application of mathematical models to real-world contexts, such as epidemiology and population growth. Aside from his passion for teaching, Athanasios enjoys football, basketball, and spending time with his dogs.

MaplePrimes Activity


These are replies submitted by Paras31

@acer That is very useful. Thanks

@janhardo You have done an amazing job. Thank you for your answers

@C_R i have played with some more attractors. I'm addicted to Maple :)

with(DEtools); sigma := 10; rho := 28; beta := 8/3; sys := [diff(x(t), t) = sigma*(-x(t)+y(t)), diff(y(t), t) = -x(t)*z(t)+rho*x(t)-y(t), diff(z(t), t) = x(t)*y(t)-beta*z(t)]; with(DEtools); DEplot3d(sys, {x(t), y(t), z(t)}, t = 0 .. 200, [[x(0) = 1, y(0) = 1, z(0) = 1]], numpoints = 70000, maxfun = 0, linecolour = sin((1/3)*t*Pi), thickness = 1, orientation = [-40, 80], title = `Lorenz Attractor`)

 

with(DEtools); a := .2; b := .2; c := 5.7; sys := [diff(x(t), t) = -y(t)-z(t), diff(y(t), t) = x(t)+a*y(t), diff(z(t), t) = b+z(t)*(x(t)-c)]; with(DEtools); DEplot3d(sys, {x(t), y(t), z(t)}, t = 0 .. 600, [[x(0) = 10, y(0) = 0, z(0) = 10]], stepsize = 0.1e-1, numpoints = 70000, maxfun = 0, linecolour = sin((1/3)*t*Pi), thickness = 1, orientation = [230, 60], title = `Rössler Attractor`)

 

with(DEtools); unprotect(gamma); alpha := .14; gamma := .10; sys := [diff(x(t), t) = y(t)*(z(t)-1+x(t)^2)+gamma*x(t), diff(y(t), t) = x(t)*(3*z(t)+1-x(t)^2)+gamma*y(t), diff(z(t), t) = -2*z(t)*(alpha+x(t)*y(t))]; with(DEtools); DEplot3d(sys, {x(t), y(t), z(t)}, t = 0 .. 500, [[x(0) = -1, y(0) = 0, z(0) = .5]], stepsize = 0.5e-1, numpoints = 70000, maxfun = 0, linecolour = sin((1/3)*t*Pi), thickness = 1, title = `Rabinovich-Fabrikant Attractor`)

 

with(DEtools); a := 2.07; b := 1.79

sys := [diff(x(t), t) = y(t)+a*x(t)*y(t)+x(t)*z(t), diff(y(t), t) = 1-b*x(t)^2+y(t)*z(t), diff(z(t), t) = x(t)-x(t)^2-y(t)^2]

with(DEtools); DEplot3d(sys, {x(t), y(t), z(t)}, t = 0 .. 450, [[x(0) = .63, y(0) = .47, z(0) = -.54]], stepsize = 0.1e-1, numpoints = 4000, maxfun = 0, linecolour = sin((1/3)*t*Pi), thickness = 1, title = `Sprott Attractor`)

 

NULL


 

Download Attractors_2.mwDownload Attractors_2.mw

@C_R 

An attractor is called strange if it has a fractal structure, that is if it has a non-integer Hausdorff dimension. This is often the case when the dynamics on it are chaotic, but strange nonchaotic attractors also exist.  If a strange attractor is chaotic, exhibiting sensitive dependence on initial conditions, then any two arbitrarily close alternative initial points on the  attractor, after any of various numbers of iterations, will lead to  points that are arbitrarily far apart (subject to the confines of the  attractor), and after any of various other numbers of iterations will  lead to points that are arbitrarily close together. Thus a dynamic  system with a chaotic attractor is locally unstable yet globally stable: once some sequences have entered the attractor, nearby points diverge  from one another but never depart from the attractor.

The term strange attractor was coined by David Ruelle and Floris Takens to describe the attractor resulting from a series of bifurcations of a system describing fluid flow. Strange attractors are often differentiable in a few directions, but some are like a Cantor dust, and therefore not differentiable. Strange attractors may also be found  in the presence of noise, where they may be shown to support invariant  random probability measures of Sinai–Ruelle–Bowen type.

Examples of strange attractors include the  Rössler attractor, and Lorenz attractor.


THOMASNULL
with(DEtools); b := .20; sys := [diff(x(t), t) = sin(y(t))-b*x(t), diff(y(t), t) = sin(z(t))-b*y(t), diff(z(t), t) = sin(x(t))-b*z(t)]; DEplot3d(sys, {x(t), y(t), z(t)}, t = 0 .. 600, [[x(0) = 1.1, y(0) = 1.1, z(0) = -0.1e-1]], numpoints = 35000, linecolour = sin((1/3)*t*Pi), thickness = 1, linestyle = solid, title = `Thomas Attractor`)

 

 

 

DabrasNULL

a := 3.00; b := 2.7; c := 1.7; d := 2.00; e := 9.00; sys := [diff(x(t), t) = y(t)-a*x(t)+b*y(t)*z(t), diff(y(t), t) = c*y(t)-x(t)*z(t)+z(t), diff(z(t), t) = d*x(t)*y(t)-e*z(t)]; with(DEtools); DEplot3d(sys, {x(t), y(t), z(t)}, t = 0 .. 600, [[x(0) = 1.1, y(0) = 2.1, z(0) = -2.00]], numpoints = 70000, linecolour = sin((1/3)*t*Pi), thickness = 1, linestyle = dashdot, title = `Dabras Attractor`)

 

Halvorsen

NULLa := 1.89; sys := [diff(x(t), t) = -a*x(t)-4*y(t)-4*z(t)-y(t)^2, diff(y(t), t) = -a*y(t)-4*z(t)-4*x(t)-z(t)^2, diff(z(t), t) = -a*z(t)-4*x(t)-4*y(t)-x(t)^2]; with(DEtools); DEplot3d(sys, {x(t), y(t), z(t)}, t = 0 .. 600, [[x(0) = -1.48, y(0) = -1.51, z(0) = 2.04]], numpoints = 70000, linecolour = sin((1/3)*t*Pi), thickness = 1, linestyle = dash, title = `Halvorsen Attractor`)

 

Chen

 

 

with(plots); alpha := 5.00; beta := -10.00; delta := -.38; sys := [diff(x(t), t) = alpha*x(t)-y(t)*z(t), diff(y(t), t) = beta*y(t)+x(t)*z(t), diff(z(t), t) = delta*z(t)+(1/3)*x(t)*y(t)]; with(DEtools); DEplot3d(sys, {x(t), y(t), z(t)}, t = 0 .. 100, [[x(0) = -7.00, y(0) = -5.00, z(0) = -10.00]], numpoints = 35000, linecolour = sin((1/3)*t*Pi), linestyle = longdash, thickness = 1, title = `Chen Attractor`)

 


References

1. 

https://www.dynamicmath.xyz/strange-attractors/

2. 

https://en.wikipedia.org/wiki/Attractor#Strange_attractor

NULL

Download Attractors.mw

@janhardo but with different parameters and in the interval [ 0 800] the results are the following

restart;
unprotect(gamma);
 Digits := 15
 gamma := 0.318;
alpha := -1;
beta := 1;
delta := 0.1;
omega := 1.4;

sys := {diff(v(t), t) = -delta*v(t) - alpha*x(t) - beta*x(t)^3 + gamma*cos(omega*t), diff(x(t), t) = v(t)}:
 


ics := {v(0) = 0, x(0) = 0};
sol := dsolve(sys union ics, {v(t), x(t)}, numeric, range = 0 .. 800, output = listprocedure, maxfun = 0, abserr = 0.1e-17, relerr = 0.1e-12);
                  ics := {v(0) = 0, x(0) = 0}

 


X := subs(sol, x(t));
Y := subs(sol, v(t));


plot('[X(t), Y(t)]', t = 0 .. 800, numpoints = 500, title = "Trajectory", color = ["#40e0d0", "SteelBlue"]):

with(plots);
phaseplot := odeplot(sol, [x(t), v(t)], 0 .. 800, numpoints = 10000, color = red, thickness = 2, axes = boxed, gridlines, title = "Phase-space Diagram");

but in Matlab using the command ode45 the result is

@janhardo I have not thought about this approach. Very cool! However, we get the same result. Probably ode45 from MATLAB has some other options as a command.

@acer I tried the interval [270 800] now it is closer to the desirable plot but not identical

@acer When I use 

maxfun = 0, abserr = 0.1e-17, relerr = 0.1e-12

as @Preben Alsholm showed above the plot in the interval [789 900] is the same but in the interval [0 800] is different. Also when I run it, this message appears [Length of output exceeds limit of 1000000]

restart;
unprotect(gamma);
 Digits := 15
 gamma := 0.318;
alpha := -1;
beta := 1;
delta := 0.1;
omega := 1.4;

sys := {diff(v(t), t) = -delta*v(t) - alpha*x(t) - beta*x(t)^3 + gamma*cos(omega*t), diff(x(t), t) = v(t)}:
 


ics := {v(0) = 0, x(0) = 0};
sol := dsolve(sys union ics, {v(t), x(t)}, numeric, range = 0 .. 800, output = listprocedure, maxfun = 0, abserr = 0.1e-17, relerr = 0.1e-12);
                  ics := {v(0) = 0, x(0) = 0}

 


X := subs(sol, x(t));
Y := subs(sol, v(t));


plot('[X(t), Y(t)]', t = 0 .. 800, numpoints = 500, title = "Trajectory", color = ["#40e0d0", "SteelBlue"]);

with(plots);
phaseplot := odeplot(sol, [x(t), v(t)], 0 .. 800, numpoints = 10000, color = red, thickness = 2, axes = boxed, gridlines, title = "Phase-space Diagram");

phaseplot := odeplot(sol, [x(t), v(t)], 789 .. 800, numpoints = 3500, color = blue, thickness = 1, axes = boxed, gridlines, title = "Phase-space Diagram")

Hello @acer! I just used the command ode45 without specific options and I plotted the graphs as you can see below in my MATLAB's code. 

% Define parameters
gamma = 0.318;
alpha = -1;   
beta = 1; 
delta = 0.1;
omega = 1.4;   

% Define the system of equations
odeSystem = @(t, y) [y(2); 
                     -delta*y(2) - alpha*y(1) - beta*y(1)^3 + gamma*cos(omega*t)];

% Initial conditions
y0 = [0; 0];  % x(0) = 0, v(0) = 0

% Time span
tspan = [0 800];

% Solve the system
[t, y] = ode45(odeSystem, tspan, y0);

% Plot the results
figure;
plot(t, y(:, 1));
xlabel('Time');
ylabel('x(t)');
title('Solution of the nonlinear system');
grid on;

% Plot the phase portrait
figure;
plot(y(:, 1), y(:, 2));
xlabel('x(t)');
ylabel('v(t)');
title('Phase Portrait');
grid on;

% Define the tail (e.g., last 10% of the time interval)
tail_start = floor(0.9 * length(t));  % Starting index for the tail
tail_end = length(t);  % Ending index for the tail

% Plot the tail of the solution
figure;
plot(y(tail_start:tail_end, 1), y(tail_start:tail_end, 2), 'r', 'LineWidth', 1.5);
xlabel('x(t)');
ylabel('v(t)');
title('Phase Portrait - Tail of the Solution');
grid on;

 

Hello @Preben Alsholm. Your animations are amazing. However, as @Carl Love mentioned below the second plot below shows only positive values for x(t) whereas the corresponding plot in the paper shows only negative values for x(t). How could I find the right way to create this plot?

 @Carl Love, I found the   Sample Project  sample_project_0.pdf , so now I am sure the initial conditions are correct. However, my question is that when I run it in Matlab the solutions come out similar but when I run it in Maple they are the ones you posted. Why are there such big differences? Especially with the negative solutions

@acer  Thank you for your answer. I was told that Ι must first register for a membership account so the Maple Ambassador Program Manager can add me to the Ambassador Portal: https://www.mapleprimes.com/register/ . However, I can't find the portal to see if I am allowed access

Hello  @Carl Love. I had excactly the same results, for this reason I tried different initial conditions, but still the results were not like in the document

@janhardo I wish I could give you a like

@Scot Gould  My goal in this exercise was to plot the equilibrium points on the phase plane. However, I appreciate your advice. It is the first time I will use Maple for my lessons.

1 2 3 4 5 6 Page 5 of 6