Paras31

170 Reputation

3 Badges

0 years, 295 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 questions asked by Paras31

I'm trying to solve a system of coupled differential equations numerically, but I'm getting the following error

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

The error occurs at the dsolve step, despite trying to ensure that all equations and conditions are in the correct form (sets/lists).

Could someone help me identify what I'm missing here?

Thanks in advance!

L := 200; K := 99; kappa := 1; omegaD := 1; beta := 1; delta := 0.5e-1; j := 2; tmax := 3000; h := L/(K+1); nsp := [`$`(-(1/2)*L+h*i, i = 0 .. L/h)]; km := nops(nsp); omegaD2 := h^2*omegaD^2; deltaHat := h*delta; a := 2; var := seq(x[i](t), i = 1 .. km); initialPositions := seq(x = a*sin(j*h*Pi*nsp[i]/L), i = 1 .. km); initialVelocities := seq((D(x[i]))(0) = 0, i = 2 .. km-1)

boundaryConditions := [x[1](t) = 0, x[km](t) = 0]

equations := seq(diff(x[n](t), t, t)-kappa*(x[n+1](t)-2*x[n](t)+x[n-1](t))+deltaHat*(diff(x[n](t), t))-omegaD2^2*(x[n](t)-beta*x[n](t)^3) = 0, n = 2 .. km-1)

sol := dsolve({equations, boundaryConditions, initialPositions, initialVelocities}, var, numeric, method = rkf45, range = 0 .. tmax)

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

 

NULL

Download dsolve_error.mw

I am trying to create the plot for the dynamics of the discrete Klein - the equation gives Gordon equation (DKG) with friction for t=0 and t=3000.

As you can see below, creating the plot for t=0 is pretty easy. However, for t=3000, I tried to create a procedure to produce the desired plots, but when I ran the code, nothing happened. The worksheets are evaluated all the time. There are no results.

I am studying  for my thesis  the dynamics of the discrete Klein - the equation gives Gordon equation (DKG) with friction:

 

diff(U(t), t, t)-K(`U__n+!`-2*U__n+`U__n-1`)+delta*U__n+(D(W))(U__n) = 0, beta > 0, delta > 0

In the above equation, W describes the potential function:

W(U__n) = -(1/2)*`ω__d`^2*U__n^2+(1/4)*beta*`ω__d`^2*U__n^4

 

to which every coupled unit U__nadheres. In Eq. (1), the variable U__n(t)is the unknown displacement of the oscillator occupying the
n-th position of the lattice, and is the discretization parameter. We denote by the distance between the oscillators of the lattice. The chain (DKG) contains linear damping with a damping coefficient, while β s the coefficient of the nonlinear cubic term.

 

For the DKG chain (1), we will consider the problem of initial-boundary values, with initial conditions

 

U__n(0) = `U__n,0` and U__n(0) = `U__n,1` and `in`(`U__n,1`, 2*real^(k+2))

and Dirichlet boundary conditions at the boundary points x__0 = -(1/2)*Land "`x__k+1`=L/(2),"that is,

U__0 = `U__k+1` and `U__k+1` = 0, t >= 0*3

 

Therefore, when necessary, we will use the short notation `Δ__d`or the one-dimensional discrete Laplacian

`U__Δ__d__U__n∈ℤ` = `U__Error loading this structure.`-2*U__n+4*`U__n-1`

 

We investigate numerically the dynamics of the system (1)-(2)-(3). Our first aim is to conduct a numerical study of the property of Dynamic Stability of the system, which directly depends on the existence and linear stability of the branches of equilibrium points. 

For the discussion of numerical results, it is also important to emphasize the role of the parameter `ω__d`By changing the time variable proc (t) options operator, arrow; 1/h end proc we rewrite Eq.(1) in the form

 

diff(U(t), t, t)-`Δ__d`*U(t)+(diff(delta(x), x))*U__n = `Ω__d`(-`βU__n`^3+U__n)^2, t > 0, `Ω__d`^2 = h^2*`ω__d`^2, diff(delta(x), x) = `hδ`

 

The change in the scaling of the lattice parameter of the problem makes it important to comment here on the nature of the continuous and anti-continuous limit. For the anti-continuous limit, we need to consider the case in Eq. (1) where proc (`ω__d`) options operator, arrow; infinity end procIn the case of nonlinearity present in the governing equations, the continuous limit needs to be taken as well. On the other hand, for small values of the parameter, the system becomes significant. However, because of the model we consider, we take the asymptotic linear limit as

proc (`ω__d`) options operator, arrow; 0 end proc

 

We consider spatially extended initial conditions of the form:

U__n(0) = `U__n,0` and `U__n,0` = a*sin(`jπhn`/L), j = 1, () .. K

 

where h = L/(K+1) is the distance of the grid and  a > 0 is the amplitude of the initial condition
We also assume zero initial velocity:

 

