MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

I have worksheet that generates very large matrices and it seems to save all results, so it requires large amount of RAM to load and storage to save it.  

There used to be a pop-up prompt not to save the results of the worksheet - to save space, but that no longer occurs.  Can someone help me to switch on that prompt not to save results or otherwise prevent saving results, when I open the spreadsheet.  It maybe that I agreed not to be prompted again, but now I am regretting it!!

MRB 

hello

I have a equation of 4th degree with two variable (x,y) that i want to solve my equation according to one of variable (y).

myeq:= y^4 +(-(5/96)*x^2 -(5/6)*x -2) *y^3 +(-(55/288)*x^2 -(7/12)*x +1) *y^2 +((65/288)*x^2 +(2/3)*x) *y +(5/288)*x^2 -(1/4)*x;

i use "solve(myeq,y)" but can't solve. how can i solve this equation?

I watched a webinar training:   Maple Training for Engineers, Researchers, and Scientists.

 

The file demonstrated topics and used collapsible regions with a colored band across the document and a + / - sign on the left to open/close the section or region.  Different than the document gray down arrow.

 

I have searched all the documentation and can not find how to do this.   I have done this in other programs like MathCAD to close and lock a region from viewing or editing of specific formulas.

 

Any help always appreciated.

 

Regards,

Bill

I'm currently working on building a Grid Layout for a project, and I'm having trouble coding in the RunWindow and GetFile elements into buttons under the grid layout. I've gone through the overviews and examples for them, but had no luck. I'm using Maple 2016.1 for OS X.

Additionally, the structure of the code is slightly different as to how many of the example worksheets structure their Grid Layout code, since the code originated from a Maplet Builder file. I.e. in the example worksheets they would follow as:

