Paras31

250 Reputation

9 Badges

1 years, 358 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

Consider a soil moisture transport problem with parameters: a = 9.88\times10^{-5} m/s,  b = -0.0065\ m3/m3, and D = 3.51*10^{-7} m2/s. The length is L=0.08 m, and no-flux (outflow) is assumed, meaning q=0. In this case θ0= 0.355$ and θL = 0.10.

A solution is expressed as a contour integral involving a complex-valued function V(k,x,t) and evaluated numerically in Maple using parameterized contours k1(r),k2(r),k3(s).

However, when this code is executed, Maple takes an extremely long time and appears to run indefinitely.

Could you suggest an alternative numerical or analytical approach ( that could improve efficiency when evaluating this type of contour integral?

a := 988/10000000;
b := -65/10000;
d := 351/1000000000;
q := 0;
theta0 := 355/1000;
thetaL := 1/10;
L := 8/100;
mu := a*(theta0 + b)/d;
c := a*(thetaL + b)/d;

mu := a*(theta0 + b)/d;
c := a*(thetaL + b)/d;

V := 1/(2*Pi)*exp(-d*k^2*t)*((exp(k*x*I)(mu - k*I) - exp(-mu*L)*exp(k*(L - x)*I)*(mu + L*I))*k*cos(k*L)/(k^2 + mu^2) + c*sin(k*L) - exp(k*L*I)(k*I + c)*sin(k*x)*(1 - exp(-mu*L)*exp(-I*k*L))/(mu + k*I) - (k*cos(k(L - x)) + c*sin(k(L - x)))*(1 - exp(-mu*L)*exp(k*L*I))/(mu - k*I) + 2*I*k*d*(k*cos(k(L - x)) + c*sin(k(L - x)))/(d*k^2 + a*q/d))/(k*cos(k*L) + c*sin(k*L)):

l := 5;
k1 := r -> l + I + r*exp(1/6*I*Pi);
k2 := r -> -l + I + r*exp(5/6*I*Pi);
k3 := s -> s + I;

dk1 := D(k1);
dk2 := D(k2);
dk3 := D(k3);

integrand1 := Re(eval(V, k = k1(r))*dk1(r) + eval(V, k = k2(r))*dk2(r));
integrand3 := Re(eval(V, k = k3(s))*dk3(s));
integrand2 := simplify(evalc(integrand1));

integrand4 := simplify(evalc(integrand3));
approx_u := proc(x, t) local temp1, temp2; temp1 := Int(eval(integrand2, [:-x = x, :-t = t]), r = 0 .. infinity, method = _d01amc); temp2 := Int(eval(integrand4, [:-x = x, :-t = t]), s = -L .. L, method = _d01ajc); evalf(temp1 + temp2); end proc;

Hello,

I’m trying to solve a problem from Modern Mathematical Methods for Scientists and Engineers using Maple, specifically applying the Fokas method (Unified Transform) to the heat equation on the half-line. The problem setup matches Example 9.1 from the book.

Everything runs fine until I try to plot the solution using plot3d.
 

restart; with(plots); with(LinearAlgebra); with(Student[VectorCalculus]); V := proc (k, x, t) options operator, arrow; -((1/2)*I)*exp(I*k*x-k^2*t)*(1/(k-I)+1/(k+I)-k*(1/(k^2+1)+1/(k^2-1)))/(Pi*k) end proc

proc (k, x, t) options operator, arrow; Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(I, Student:-VectorCalculus:-`*`(2, Pi)^Student:-VectorCalculus:-`-`(1)), Student:-VectorCalculus:-`*`(exp(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(I, k), x), Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(k^2, t)))), k^Student:-VectorCalculus:-`-`(1))), Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(k, Student:-VectorCalculus:-`-`(I))^Student:-VectorCalculus:-`-`(1), Student:-VectorCalculus:-`+`(k, I)^Student:-VectorCalculus:-`-`(1)), Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(k, Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(k^2, 1)^Student:-VectorCalculus:-`-`(1), Student:-VectorCalculus:-`+`(k^2, -1)^Student:-VectorCalculus:-`-`(1))))))) end proc

(1)

phi1 := (1/8)*Pi; phi2 := 7*Pi*(1/8); k1 := proc (r) options operator, arrow; r*exp(I*phi1) end proc; k2 := proc (r) options operator, arrow; r*exp(I*phi2) end proc; dk1 := proc (r) options operator, arrow; diff(k1(r), r) end proc; dk2 := proc (r) options operator, arrow; diff(k2(r), r) end proc

u1 := proc (x, t) options operator, arrow; evalf(int(Re(V(k1(r), x, t)*dk1(r)-V(k2(r), x, t)*dk2(r)), r = 0 .. 80)) end proc

