maple2015

135 Reputation

7 Badges

8 years, 230 days

MaplePrimes Activity


These are replies submitted by maple2015

@tomleslie

Thanks a lot

@tomleslie 

Maple 18 shows the bellow value!

7.92004811580310067452441713379

@tomleslie 

Thank you for the attached program

but result of attached file is not coincident with origin code.

I have to improve programming skills for solving time consuming problems in the least amount of time possible.

@Mac Dude thank you

@Markiyan Hirnyk 

Thank you for your comment

@Kitonum 

Therefore it is a bug! Like this:

http://www.mapleprimes.com/questions/204669-How-Does-Maple-Calculate-Floor-Limit

@Kitonum 

Thank you for your comment

I mean domain of the functions f=sqrt(x+2*sqrt(x-1)) and g=sqrt(x-2*sqrt(x-1)) is x>=1, but why domain of function f+g is from -infinity to infinity?

@tomles

new code runs in t=34.328 seconds (Maple18 + RAM 6GB + Core i5 Laptop)

by changing numerical parameters (without restart) because of cache memory it works in t=17.687 seconds.

Separating to smaller parts is an effective method!

Thank you

 

@tomleslie 

In which J is BesselJ(0,x) and Psi(r) is dimensionless function of w(r) (i.e. W(r)/Wmax)

"P" for psi has the minimum amount (B.C.s are Psi(0)=1 and Psi(a)=0)

arbitrary amount of between 0 and 0.5

Thank you for your comments

I need minimize an Integration and I use " Spectral Method" title for my question to clearly show what I need to do.

I use Vriational Calculus and solve Integration analytically by using Euler-Lagrange equation command:

EulerLagrange(f, t, x(t))

But I know want to solve problem numerically with Spectral Method

@Preben Alsholm 

Thank you

@acer  Thank you

@acer 

Hi

I dont know why Plotsetup don work. (with or without print)

If it is possible please fix it

restart: with(Maplets[Elements]): maplet := Maplet([[Label("Number of Elements: ", 'font' = Font("Calibri", 14)), TextField['Box1'](15), Button("OK", Shutdown(['Box1']))]]): a := Maplets[Display](maplet)[1]: if is((parse(a))::integer) then NE := sscanf(a, "%d")[1] else maplet := Maplet([[Label("Number of Elements Is An Integer Number: ", 'font' = Font("Calibri", 14))], [TextField['Box1'](20)], [Button("OK", Shutdown(['Box1']))]]): a := Maplets[Display](maplet)[1]: NE := sscanf(a, "%d")[1] end if: maplet := Maplet([[Label("Number of Nodes: ", 'font' = Font("Calibri", 14)), TextField['Box1'](15, value = cat("e.g.", NE+1)), Button("OK", Shutdown(['Box1']))]]): a := Maplets[Display](maplet)[1]: if is((parse(a))::integer) then NN := sscanf(a, "%d")[1] else maplet := Maplet([[Label("Number of Nodes Is An Integer Number: ", 'font' = Font("Calibri", 14))], [TextField['Box1'](20)], [Button("OK", Shutdown(['Box1']))]]): a := Maplets[Display](maplet)[1]: NN := sscanf(a, "%d")[1] end if: for i to NN do maplet := Maplet([[Label(cat("X Coordinate of Node ", i), 'font' = Font("Calibri", 14))], [TextField['B1'](20)], [Button("OK", Shutdown(['B1']))]]): a := Maplets[Display](maplet)[1]: X[i] := sscanf(a, "%f")[1]: maplet := Maplet([[Label(cat("Y Coordinate of Node ", i), 'font' = Font("Calibri", 14))], [TextField['B1'](20)], [Button("OK", Shutdown(['B1']))]]): a := Maplets[Display](maplet)[1]: Y[i] := sscanf(a, "%f")[1] end do: for i to NE do maplet := Maplet([[Label(cat("Node Number for Begining of Element ", i), 'font' = Font("Calibri", 14))], [TextField['B1'](20)], [Button("OK", Shutdown(['B1']))]]): a := Maplets[Display](maplet)[1]: B[i] := trunc(sscanf(a, "%f")[1]): maplet := Maplet([[Label(cat("Node Number for End of Element ", i), 'font' = Font("Calibri", 14))], [TextField['B1'](20)], [Button("OK", Shutdown(['B1']))]]): a := Maplets[Display](maplet)[1]: EN[i] := trunc(sscanf(a, "%f")[1]) end do: with(plottools): with(plots): bg := seq({line([X[B[i]], Y[B[i]]], [X[EN[i]], Y[EN[i]]]), plots:-textplot({[.5*(X[B[i]]+X[EN[i]]), .5*(Y[B[i]]+Y[EN[i]]), typeset(i)]}, color = orange, `if`(Y[B[i]] = Y[EN[i]], align = below, align = left))}, i = 1 .. NE), seq({POINTS([X[i], Y[i]], SYMBOL(BOX, 15, ALIGN = LEFT))}, i = 1 .. NN), axes = none: NCP := display(bg, seq({plots:-textplot({[X[B[i]], Y[B[i]], typeset(``(X[B[i]], Y[B[i]]))], [X[EN[i]], Y[EN[i]], typeset(``(X[EN[i]], Y[EN[i]]))]}, color = blue, align = left)}, i = 1 .. NE)): NNP := display(seq({plots:-textplot({[X[i], Y[i], typeset(i)]}, color = blue, align = left)}, i = 1 .. NN), bg, axes = none): plt := proc () plotsetup(bmp, plotoutput = `Nodes And Elements (Nodes Coordinates).bmp`, plotoptions = `height=400,width=400`): print(NCP): plotsetup(bmp, plotoutput = `Nodes And Elements (Nodes Numbers).bmp`, plotoptions = `height=400,width=400`): print(NNP) end proc: a := Maplets[Display](Maplet([[Label("Nodes and Elements Arrangement", font = Font(14, Tahoma))], [Plotter['PL']()], [Button("Node Coordinates", Evaluate('PL' = 'NCP')), Button("Node Numbers", Evaluate('PL' = 'NNP')), Button("Save Images", Evaluate('function' = "plt")), Button("Exit", Shutdown(""))]]))

1 2 3 4 5 6 Page 5 of 6