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 replies submitted by Paras31

@acer 

Yes exactly! I tried running it again after fixing k*(L-x), but it still runs indefinitely.

Download resources.mw

@sand15 You are right the integrand must be integrand1 := Re(eval(V, k = k1(r))*dk1(r) - eval(V, k = k2(r))*dk2(r)):

@dharr Thank you!! It was difficult to find what to do hear. There were no other references for Fokas Method on Maple!


@Rouben Rostamian, I created a function, so the solution is given faster now, but when I try to replicate the two panels from the textbook, as you can see they are a bit different


 

restart; with(plots); with(ColorTools); 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+I)+1/(k^2-I)))/Pi end proc; k1 := proc (r) options operator, arrow; r*exp(((1/8)*I)*Pi) end proc; k2 := proc (r) options operator, arrow; r*exp(((7/8)*I)*Pi) end proc; dk1 := proc (r) options operator, arrow; exp(((1/8)*I)*Pi) end proc; dk2 := proc (r) options operator, arrow; exp(((7/8)*I)*Pi) end proc; u1 := proc (x::numeric, t::numeric) try evalf(Int(Re(V(k1(r), x, t)*dk1(r)-V(k2(r), x, t)*dk2(r)), r = 0 .. infinity)) catch: 0 end try end proc; approx_u := proc (x::numeric, t::numeric) Re(evalf(exp(-x/sqrt(2))*cos(t-x/sqrt(2))+u1(x, t))) end proc; surf := plot3d(proc (x, t) options operator, arrow; approx_u(x, t) end proc, 0 .. 3, 0 .. Student[VectorCalculus]:-`*`(2, Pi), grid = [40, 40], axes = boxed, labels = ["x", "t", "u(x,t)"], title = "Fokas Method Solution of Half-Line Heat Equation", shading = zhue)

 

``

 

 

p1 := plot(proc (x) options operator, arrow; approx_u(x, .1) end proc, 0 .. 2, color = red); p2 := plot(proc (x) options operator, arrow; approx_u(x, .2) end proc, 0 .. 2, color = green); p3 := plot(proc (x) options operator, arrow; approx_u(x, .3) end proc, 0 .. 2, color = blue); p4 := plot(proc (x) options operator, arrow; approx_u(x, .4) end proc, 0 .. 2, color = magenta); p5 := plot(proc (x) options operator, arrow; approx_u(x, .5) end proc, 0 .. 2, color = RGB(1.0, .5, 0.)); p6 := plot(proc (x) options operator, arrow; approx_u(x, .6) end proc, 0 .. 2, color = cyan); p0 := plot(exp(-x), x = 0 .. 2, linestyle = dash, color = black); display([p0, p1, p2, p3, p4, p5, p6], legend = ["u(x,0)", "t=0.1", "t=0.2", "t=0.3", "t=0.4", "t=0.5", "t=0.6"], legendstyle = [location = right, font = [Helvetica, 12]], view = [0 .. 2, 0 .. 1.2], labels = ["x", "u(x,t)"], labelfont = [Helvetica, 12], axes = boxed, title = "Short-Time Behavior of u(x,t)")

 

q1 := plot(proc (x) options operator, arrow; approx_u(x, .5) end proc, 0 .. 2, color = red); q2 := plot(proc (x) options operator, arrow; approx_u(x, 1.0) end proc, 0 .. 2, color = green); q3 := plot(proc (x) options operator, arrow; approx_u(x, 1.5) end proc, 0 .. 2, color = blue); q4 := plot(proc (x) options operator, arrow; approx_u(x, 2.0) end proc, 0 .. 2, color = magenta); q5 := plot(proc (x) options operator, arrow; approx_u(x, 2.5) end proc, 0 .. 2, color = RGB(1.0, .5, 0.)); q6 := plot(proc (x) options operator, arrow; approx_u(x, 3.0) end proc, 0 .. 2, color = cyan); q0 := plot(exp(-x), x = 0 .. 2, linestyle = dash, color = black); long_plot := display([q0, q1, q2, q3, q4, q5, q6], title = "Long-Time Behavior of u(x,t)", labels = ["x", "u(x,t)"], labelfont = [Helvetica, 12], legend = ["u(x,0)", "t=0.5", "t=1.0", "t=1.5", "t=2.0", "t=2.5", "t=3.0"], legendstyle = [location = right, font = [Helvetica, 10]], axes = boxed, view = [0 .. 2, -1.2 .. 1.2])

 

 

 

``


 