proc (x, t) options operator, arrow; evalf(Student:-VectorCalculus:-int(Re(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`*`(V(k1(r), x, t), dk1(r)), Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(V(k2(r), x, t), dk2(r))))), r = 0 .. 80)) end proc

(2)

u := proc (x, t) options operator, arrow; exp(-x/sqrt(2))*cos(t-x/sqrt(2))+u1(x, t) end proc

proc (x, t) options operator, arrow; Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`*`(exp(Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(x, sqrt(2)^Student:-VectorCalculus:-`-`(1)))), cos(Student:-VectorCalculus:-`+`(t, Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(x, sqrt(2)^Student:-VectorCalculus:-`-`(1)))))), u1(x, t)) end proc

(3)

plot3d(u(x, t), x = 0 .. 3, t = 0 .. 2*Pi, axes = boxed, shading = zhue, style = surface, labels = ["x", "t", "u(x,t)"])

NULL


 

Download fokas_method.mw

Has anyone successfully handled similar integrals inside plot3d? Is there a better way to numerically evaluate the Fokas integral so Maple can plot it efficiently?

 

I'm solving the 1D heat equation using two different approaches, both involving Fourier transforms.

  1. First Attempt: Using pdsolve the Fourier method. This code either takes a very long time or doesn't produce a plot at all.
  2. Second Attempt: Manual Fourier transform. This one works fine and quickly plots the result.

Why does the first version using pdsolve(..., method = Fourier) result in slow or non-responsive behaviorplot3d, while the second version (manual transform) runs efficiently? Is the pdsolve result too symbolic or unevaluated for plotting? How can I make the first approach plot correctly?

Thanks for any insights!

ft1.mw

 I am writing notes on complex analysis, I need to use figures of contour paths to integrate on them, i want to create something like this

I tried to plot the contour for 
\oint_{|z|=2} \frac{1}{z^2+1}\,dz
I need to have connecting lines all around because the poles can not be isolated

with(plots); circle1 := plot([2*cos(t), 2*sin(t), t = 0 .. 2*Pi], color = blue, thickness = 2); circle2 := plot([(1/2)*cos(t), 1+(1/2)*sin(t), t = 0 .. 2*Pi], color = "Green", thickness = 2); circle3 := plot([(1/2)*cos(t), -1+(1/2)*sin(t), t = 0 .. 2*Pi], color = "Red", thickness = 2); sing1 := plottools[disk]([0, 1], 0.2e-1, color = white); sing2 := plottools[disk]([0, -1], 0.2e-1, color = white); label1 := textplot([.1, 1.1, "z = i"], font = [Arial, Bold, 12]); label2 := textplot([.1, -1.1, "z = -i"], font = [Arial, Bold, 12])

display(circle1, circle2, circle3, sing1, sing2, label1, label2, scaling = constrained, labels = ["Re", "Im"])

 
 

restart; f := proc (z) options operator, arrow; 1/(z^2+1) end proc; z := 2*exp(I*t); dz := diff(z, t); integrand := f(z)*dz; simplify(integrand); value(Int(integrand, t = 0 .. 2*Pi))

0

(1)

Download CIF.mw

I am trying to create a diagram in Maple using its plotting tools and simulate a simply connected domain and multiple paths between two points.

My first try is the following

with(plots); with(plottools)

 

 

curveDomainPts := [[-1, 0], [-.7, 1.2], [0, 1.5], [.7, 1.2], [1.2, 0], [.7, -1.2], [0, -1.4], [-.7, -1.2], [-1, 0]]; domain := polygon(curveDomainPts, color = "LightBlue", transparency = .4); z0 := [-.8, .6]; z := [.9, -.4]; curve1_pts := [[-.8, .6], [-.3, 1.0], [.4, .5], [.9, -.4]]; curve2_pts := [[-.8, .6], [-.7, 0.], [.2, -.6], [.9, -.4]]; curve1 := pointplot(curve1_pts, color = red, linestyle = dot, thickness = 2, connect = true); curve2 := pointplot(curve2_pts, color = green, linestyle = dot, thickness = 2, connect = true); pt1 := pointplot([z0], symbol = solidcircle, symbolsize = 15, color = black); pt2 := pointplot([z], symbol = solidcircle, symbolsize = 15, color = black); label1 := textplot([z0[1], z0[2]-.1, z__0], font = [Helvetica, Bold, 14]); label2 := textplot([z[1], z[2]-.1, "z"], font = [Helvetica, Bold, 14]); display(domain, curve1, curve2, pt1, pt2, label1, label2, scaling = constrained, axes = none, title = "Curved Domain with Arbitrary Paths")

 
 

NULL

I would like to ask if I could create something like that in Maple or should I use another software to draw it?

Download curved_domain.mw

1 2 3 4 5 6 7 Page 1 of 7