Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Dear Maple users

I could probably make the things happen in an ad hoc way myself, but I am pretty sure there is a smart and conceptual way to do it in Maple, which will make things much easier. That's why I am asking you. 

I am trying to create a Random Variable X build on the outcomes of throwing two dice, i. e. X is a function from the Sample Space consisting of all 36 different 2-tuples of the kind (x,y), onto the Real Numbers. Let's say the dice are colored: one green and one red. The outcome (3,2) means that the green die is displaying 3 dots and the red die is displaying 2 dots. The Random Variable can be any function on that Sample Space: The sum of the number of dots, the square of the number of dots on the green die plus the number of dots on the red die, or it could be something completely different. In this example X will have a finite number of possible values: x1, x2, ..., xn. Now I would like to create such a Random Variable in Maple in a convenient way. Afterward I would like Maple to throw dice by random a number of times, say 100,000 times and show me a Histogram or a list of how many times X got the result x1, x2, etc.

I hope someone can help me get going in a problem like the one described above. 

Kind regards,

Erik V.



How do I remove Array B from Array A? e.g.

B:=Array([3,6,9,12,15....])   assuming A contains all the elements of B.

to get [1,2,4,5,7,8,11....]

Also is it possible to do it in place?

.I am testing out the MutableSet command, There seems to be a problem with the number of emements that can be operated on. When N =100000 things are ok. When N=1000000 (or there abouts) the process doesn't terminate last line. Uorks ok for sets. Using Maple 2018.2 on Win10 64bit.



N := 900000



A := {seq(i^2, i = 1 .. N)}

B := {seq(A[i+1]-A[i], i = 1 .. nops(A)-1)}



C := MutableSet(seq(i^2, i = 1 .. N))

module MutableSet () local storage; global MutableSet; option object; end module





MutableSet(seq(C[i+1]-C[i], i = 1 .. N-1))




Hi, A small technical question for inserting index mathematical text into a title. My goal is to integrate this text  into my code? Thank you for your help

Hello all,

I would like to carry a copy of a 3dplot to my lectures to display them there, and also rotate them in real time in front of the students.

The computer in use there does not have Maple installed on it. I only could carry such a copy of a 3dplot on a USB stick there.

Is that possible?

Best regards and thank you in advance,


Hello every one,

My slideshow now contains a lot of animation sequences and take
a very long time to load and a large amount of physical memory (>20GB).

To reduce this size I have decided to convert these animations to GIF format.
Unfortunatly Maple/MaplePayer do not play GIF animations.

I decide to put URLs (image icons pointing to GIF files) in the document.
Now the GIF are play by a WEB browser (program to operate in fullscreen 
mode to minimize any disturbance in the audience with IE11).

Now the issue:
Using F11 to start the Slideshow, cliking the URL start the browser with the requested
animated GIF, that is fine, but now Maple/MaplePayer both auto-exit fullscreen
mode just after that click. The speaker (me) now need to manage the return to
fullscreen (F11) at the current slide while
thinking about what i have to
say next.

Is there any trick to prevent auto-exit from fulls-screen mode in this situation?

Thank you for your help



Des suggestions de solutions? Merci.

A) a) Écrire une procédure qui produit une itération du calcul babylonien de la racine carrée d'un nombre positif k à partir     d'une première approximation x0 .

    Entrée: k , x0 .

    Sortie:  x1 = (x0+ k/x0)/2 .

b) En utilisant la procédure trouvée en a), en écrire une autre, qui prend en entrée un entier positif n en plus des entiers k   et x0 vus en a) et qui retourne en sortie n itérations du calcul babylonien de la racine carée de k.


Écrire une procédure récursive Maple qui prend en entrée deux nombres n et k et qui utilise l'identité (n k) = (n -1k)+(n-1 k-1) pour retourner en sortie le coefficient binomial (n k) , cette procédure ne doit pas utiliser la commande Maple binomial.


Suggestions for solutions? Thank you.

A) a) Write a procedure that produces an iteration of the Babylonian calculus of the square root of a positive number k from a     first approximation x0.

    Input: k, x0.

   Output: x1 = (x0 + k / x0) / 2.

b) Using the procedure found in a), write another one, which takes as input a positive integer n in addition to the integers k and   x0 seen in a) and which returns in exit n iterations of the Babylonian calculation of the square root of k.

B) Write a Maple recursive procedure that takes as input two numbers n and k and uses the identity (n k) = (n-1 k)+ (n-1 k-1) to   return the binomial coefficient (n k), this procedure should not use the binomial Maple command.

> y0:=0;
> D[0](y):=1;
> D(D(y))[0]:=A;
> G(x):=diff(y(x),[x$3])=-1/2*y(x)*diff(y(x),[x$2]);
> for k from 1 to 12 do
> G(k):=D@@(k)(G)[0];
> value(G(k));
> od;
> for k from 1 to 12 do
> D@@(k)(y):=G[k];
> od;
> for k from 0 to 12 do
> y0:=y0+(G[k]/k!)*x^k;
> od;
> y(x):=y0;

The sign error calculating the derivative of a contravariant metric with respect to the covariant metric as diff(g_[`~nu`, `~tau`], g_[mu, eta]) and vice versa based on the Physics package is meanwhile resolved if you install the lastes update version 315.

However, a similar error occurs with the Tetrad package. If one calculates

diff(e_[~a, mu], e_[b, ~nu])

the obtained result is

eta_[~a, ~b] * g_[mu, nu].

But the is wrong! The correct result is

-e_[~a,nu] * e_[~b,mu].

Hi , how we can read the fractional differential equations in maple with out solving . I means just read and determine which is the order of fractional differential equations.


I've programmed weyl tensor before with the physics package, now I need to program weyl tensor with this hodge star operator in the front, does anyone know how this is done on maple? Thanks in advance! (I should have attatched a photo which shows the desired equation in the middle line!)

I want to find limit of the function sqrt(x^2 - 3 x + 2) from the left of the point x = 2. I tried
limit(sqrt(x^2-3*x+2), x = 2, left)

I got the result 0.  I know that, the limit is not exits. How to explain the result of Maple?

Another example, 
limit(sqrt(x^2-3*x+2), x = 2, real)

I got the output 0.

With Mathematica, I see at here

Hello everyone!

In previous versions of Maple (e.g. Maple 2016) it used to be possible to use scaletorange and colorscheme options together as in:

densityplot(sin(x+y), x = -1 .. 1, y = -1 .. 1, colorscheme = [black, red, yellow, white], scaletorange = -.5 .. .5);

But Maple 2018 returns an error:

Error, (in plots/densityplot) the scaletorange option cannot be used with the colorscheme option

Why is that and can one work around this error in any simple way?

Dear all

A question seem difficult to get an answer by hand, we need a few lines code to get the right answer.

If one roll a die  N times, we get a sequence of N numbers, the number of dots on top on the first roll, the number on the second roll, and soon.


How many times ( N) do we have to roll the die to have probability at least one half that all six numbers appear in our sequence


Many thinks





Dear all;


b[n]+b[n-1]+b[n-2]=0, for all n greater or equal 3





How can we deduce the value of this sequence b[n] for all n



4 5 6 7 8 9 10 Last Page 6 of 1519