maplet := Maplet('onstartup' = 'Action1', 'reference' = 'Maplet1',
         BoxLayout('background' = "#D6D3CE", 'border' = 'false', 'halign' = 'center', 'inset' = '5', 'reference' = 'BoxLayout1', 'valign' = 'center', 'vertical' = 'false', 'visible' = 'true',
                       BoxColumn( BoxCell('hscroll' = 'never', 'value' = 'Button1', 'vscroll' = 'never'),
         GridLayout('background' = "#D6D3CE", 'border' = 'false','halign'='center','inset'='5', 'reference' = 'GridLayout1', 'valign' = 'center', 'visible' = 'true',
                   GridRow('valign' = 'top', GridCell('height' = '1', 'hscroll' = 'never', 'value' = 'BoxLayout1', 'vscroll' = 'never', 'width' = '1' ))),
         Window('layout'= 'GridLayout1', 'reference' = 'W1', 'resizable' = 'true', 'title' = "Maplet"),
          Action('reference' = 'Action1', RunWindow('window'= 'W1'))

However the structure for the code I am working with has action at the very start of the code, follwed by the the code for the buttons then layouts/window.  E.g. (the code has been shortened)

with (Maplets[Elements]):
maplet :=
Maplet('onstartup'='Action1','reference'='Maplet1',
Action('reference'='clickButton1'),
Action('reference'='clickButton9',
Evaluate('function'='plot3d(x^2*cos(y),x = -1 .. 1,y = -2*Pi .. 2*Pi)','target'='Plotter1','waitforresult'='true')),
Action('reference'='clickButton11'),
Action('reference'='clickButton12'),
Action('reference'='clickButton10'),
Button('background'="#D6D3CE",'caption'="Insert Molecular Geometry",'enabled'='true','foreground'="#000000",'onclick'='clickButton1','reference'='Button1','visible'='true'),

....

BoxLayout('background'="#D6D3CE",'border'='false','halign'='center','inset'='5','reference'='BoxLayout1','valign'='center','vertical'='false','visible'='true',
BoxColumn(
BoxCell('hscroll'='never','value'='Button1','vscroll'='never'),
BoxCell('hscroll'='never','value'='BoxLayout2','vscroll'='never'),
BoxCell('hscroll'='never','value'='BoxLayout3','vscroll'='never'),
BoxCell('hscroll'='never','value'='BoxLayout9','vscroll'='never'),
BoxCell('hscroll'='never','value'='BoxLayout14','vscroll'='never')),
BoxColumn(
BoxCell('hscroll'='never','value'='Label3','vscroll'='never'),
BoxCell('hscroll'='never','value'='Plotter1','vscroll'='never'),
BoxCell('hscroll'='never','value'='Slider1','vscroll'='never'))),
GridLayout('background'="#D6D3CE",'border'='false','halign'='center','inset'='5','reference'='GridLayout1','valign'='center','visible'='true',
GridRow('valign'='top',
GridCell('height'='1','hscroll'='never','value'='BoxLayout1','vscroll'='never','width'='1'))),
Window('layout'='GridLayout1','reference'='Window1','resizable'='true','title'="Maplet"),
Action('reference'='Action1',
RunWindow('window'='Window1'))):

Maplets[Display](maplet);

 

If anyone would be able to provide an example of code or some guidance I could follow that would be greatly appreciated! 

hello

i have some implicit plot that i want intersect between them.

for example:


implicitplot(x^2+y^2<1,x=-3..3,y=-3..3);
implicitplot((x-1)^2+y^2<1,x=-3..3,y=-3..3);

how can i do intersect between them!?

thanks for guidance

Hi there,

Recently, I started to learn maple. I came across a problem. 

I entered following codes:

with(plots);

ball := proc (x, y) fieldplot([x, y], x = -1 .. 1, y = -1 .. 1) end proc;

ball(1,1);      


However, it showed me Error, (in plots/animate) bad range arguments -10. = -10 .. 10, -10. = -10 .. 10.

could someone tell me how to put fieldplot into procedure? Very much appreciated.

I am trying to use y* to label a point on the axis of a graph made with DEplot, and am currently unable to.


with(DEtools);
NLC := diff(y(t), t) = k*(Am-y(t));
Am := 20; k := .1;
ivs := [y(0) = 10, y(0) = 30, y(0) = 50];
DEplot(NLC, y(t), t = 0 .. 20, ivs, tickmarks = [default, [20 = y^`*`]], font = [default, default, 30]);

makes y`*` apear as the label, as does the code

tickmarks = [default, [20 = y^`&ast;`]]

wheras if i remove the `` marks I get an error

 

 

 

how to use Appell hypergeometric function in maple? Is there any command for that like hypergeom ???

I have the PDE u_{xx}+u_{yy} = 1 with BC: u|_{x^2+y^2=1} =0 ;

 

how to write down the command of the BC in solving this PDE?, btw can I make maple show me how to solve this PDE analytically?

 

Thanks in advance.

 

Here are the lines that I wrote so far:

pde := diff(u(x, y), x, x)+diff(u(x, y), y, y) = 1;

ans := pdsolve(pde)

 

how to add the BC correctly to pdsolve? I am not sure how to write the condition x^2+y^2=1 and that u will get a value on this boundary.

 

Greetings to all. I am writing to present a Maple computation that is somewhat of a programming challenge. A recent Post at Math.Stackexchange.Com asked to compute the number of inequivalent colorings of the vertices and edges of a regular hexagon with two colors available for the vertices and three colors for the edges (vertex colors different from edge colors) under the simultaneous action of the dihedral group D6 on the vertices and edges. This is a standard application of Burnside's Lemma and can be computed very straightforwardly using a negligible amount of computing resources. Important: this is the accepted method, it is documented at the MSE link and it works quite well. The answer is that there are 4183 unique configurations.

My purpose in this message is to propose the following task: write a program in your favorite programming language to verify this number by enumerating all possible configurations, computing the orbits of each, and tracking the orbits to eventually arrive at, we hope, the answer, 4183 as stated. This being MaplePrimes the programming language in question is Maple, of course. I implemented the enumeration method and it can be found in the attachments to this message. The algorithm takes about two minutes on the machine that I used and peak memory allocation is about 70 MB. This made for a frustrating debug cycle as it needed a two minute wait to see the result of the changes made to the source code. I therefore decided to use Perl instead of Maple. Imagine my surprise when the very same algorithm (consult attachment) implemented in Perl had a running time on the same machine of about three seconds, used a hash table of about 1.6MB and had resident memory footprint of 6MB. (In fact the hash table can be reduced to half size by simplifying the keys which makes them a bit more difficult to read during debugging.) Let me state it like this: Perl vs. Maple resulted in a speed gain of a factor of forty and a memory savings of 90 percent.

Now how to profit from this experience. A question naturally appears at this point: can we optimize the Maple code so as to bring it into the range of the parameters of the Perl? Here we permit all sorts of optimizations that may occur to the Maple coder other than using Burnside where the motivation is that for many of us including myself there always remain additional Maple programming techniques to learn and acquire. I hope this makes for an enjoyable exercise and I am looking forward to seeing a Maple implementation that can compete with the Perl. This is not code golf but conciseness is a plus.

hex-maple.txt

hex-pl.txt

Happy computing!

Best regards, Marko Riedel

PS: I suspect working with hash tables rather than sets may be a start.

MAPLE 15 on Windows 10

I have a file on which I can no longer open. This happened after my computer made me long on again after being gone for a little while. Maple was not running when I got back on. This is not unusal and I just clinck on the file and restart.

This time this did not work.

It comes up with a message asking me to select an input mode. Whatever I select even 'Plain text' it just hangs.

I'd send you an image, but I don't see how to do it. The button provide only allows for something with  url and the snip I made is on my desktop.

I need to get thiis worksheet back. I've put a lot of effort into it.

-Traruh

Here is my code in Maple.

 

#Solve the initial-value problem using the technique of question 2. Find the implicit solution.
eqn3:=(exp(x)+y)*dx+(2+x+y*exp(y))*dy=0;
(exp(x) + y) dx + (2 + x + y exp(y)) dy = 0
#subject to y(0)=1.
M:=exp(x)+y; N:=2+x+y*exp(y);
exp(x) + y
2 + x + y exp(y)
int(M, x); int(N,y);
exp(x) + y x
y x + 2 y + y exp(y) - exp(y)
implicitsoln1 := exp(x)+y*x+2*y+y*exp(y)-exp(y)=C;
exp(x) + y x + 2 y + y exp(y) - exp(y) = C
y1 := solve(implicitsoln1,y);
RootOf(-exp(_Z) _Z - _Z x + C + exp(_Z) - 2 _Z - exp(x))
C:=subs({x=0,y=1},lhs(implicitsoln1));
exp(0) + 2
y1;

 

How do I get it to to not have "root of" and give me a more specific solution.

After running Maple in a shell file, I come up with this error that I do not understand on my Mac,

gap_long := 0.117647058823529 Pi

gap_lat := 0.0588235294117647 Pi

lat_begin := 0.441176470588235 Pi

long_begin := -Pi

lat_begin_0 := 0.441176470588235 Pi

long_begin_0 := -Pi

long_max := 0.882352941176471 Pi

lat_max := -0.441176470588235 Pi

33

Warning, `parameter` is implicitly declared local to procedure `set_par_eff`

distance eff distance_eff
im in has not
im in has not
im in has not
im in has not
im in has not
im in has not
im in has not
im in has not
im in has not
Im in has par
Im in has par
Error, invalid input: eval expects its 2nd argument, eqns, to be of type
{integer, equation, set(equation)}, but received par_eff_post
13

32

31

17

hou := 0

mini := 0

seci := 0

memory used=4.0MB, alloc=32.3MB, time=0.23



If needed, I can attach more files if my question is still a bit too cryptic. Please let me know asap as this is urgent. Thank you so much,
-Z

 

 

Hi all,

 

Please help me with this question. I want to solve a PDE by Maple.

restart

A := 5;

5

(1)

B := 9

9

(2)

c := 1

1

(3)

``

``

``

eq := diff(u(x, t), t, t)-c^2*(diff(u(x, t), x, x));

diff(diff(u(x, t), t), t)-(diff(diff(u(x, t), x), x))

(4)

 

dsolve({eq, u(0, t) = A, u(1, t) = B, u(x, 0) = 0, (D(u))(x, 0) = sin(x)}, u(x, t))

Error, (in evalapply/D) too many variables for the derivative of a function of only one variable in D(u)(x, 0)

 

``

``

``

 

Download SolvePDE.mwSolvePDE.mw

I am setting up a practice set on how to find a common denominator, add, and reduce.

If I do not set "allow arithmatic", there is no way for students to correctly type in the answer, which is CURRENTLY the return value for a frac() function call. If I DO set "allow arithmatic", the student can just literally type the question into the answer box to get full credit / never has to reduce, etc, which defeats the purpose of the lesson. This is also the case with the Maple Graded answer type unless I do something fancier than I'm doing.

I can set up the answer properly without using frac() and reduce the fraction, but then--when the answer should be a whole number--the student has to type in "3/1" as an example.

I've also tried setting up an if statement for the answer, but when i convert the numbers to strings, then "2/3" becomes .2.0/3.0". 

So, at this point, I'm super open to ideas. 

 

 

# Define the denominators. We want them to be between 2 and 8.
$B=rint(2,8);
$D=rint(2,8);

# Make it so that the numerators can be between 1 and 1 less than the denominators.
# We also want to make sure they're not 0.
# Hashtag dividingby0.
$R=rint(-$B+1,$B-1);
$A=if($R,$R,1);
$S=rint(-$D+1,$D-1);
$C=if($S,$S,1);

# Calculate the numerator multiplied by the denominator. We'll do this step expressly
# because we'll want it for our feedback.
$X=($A*$C);
$Y=($B*$D);

#Calculate the greatest common factor and the answer.
$G=if(gcd($X,$Y),gcd($X,$Y),1);
$ANS=frac($X,$Y);

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