Download fokas_method_new.mw

@dharr Thank you for your answer and the time you spent looking at my question. I will try to find a faster way. 

@dharr oh!! Thank you this info is very usefyl.

restart; with(plots); with(plottools); TR := proc (col) options operator, arrow; cat(`#mo("►",mathcolor="`, col, `")`) end proc; TL := proc (col) options operator, arrow; cat(`#mo("◄",mathcolor="`, col, `")`) end proc; TU := proc (col) options operator, arrow; cat(`#mo("▲",mathcolor="`, col, `")`) end proc; TD := proc (col) options operator, arrow; cat(`#mo("▼",mathcolor="`, col, `")`) end proc; `print/slash` := proc (x, y) Typesetting:-mrow(Typesetting:-Typeset(x), Typesetting:-mo(), Typesetting:-mo("/", fontweight = "bold"), Typesetting:-mo(), Typesetting:-Typeset(y)) end proc; h := .2; Rint := 1/4; Rout := 2; aint := arcsin(h/Rint); aout := arcsin(h/Rout); opt := color = red, thickness = 2; theta1 := 0-(1/3)*Pi-.1; theta2 := Pi+(1/4)*Pi+.3; phi1 := 3*Pi*(1/4)-.3; phi2 := 2*Pi+(1/4)*Pi+.3; x1 := Rint*cos(theta1); y1 := 1+Rint*sin(theta1); x2 := Rint*cos(theta2); y2 := 1+Rint*sin(theta2); x3 := Rint*cos(phi1); y3 := -1+Rint*sin(phi1); x4 := Rint*cos(phi2); y4 := -1+Rint*sin(phi2); t := .5; x_arrow1 := (1-t)*x1+t*x4; y_arrow1 := (1-t)*y1+t*y4; x_arrow2 := (1-t)*x2+t*x3; y_arrow2 := (1-t)*y2+t*y3; display(arc([0, 0], Rout, aout .. 3*Pi-aout, opt), arc([0, 1], Rint, theta1 .. theta2, opt), arc([0, -1], Rint, phi1 .. phi2, opt), line([x1, y1], [x4, y4], opt), line([x2, y2], [x3, y3], opt), textplot([x_arrow1, y_arrow1, TU("red")], font = [Times, 20]), textplot([x_arrow2, y_arrow2, TD("red")], font = [Times, 20]), textplot([0, Rout, TL("red")], font = [Times, 20]), textplot([0, -Rout, TR("red")], font = [Times, 20]), textplot([0, -1.25, TR("red")], font = [Times, 20]), textplot([0, 1.25, TL("red")], font = [Times, 20]), textplot([.2, -1., z = -i], align = {above, left}), textplot([.2, 1., z = i], align = {above, left}), axis[1] = [tickmarks = []], axis[2] = [tickmarks = []], view = [-1.2*Rout .. 1.2*Rout, -1.2*Rout .. 1.2*Rout], scaling = constrained)

proc (col) options operator, arrow; cat(`#mo("►",mathcolor="`, col, `")`) end proc

 

proc (col) options operator, arrow; cat(`#mo("◄",mathcolor="`, col, `")`) end proc

 

proc (col) options operator, arrow; cat(`#mo("▲",mathcolor="`, col, `")`) end proc

 

proc (col) options operator, arrow; cat(`#mo("▼",mathcolor="`, col, `")`) end proc

 

proc (x, y) Typesetting:-mrow(Typesetting:-Typeset(x), Typesetting:-mo(), Typesetting:-mo("/", fontweight = "bold"), Typesetting:-mo(), Typesetting:-Typeset(y)) end proc

 

 
 

Download Plotting_contour_integrals.mw

@mmcdara  I played a bit with the code you gave me, and now I have the desired results. Thanks

@Rouben Rostamian  I thought about that, and sure, it's handy. However, I would like to know if I can do the same with Maple. I searched on Google for a tutorial, but I did not find anything.

@mmcdara, sorry for my English!! This is exactly what I was trying to do

@janhardo I think this is what I am looking for! Thank you

@mmcdara First of all, thank you for your answer. Your worksheet is handy, and I will play with the paths. My question is, if there is a way to create random curves on Maple

@Scot Gould ok! I clearly understood your point

@nm This explanation it is very helpful. Thank you!

@Scot Gould oh ok understood, I am trying to find other ways to write my code. Thank you!!

When I am trying to upload the content of my worksheet on MaplePrimes, it just appears the link

1 2 3 4 5 6 Page 1 of 6