"(`U__n`(0)=`U__n,1`=0) "

 

• 

t=0

 

restart; with(plots); a := 2; j := 2; L := 200; K := 99; h := L/(K+1); n := Vector([`$`(-(1/2)*L+h*i, i = 0 .. K+1)]); U_n0 := a*map(proc (x) options operator, arrow; sin(j*Pi*x/L) end proc, h*n)

plot([seq([n[i], U_n0[i]], i = 1 .. K+2)], style = point, color = blue, axes = boxed, gridlines, grid = [true, true], labelfont = [TIMES, 12])

 

Now I am trying to create plot for different values of a.

a = {2, 1.82, 1.85, 1.9, 1.95}, K = 99, L = 200, beta = 1, delta = 0.5e-1, `ω__d`^2 = 1

restart; with(plots)

L := 200; K := 99; j := 2; omega_d := 1; beta := 1; delta := 0.5e-1

h := L/(K+1); n := Vector([`$`(-(1/2)*L+h*i, i = 0 .. K+1)])

dt := 0.5e-1; tmax := 3000; tspan := [seq(0+dt*i, i = 0 .. trunc(tmax/dt))]

NULL

a := 1; U0 := a*map(proc (x) options operator, arrow; sin(j*Pi*h*x/L) end proc, n); U0[1] := 0; U0[K+2] := 0; Udot0 := Vector(K+2, 0)

discrete_laplacian := proc (U) local i, Laplacian; Laplacian := Vector(K+2); for i from 2 to K+1 do Laplacian[i] := U[i+1]-2*U[i]+U[i-1] end do; Laplacian[1] := 0; Laplacian[K+2] := 0; return Laplacian end proc

NULL

U := U0; Udot := Udot0; for t to num_steps do Lap := discrete_laplacian(U); Ucube := map(proc (x) options operator, arrow; x^3 end proc, U); for i from 2 to K+1 do Udot[i] := Udot[i]+dt*(2*omega_d^2*U[i]-beta*Ucube[i]-delta*Udot[i]+Lap[i]) end do; for i from 2 to K+1 do U[i] := dt*Udot[i]+U[i] end do; U[1] := 0; U[K+2] := 0; if `mod`(t, 1000) = 0 then plotU := plot(n, U, style = line, color = blue, title = cat("Displacement at t=", t*dt), labels = ["n", "Displacement"], grid = [true, true]); display(plotU) end if end do

NULL


My target is the following plots

Download Numerical_Simulation_of_discrete_Klein-Gordon_Equation.mw

I attempted to create a phase plot using the Odeplot command in Maple, but the resulting plot isn't as smooth as I'd like. To improve the smoothness, I tried increasing the numpoints parameter to 20,000, but this resulted in the error message: [Length of output exceeds limit of 1000000]. What adjustments should I make to obtain a smoother phase plot without encountering this error?

 

restart;
r := 1;
b := 1;
c := 0.01;
a := 0.36;
mu := 0.4;
beta := 0.75;

sys := {diff(x(t), t) = r*x(t) - b*x(t)^2 - c*x(t)*y(t) - beta*x(t)*y(t)/(a + x(t)), diff(y(t), t) = -mu*y(t) + beta*x(t)*y(t)/(a + x(t))};
 
ics := {x(0) = 0.2, y(0) = 0.05};

sol := dsolve(sys union ics, {x(t), y(t)}, numeric, range = 0 .. 20000, maxfun = 0, output = listprocedure, abserr = 0.1e-7, relerr = 0.1e-7)

with(DEtools);
DEplot3d(sys, {x(t), y(t)}, t = 0 .. 20000, [[x(0) = 0.2, y(0) = 0.05]], maxfun = 0, numpoints = 35000, thickness = 1, linestyle = solid);
 

 

 

 

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

 

 

Download extra_steps.mw

Hi everyone,

I’m encountering an issue with Maple 2024 on my MacBook Air M1 (2020) running macOS Sonoma 14.6.1. Every time I try to log in to Maple Cloud from within the application, the entire program freezes and becomes unresponsive. I’ve tried restarting the application and my MacBook, but the problem persists.

Is anyone else experiencing similar issues with Maple 2024 on an M1 Mac running macOS Sonoma? If so, have you found any solutions or workarounds? I’ve checked for updates and even reinstalled the software, but the problem still exists.

Any help or advice would be greatly appreciated!

Thanks in advance!

Hello community,

I recently became a Maple Ambassador and  I would like to ask about some portals that were mentioned to me. Are these portals on mapleprimes and how can I access them?

I was thinking that I could also create a LinkedIn group, so that I could present there the activities I will do at the university, the online workshops I will do in the future or upload material from student projects.

Best Regards,

Athanasios Paraskevopoulos

1 2 3 4 5 Page 3 of 5