Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi, I'm stuck on how to create a procedure, 'Arrange' that sorts a list of integers so that the numbers go from smallest to largest. So if I have a list such as: [3,6,1,9,0,4] ,

Arrange([3,6,1,9,0,4]) = [0,1,3,4,6,9]

I have a procedure that produces a sequence where we denote 'x' as the first number in the list, and returns: a list of all the numbers in the list less than x, x, a list of all the numbers greater than x.

i.e. returns: [1, 0], 3, [6, 9, 4]

Arrange := proc(L)
local L1,L2,n,x,i;
if n=0 then
elif n=1 then 
return L[1];
elif n>1 then
x:= L[1];

for i from 2 to n do 
if L[i] < x then

end if:
end do:
end if:
return L1,x,L2;

end proc:

could anyone help on how I can expand on this to get the procedure that I want?


p.s. I know that there is already an inbuilt 'sort' function in Maple, but I'm trying to create the procedure myself!

Good day.

I have a problem with the numerical approximation of incomplete elliptic integrals of the first kind in the case when the argument and the modulus are complex numbers. 

Let's consider an incomplete elliptic integral of the first kind EllipticF((a+I*b)*x, c+I*d), where a,b,c,d are arbitrary real numbers and x is very large number. Here is the code:

R0 := EllipticF((a+I*b)*x, c+I*d);
with(MultiSeries, series):
R1 := series(R0, x = infinity, 2);
a := .5; b := 1.75; c := 10; d := 12.5; x := 10^6;
evalf(R0); evalf(R1);

Below you can see that answers are different


While the same code for an incomplete elliptic integral of the second kind gives the correct approximation:

R00 := EllipticE((a+I*b)*x, c+I*d);
R11 := series(R00, x = infinity, 2);
a := .5; b := 1.75; c := 10; d := 12.5; x := 10^6;
evalf(R00); evalf(R11);

What is the difference?

I have a question that concerns visualising the output of a simple matrix. For instance, take a 4 x 10 matrix in the example attached (rows are denoted by i and columns, j) with entries either 0 or 1. This gives the on/off relationship between any i and j. Let i and j denote 2-dimensional locations whose coordinates are known. The matrix gives the connections (1's) between both locations; 0's otherwise.

Can Maple output a map that visually represents the connections between nodes?

In the example here, I wish to plot location 2 (in i) connected to location 3 (in j), location 3 (in i) connected to location 1 (in j), and so on. Can I output a plot / map that presents the nodes with radiating / connecting arrows?

I'm hoping someone can help, since the matrix form is not quite appealing for a large number of entries.


Thanks for reading!


A := Matrix(4, 10, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (2, 4) = 1, (2, 5) = 0, (2, 6) = 1, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0, (3, 4) = 0, (3, 5) = 1, (3, 6) = 0, (3, 7) = 1, (3, 8) = 1, (3, 9) = 1, (3, 10) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (4, 6) = 0, (4, 7) = 0, (4, 8) = 0, (4, 9) = 0, (4, 10) = 0})






Hello dear freinds

when i solve the ode i found exponential solutions.i want to find trignometric solutions of an ode.

I am attaching maple file..

Thanks for ur


the foolowing code is for contour plot at Delta =-12.71 but there is somthing coulnd understand not works

I dont know why this not work





implicitplot3d(f, epsilon=0..20,Y = 0 .. 1,Delta=-40*Pi..40*Pi, labels=[epsilon,X,Delta],tickmarks=[3,3,3],style=surface);

contourplot(solve(f,Delta),epsilon=-20..20,Y=0..1,contours=[-12.71],axes=boxed,thickness=2,color=black,font=[1,1,18],tickmarks=[2, 2],linestyle=1, numpoints=50000);

Dear Community,

I would like to have a 3D matrix, where each of the matrix elements is a collection of different kind of data, e.g. integers, real (float) numbers, logical variable, 1D vector of integers or reals, 1D vector of logical variables, etc. In other words I would like to store a collection of different data on a 3D grid. This collection is of course identical for all grid points, i.e. matrix elements. I experimented with DataFrames, but it did not allow me to use vectors. How could I realize such a structure in Maple? It is done quite easily in MATLAB e.g. with the "struct" command, or in FORTRAN with the "Type" command.

Many tx in advance,

best regards



HI all,


Let all variables be integers here.

I am trying to search 3 variables , "A","B",and "C" so that f(A*x2+B*x+C) factors into two binomials.

Here, f(y) = y2+y+19.

Choose a search space of 0<A<10 and 0<B<30 and 0<C<100.  

I am having some trouble with my Maple code.

Here is how far I got -





I want to visualize data provided by the Maximize command. The output I get is of the following form (example):

 [.358700275060090779, [p[0] = .192413186080606, p[1] = 0.906594292940704e-1, p[2] = 0.677108912885780e-1, p[3] = 0.609551830556988e-1, p[4] = 0.589744573790909e-1, p[5] = 0.585737058072817e-1, p[6] = 0.589744573787748e-1, p[7] = 0.609551830550955e-1, p[8] = 0.677108912877626e-1, p[9] = 0.906594292931833e-1, p[10] = .192413186079858]]
I want to plot the sequence p[0], ..., p[10] with the command LineChart (for example).

My question is: How to automatically "clean up" output as above so I can feed it to LineChart?

with(DifferentialGeometry): with(Tensor):

DGsetup([x1, x2, x3, x4], M)

g1 := evalDG(dx1dx3+dx2dx4-u22(dx3)^2-u11(dx4)^2+2*u12*dx3dx4)

C1 := Christoffel(g1)


^^^ This is my code, I know theres something wrong with the metric but I'm not sure what, any help would be appreciated thanks! (This code gives me no answer).

u11*u22-u12^2+u13+u24 = 0   - This is the original eq I was working off.

I need code for finding the order of convergence of helleys method its really urgent please help 

Dear members,

Having learnt the use of parse, I tried making a document with module. The document works fine. But I could not not take the codes inside the ComboBoxes inside module UpdateExpr().

Also initialisation does not work since parse command is not allowed by maple here as can be seen by the output in MathContainer_fplusx below.

The document works fine after executing !!!.

Can any one help me avoid all the codes inside combobox except the UpdateExpr() code, please? Thanks.



Composition of Functions



Select f(x) and g(x)















Does maple has an in-built command for levy distribution? Thank you.

Is there any packages / function I can use to ...? I've checked the Physic [Diff] about diff on function with anticommutative variables.

As i know i can introduce a proc like: theta*diff(f,x)+diff(f,theta)  where f is a super-function to represent superderivation.

Question is I want treat super-derivative as one operator not a combination, because i wanna compare the order like comparing order of diff(f,x).

Any advice on dealing super function by maple is needed. My first time dealing with super function i havent got any clues..

Dear members,

I have made a simple document with 3 components ComboBox, TextArea and MathContainer.

A selection from ComboBox gets entered into TextArea, but not in MathContainer. I tried all codes with and without quotes, expression, value, "value" etc.

Any simple code I missed, please let me know.



``This is a comboBox to select an expression for entry into TextArea0 and MathContainer0





TextArea0            This is MathContainer0






Codes in ComboBox EditSelectCode

use DocumentTools in
end use;




2 3 4 5 6 7 8 Last Page 4 of 1519