Paras31

245 Reputation

9 Badges

1 years, 95 days
Hellenic Open University
Mathematician

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 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.

@janhardo the second one is very useful!! Thank you for your time

@C_R very cool result

@C_R I tried something simple from the assignments I give my students and it solved it. However, you are right about the particular expression you gave above and I got the wrong code from chatgpt

@nm Thank you very much for your response!

@Preben Alsholm oh! Thank you very much for your comment

I submitted an application for the Maple Ambassador Program back in May 2024. However, I have not received any response or updates regarding the status of my application. I am keen to know if the program is still available and if there are any steps I need to follow up on.

If anyone has information about the current status of the Maple Ambassador Program or can provide guidance on what I should do next, I would greatly appreciate it.

Thank you in advance for your assistance.

Best regards,

Athanasios Paraskevopoulos

@Carl Love So somes times,do I have to re-upload the worksheet?

1 2 3 4 5 6 Page 5 of 6