Paras31

130 Reputation

3 Badges

0 years, 171 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. Strong education professional with a Bachelor's degree with an emphasis in Mathematics from the University of Aegean. Currently, he is pursuing a Master's degree in Applied Mathematics at the Hellenic Open University, with a specific focus 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

Hello,

I noticed that the Linearly Implicit Euler method (also known as the Semi-Implicit Euler method) is not available in Maple's built-in ODE solvers. This method is useful for stiff ODEs, where part of the function is treated implicitly (for the linear term) and part is treated explicitly (for the non-linear term).

I know that the Linearly Implicit Euler method is a specialized method that probably does not find enough widespread use to justify its inclusion as a standard feature in Maple, especially given Maple's focus on numerical methods such as Runge-Kutta methods and fully implicit methods for rigid equations.

I’m wondering:

  1. Why isn’t this method included in Maple’s standard set of numerical solvers?
  2. How can I implement this method in my own code in Maple to solve stiff ODEs?

Any guidance or examples of implementation would be greatly appreciated!

Thank you!

Linearly_Implicit_Method.pdf

I’m currently working on a Maple project involving the symbolic differentiation of a user-defined potential energy function, which I then use in a system of differential equations. To implement this, I've been using placeholders like 'Un' when taking derivatives to substitute later during numerical calculations.

While this approach using placeholders works, I find it cumbersome and would prefer a more straightforward way to handle this symbolic differentiation without having to rely on intermediate placeholders like 'Un'.

Does anyone know if there is a more elegant way in Maple to achieve this functionality?

Specific Requirements:

  • I want to symbolically differentiate the user-defined function W directly.
  • The goal is to use this derivative in a system of differential equations for numerical solving.

Any suggestions on simplifying this process would be much appreciated!

Thanks in advance.

restart

NULL
W := proc (Un) options operator, arrow; -(1/4)*(b*d-e*q)^2/(b^2*(e+b*Un^2))-(2*b*c*m^2+(1/4)*q^2)*Un^2/b+c*Un^4 end proc

proc (Un) options operator, arrow; -(1/4)*(b*d-e*q)^2/(b^2*(e+b*Un^2))-(2*b*c*m^2+(1/4)*q^2)*Un^2/b+c*Un^4 end proc

(1)

 

 

diff(W(Un), Un)

(1/2)*(b*d-e*q)^2*Un/(b*(Un^2*b+e)^2)-2*(2*b*c*m^2+(1/4)*q^2)*Un/b+4*c*Un^3

(2)

b := -0.3070816340e-3; c := .4461893869; d := 0.1142581922e-1; e := 0.7675000601e-3; q := -0.3704049149e-2; m := 1.423206983; plot(W(Un), Un = -10 .. 10, title = "Graph of Potential W for set 1", color = blue, axes = boxed)

 

with(plots); with(DEtools); delta := .5; b := -0.222159366e-3; c := 1.088046084; d := 0.1308858509e-2; e := 0.394423507e-3; q := -0.64844084e-3; m := 1.518466566; W := proc (Un) options operator, arrow; -(1/4)*(b*d-e*q)^2/(b^2*(e+b*Un^2))-(2*b*c*m^2+(1/4)*q^2)*Un^2/b+c*Un^4 end proc; Un_placeholder := 'Un'; Wprime := diff(W(Un_placeholder), Un_placeholder); sys := {diff(u(t), t) = v(t), diff(v(t), t) = -delta*v(t)+subs(Un_placeholder = u(t), Wprime)}; ics1 := {u(0) = 0.1e-1, v(0) = 0.1e-1}; sol := dsolve(`union`(sys, ics1), numeric, output = listprocedure); xrange := -0.10e-1 .. 0.11e-1; yrange := -0.3e-1 .. 0.3e-1; phase_plot := odeplot(sol, [u(t), v(t)], 0 .. 100, title = "Phase Plot (Velocity vs Displacement)", numpoints = 8000, color = red, labels = ["u(t)", "v(t)"], axes = boxed, labeldirections = [horizontal, vertical]); vectorfield_plot1 := fieldplot([v, -delta*v+subs(Un_placeholder = u, Wprime)], u = xrange, v = yrange, arrows = medium, color = blue, axes = boxed); display([vectorfield_plot1, phase_plot], title = "Combined Phase Plot and Vector Field", labels = ["u(t)", "v(t)"], axes = boxed)

 

NULL

Download proteins.mw

I recently encountered an interesting issue when solving for the domain of a function in Maple using two different approaches, and I am curious about the differences in results between the following commands:

  1. domain := solve(0 < x and x <> 2, x);
  2. domain := solve({0 < x, x <> 2}, x);

I wonder if anyone could explain why Maple might treat these two syntaxes differently.

restart

``

h := proc (x) options operator, arrow; ln(x)/(x-2) end proc

proc (x) options operator, arrow; ln(x)/(x-2) end proc

(1)

domain_ln := solve(x > 0, x)

RealRange(Open(0), infinity)

(2)

denom_undefined := solve(x-2 = 0, x)

2

(3)

domain := solve(`and`(x > 0, x <> 2), x)

RealRange(Open(0), infinity)

(4)

solve({x > 0, x <> 2}, x)

{2 < x}, {0 < x, x < 2}

(5)

``

plot(h(x), x = 0 .. 10, discont = true, color = blue)

 

``


 

Download domain.mw

Hello everyone,

I successfully plotted the intersection point of two linear equations using a matrix-based approach. Still, I’m facing an issue when trying to achieve the same result using the second method — solving the system symbolically and plotting without matrices.

The Matrix-Based Approach (Working): I used the following steps to plot both equations and mark the intersection point (solution). However, when I switch to solving the system symbolically without matrices, I can plot the two lines, but I'm unable to plot the intersection point correctly.

It seems that the symbolic solution isn't being properly converted to a numeric form for pointplot, even though I’m using evalf.

Any help would be greatly appreciated!

Download Linear_System.mw

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

1 2 3 4 Page 1 of 4