Maple Questions and Posts

These are Posts and Questions associated with the product, Maple


I write a code to read the matrix elements and return information about row and column number of some specific data. This code is lengthy.

Is there a command to give this information directly, without necessity of developing a code?

For instance, assume M=`<|>`(`<,>`(1, 3, 2), `<,>`(4, 1, 3))

I need a command to show that each element how many times is repeated and where is located. For example, the number 3  is repeated 2 times in locations [2,1] and [3,2].

Hi everyone

I want to define N martices in maple with for loop but I don`t how can I do that in maple. In Matlab one may use the cell concept simply. For example if one has to define 10 matrices then he/she can do as following (of course in matlab):

for k=1:10

A{k}=[k,k^2;2k,2k^2];   % matrix experssion;


where A{1} is A1 which is 2x2 matrix, A{2} is A2 which is 2x2 matrix and so on. Now I want do this in maple. What should I do?

After solve this problem I want to define a block matrix whom elelments are these N mtrices. I will be thankfull if one help me in this case.

I need to import a large collection of other alphabets into maple for a project for example, how would i import the below collection and have them available on the pallette?



I have a complex function (i.e. f) with real values for real domain (real amounts of independent variable omega). If the previous calculations are conducted correctly, the minimum positive real root of mentioned function must be equal to 15.4182/sqrt(12). The formula of f is inserted as a plain text.


The plot of f is depicted as follows:

It seems that the root is between 4 and 5. The command fsolve does not work.


Also, the Newton iterative method is useless since the imaginary part exists.



for i while or(i=10, abs(eval(f,omega=x[i]))<1E-3) do


end do:


Please propose a way to find first positive real root of above function.

Moreover, I sometimes see discordant results when I use plot command to seek an approximate range for fsolve. I have another function (i.e. f(x)) that fsolve gives the root x=4, which is true but the plot command shows that the root is not occurred at x=4.


when using slideshow tool (F11), it just show the first page and arrows for going to other pages does not work. is it a bug?

Dear All. I am a beginner of using Maple. My calculation gives a complex expression as shonw in Line (23) in the attached figure. I used "simplify" to simplify it. However, the result is not the simplest form. The numerator can be divided by the denominator. Could you please tell me what command I can use to further simplify the expression? Any of your help is highly appreciated!

Best regards,


i cant solve this integral. please help me

int(exp(-1-1/v)*(1-exp(v^2/(2*t^2)))/v^2, v = 0 .. 1);

Dear All,

I have two beta distributed r.v. as:

p1 := RandomVariable(BetaDistribution(1, 100));

p2 := RandomVariable(BetaDistribution(1, 50));

my Maple stucks when i try to calculate numerically:

evalf(int(z*PDF(0.3*p1+0.7*p2, z), z = 0 .. 1))

Any help to speed this up or other solutions?

It seems PDF(0.3*p1+0.7*p2, z) is the pain.




How can find maximum and minimum values of function f(x,y) and location?

f(x,y):=cos(x*y)*(x^2+y^2)^0.5   from x=0..1,y=0..1

I would like to make a Monte Carlo 2-D ising model but I am clueless on how I should start and so I would appreciate any advise/guidlines on this.

Digits := 15: 
L := 1: 
E := 100: 
nu := 0.2:
G := E/2.6: 
h := 0.1: 
b := 0.1: 

s := -E*(diff(w(x), x, x))*sinh(sqrt(2*Pi^2*N*(1+nu)/L^2)*y)/(sqrt(2*Pi^2*N*(1+nu)/L^2)*cosh(sqrt(Pi^2*N*(1+nu)/(2*L^2))*h)): 

t := G*(diff(w(x), x))*(1-cosh(sqrt(2*Pi^2*N*(1+nu)/L^2)*y)/cosh(sqrt(Pi^2*N*(1+nu)/(2*L^2))*h)):

integrand := b*(int(t^2/(2*G)+s^2/(2*E), y = -(1/2)*h .. (1/2)*h))-(1/2)*E*b*h^3*evalf(Pi^2)*N*(diff(w(x), x))^2/(12*L^2): 

integrand := subs(diff(w(x), x, x) = S, diff(w(x), x) = F, w(x) = Z, integrand): 

EQ := subs(S = diff(w(x), x, x), F = diff(w(x), x), Z = w(x), diff(integrand, Z))-(diff(subs(S = diff(w(x), x, x), F = diff(w(x), x), Z = w(x), diff(integrand, F)), x))+diff(subs(S = diff(w(x), x, x), F = diff(w(x), x), Z = w(x), diff(integrand, S)), x, x): 

W := rhs(dsolve(EQ)):

u1 := (int((E*sinh(sqrt(2*Pi^2*N*(1+nu)/L^2)*y)/(sqrt(2*Pi^2*N*(1+nu)/L^2)*cosh(sqrt(Pi^2*N*(1+nu)/(2*L^2))*h)))^2, y = -(1/2)*h .. (1/2)*h))*(int((diff(W, x, x))^2, x = 0 .. L))/(2*E):

u2 := (int(G^2*(1-cosh(sqrt(2*Pi^2*N*(1+nu)/L^2)*y)/cosh(sqrt(Pi^2*N*(1+nu)/(2*L^2))*h))^2, y = -(1/2)*h .. (1/2)*h))*(int((diff(W, x))^2, x = 0 .. L))/(2*G):

U := simplify(u1+u2-(1/2)*E*b*h^3*evalf(Pi^2)*N*(int((diff(W, x))^2, x = 0 .. L))/(12*L^2))


It seems that solving of the above integration is a very time consuming process.

Please propose a way to solve above integration, if it is possible.


I need to simplify a differential equation by ignoring higher order terms. The terms are of the following form:


Here beta, zeta and theta are hinge deflections for a helicopter blade and thus can be assumed to be small. Everything other than delta__3 is a function of time, _dot represents a derivative wrt time. Higher order terms, such as those containing betan, zetan, thetan where n > 1, and terms containing combinations of the hinge deflections, i.e. betaj.zetak, betaj.thetak or zetaj.thetak where j,k >= 1 need to be neglected. Since beta, zeta and theta are functions of time, and the equation contains derivatives, maple functions like 'degree' and 'match' don't seem to work. Also, the solution suggested over here does not seem to be suitable for this problem, since my equation is very long (~70 pages) and the various derivatives appearing in it are not known.

Thanks in advance!



First: Is it possible to solve an pde equation/system where bcs are an array or matrix?

Second: Is it possible to get a discrete response in an array/matrix for this pde equation/system?

As an example I applied the heat conduction equation to a bar of 50 cm in length. Initially the bar has a uniform temperature field of 20ºC. The ends are maintained at a temperature of 0°C over time. I fixed a unitary thermal diffusivity.


I will put the two questions in another way:
I would like to insert the boundary conditions not as algebraic functions, but rather as array/matrix. It is possible?
I would like to result in not a procedure, but rather as array/matrix. It is possible?

Thank you for your help.

I'm working with some sum values, but for some reason that I can't figure out, this sum always returns 1.
Have I made some mistake in the way it's supposed to be typed in or why does it return 1? Below the sum I've filled out the spots manually to show how I want them to be.



x := 2; y := 2; sum(binomial(y, i)*(1/3)^i*(2/3)^(y-i)*(sum(binomial(x, j)*(1/3)^j*(2/3)^(x-j), j = i+1 .. x)), i = 0 .. y)



binomial(y, 0)*(1/3)^0*(2/3)^(y+0)*(sum(binomial(x, j)*(1/3)^j*(2/3)^(x-j), j = 1 .. x))+(1/3)*binomial(y, 1)*(2/3)^(y-1)*(sum(binomial(x, j)*(1/3)^j*(2/3)^(x-j), j = 2 .. x))+binomial(y, 2)*(1/3)^2*(2/3)^(y-2)*(sum(binomial(x, j)*(1/3)^j*(2/3)^(x-j), j = 3 .. x))






The issue concerns calculation of 2nd derivative of the numerical solution of 2nd order BVP for an ordinal DE.

Lets consider a test problem:


y(0)=0.2, y(1)=1

 Numerical solution was obtained by

dsolve([-diff(F(x), x$2)+F(x)= x*sin(5*x), F(0)=0.2, F(1)=1], [F(x)], type = numeric, 'output' = Array([seq(k/5, k=0..5)]));


dsolve returns the values of the solution and its 1st derivative (for the test example, a solution can be obtained analytically, but for general case I require numerical solution)..

It is needed to calculate the 2nd derivative of the solution.

I tried to use the Bessel method, when the solution’s 2nd derivative is calculated as the 2nd derivative of 5th degree polynomial having in consequent points t1, t2, t3 the values y(t1), y(t2), y(t3) and 1st derivatives y’(t1), y’(t2), y’(t3), all obtained from the numerical solution. Later I use Hermit piecewise-polynomial interpolation, based on values of the solution and its 1st and 2nd derivatives (polynomial of 5th degree).

Unfortunately, 2nd derivative of such interpolation has a large non-smoothness.

Here, we see the solution. It is smooth.

Here, 1st derivative. Still smooth enough.

Here, 2nd derivative. Typical view with large and sharp teeth.



Maybe, there exists a simple method for calculation of more smooth 2nd derivative?

Also. it is desirable that it would be embedded in Maple.

1 2 3 4 5 6 7 Last Page 1 of 1447