MaplePrimes Questions

Dear all,

Does anyone know how to do this case?

For example, given a sets A={20,15,10,30,46,78}. Then I put the upper bound = 50
I want to add the elements and stop adding before reaching or exceed the upperbound. So, what I want to achieve is

B={20,15,10} since 20+15+10 +30 = 75. Stop in 4th element.

Thank you

 

Hello

I have a series of plots saved in fig0 (fig0:=rtable(1..number_of_figures);).  I had them plotted using plot:-display(fig0) but I could not figure out how to remove the frame box that separates each figure nor how to control the space between them when using size.

 

An exaggerated example follows

Many thanks

Ed

 

 

Hi everybody:

I have created a matrix in Maple but the Maple show it like as follow picture, How can I see the members of this matrix? 

tnx...

Hello everyone

I try to solve the system of nonlinear equations, where three variables are inside of integrals, for different values of the real parameter q.

It seems that  not for all values of q the system has a solution because I substitute different q but the function fsolve does not give any numerical answer or the special message even after the long evaluation. 

Here the code:

restart;
q := 70;
k0 := 100; n := 3; r := 1.1; t := 0.1e-2; Eg := n/((n+1)^(3/2)+1)^(2/3); kF2 := (1/((n+1)^(3/2)+1))^(1/3);
R1 := int(a^2*tanh(sqrt((a^2-mu)^2+d1^2)/(2*t))/sqrt((a^2-mu)^2+d1^2), a = 0 .. k0);
R2 := int(a^2*tanh(sqrt((a^2-mu+Eg)^2+d2^2)/(2*t))/sqrt((a^2-mu+Eg)^2+d2^2), a = 0 .. k0);
R3 := int(a^2*(1-(a^2-mu)*tanh(sqrt((a^2-mu)^2+d1^2)/(2*t))/sqrt((a^2-mu)^2+d1^2)), a = 0 .. k0);
R4 := int(a^2*(1-(a^2-mu+Eg)*tanh(sqrt((a^2-mu+Eg)^2+d2^2)/(2*t))/sqrt((a^2-mu+Eg)^2+d2^2)), a = 0 .. k0);
Eq1 := evalf(k0+k0*(r-1)-(1/2)*Pi*r*kF2*q-R1);           
Eq2 := evalf(k0-(1/2)*Pi*kF2*q-R2);
Eq3 := evalf(2/3-R3-R4);
fsolve({Eq1, Eq2, Eq3}, {d1, d2, mu});

I know that this system has the solution for some values of q but why I can't get the solution or the answer using fsolve?

Thank you in advance.

 

Update. I apologize, I made some errors in expressions R2 and R4. I have corrected the question and the code. But the problem is still unresolved.

I've been trying to learn how to do Grid-based parallelization in Maple, but I've been running into a weird error.

Suppose I run the following simple Grid code, which just runs on a single node:

X := [1, 2, 3, 4]; babyGrid := proc (X) [Grid:-MyNode(), X] end proc; Grid:-Launch(babyGrid, X);

 I get this error:

Error, (in Grid:-Launch) invalid input: Launch expects its 7th argument, exports, to be of type ({list, set})({name, string}), but received [1, 2, 3, 4]

So for some reason it assumes that X is the exports variable. This error goes away if I instead make X an array X:=Array([1,2,3,4])

In this case the code runs fine and produces the expected output.

What's the difference here? Is there a reason that Grid can't take list arguments? Is there a reason this is so obvious that it isn't documented?

 

I find different commands for for different math expressions from mathContainer to be plotted in a plot component.

In the enclosed document, the mathcontainer expression plots outside, but not inside the plot component. What is the mistake, can any one tell me?

Thanks.
 

restart; with(plots)

inequal(`or`(`and`(`and`(3 <= y, x < 2*y+8), 2*y-6 < x), `and`(`and`(`and`(-5/3 < y, y < 3), x < 2*y+8), -y+3 < x)), x = -2 .. 15, y = -4 .. 11, optionsfeasible = [[color = "black"], [color = "red"]])

 

"In the following empedded plot componenet, it is not plotted. What is the mistake I am making"? Can anyone help?""

 

``       

Code inside Click to Plot Button -  Edit Click Code

use DocumentTools in
with(plots):
plt:= GetProperty("MathContainer0",expression);
SetProperty("Plot0",value,plt);
end use;

 

``In the plot component "Plot0" it is not plotting!!

 

 

``


 

Download Doubt4thMar2019_Plot_inequalexpressions.mw

Update

I am not sure what happened, but now after starting Maple, these PDE's no longer hang. Even though I tried them before number of times before posting to make sure.  This is strange. I do not know what happened.

Any way, there is no issue any more. These do not hang in version 319.

original post

Hello Maple experts.

FYI, I noticed some pde's are no longer solved (hang) after downloading latest physics package cloud version 319, when before when using version 301 these were solved.

version()
 User Interface: 1362973
         Kernel: 1362973
        Library: 1362973
                            1362973
Physics:-Version()
 "C:\Maple_updates\Physics_Updates_319.maple", 2019, March 3, 
    17:7 hours, version in the MapleCloud: 319, version installed in this 
    computer: the "Physics Updates" is not  installed.

Any idea why this happened? It is possible this is due to bug fix of course, but thought to point this out.

These PDE's were solved with Maple 2018.2.1 with Physics ver. 301 but not in ver. 319

#now not solved or hangs, before it was solved in 7 seconds
pde := diff(u(x, t), t) = (1/20)*(diff(u(x, t), x$2))+t;
bc := u(0, t) = 5, (u(1, t)+ eval( diff(u(x,t),x),x=1)) = 10;
ic:= u(x, 0) = -40*x^2/3+45*x/2+5;
pdsolve([pde, bc,ic], u(x, t));

#now it hangs, before it was solved in 0.2 seconds
pde :=  (A*y^2+B*x^2-a^2*B)*diff(w(x,y),x)+(C*y^2+2*B*x*y)*diff(w(x,y),y) = 0;
pdsolve(pde,w(x,y));

#now hangs when it was solved before in 5 seconds
pde := 2*diff(w(x,y),x)+((lambda+a-a*sin(lambda*x))*y^2 +lambda -a -a*sin(lambda*x))*diff(w(x,y),y) = 0;
pdsolve(pde,w(x,y));

#now hangs when it was solved before in 1.8 seconds
pde := diff(w(x,y),x)+((lambda+a*sin(lambda*x)^2)*y^2 + lambda -a +a*sin(lambda*x)^2)*diff(w(x,y),y) = 0;
pdsolve(pde,w(x,y));

Using windows 10.

 

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.

A:=Array([1,2,3,4,5,6,7,8...1000]
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.


 

restart

N := 900000

900000

(1)

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

(2)

upperbound(C)

900000

(3)

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

``


 

Download Mutable_set_issue.mw

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

THTitleQuestion.mw

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,

Markus

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

LL

 

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.

 B)

É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.

TRADUCTION:

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.

restart:
> 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;

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