Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi, I've been doing a few small explore plots where the ranges for the parameters are something like [-1,1], but 0 is a special value which will often need to be set.  The slider, gauge components, ... are a bit fiddly to set with exactly zero using a mouse to drag the value.  Thought about a few different ways to do this

* Right click and set value from the component properties option - a bit fiddly for the user and the graph doesn't immediately update when OK'ed.

* Extra control with a tick to set a zero value (fiddly programming and possible confusing interpretation)

* Slider component and snaptoticks=true

Last option seems to be the easiest all round, but I was wondering why it is only the slider component that has a snaptoticks property - none of the other components seem to support it and a gauge would probably be a more natural component to use.

Thanks in advance

Hi!

Consider, fixed an integer m>1, the mapping given by the following procedure:

 

G := proc (t) local k, C; C := NULL; C := t; for k from 2 to d do C := C, 1/2-(1/2)*cos(Pi*m^(k-1)*t) end do; return [C] end proc

Then, it can be proved that given x in the cube [0,1]^{d} there is t in [0,1] such that the norm of x-G(t) is less, or equal, than sqrt(d-1)/m. Indeed, dividing the cube [0,1]^{d} into m^{d-1} subcubes of side-length 1/m x ... x 1/m x 1, the point x belongs to some of these subcubes, say J. As, by the properties of the cosines function, the curve G(t) lies in J whenever t in certain subinterval of [0,1], the result follows.

In other words, computing all the solutions of the equation

1/2*(1-cos(Pi*m^(d-1)*t)) = x[d], (j-1)/m <= t and t <= j/m

for some of these solutions the desired t is obtained, where j is such that x1 in [(j-1)/m,j/m] (x1 is the first coordinate of the point x). However, for large values of m and d, the above equation have many solutions, I have tried find all of them and the process is extremely slow....Other way to find such a t can be the following: find a t satisfying the following system of inequalities

EQ := abs(t-x[1]) <= 1/m; for k from 2 to d do EQ := EQ, abs(1/2*(1-cos(Pi*m^(k-1)*t))-x[k]) <= 1/m end do

 

and then, a solution of this system is a such t. I do not know how to find, efficiently, a t such that of x-G(t) is less, or equal, than sqrt(d-1)/m   :(

Some idea?

Many thanks for your comments in advance.

 

 

I do not know how I can solve this equation, you can help me 

I am having trouble getting Maple 2017.3 with latest Physics update to give solution to Burger's PDE for viscous fluid flow with the following initial condition. May be I am not doing something right. I tried different HINTS, but no luck.

Maple can solve the PDE without the initial conditions.

May be a Maple expert can find work around or show what I might be doing wrong.

restart;
pde := diff(u(x, t), t) + u(x, t)*diff(u(x, t), x) = mu*diff(u(x,t),x$2);
ic  := u(x,0) = PIECEWISE([0,x>=0],[1,x<0]);
sol := pdsolve({pde,ic}, u(x, t)) assuming mu>0;

Maple returns () as solution.

This PDE can be solved analytically. Here is Mathematica' solution

ClearAll[u,x,y,mu]
pde = D[u[x,t],{t}]+u[x,t]*D[u[x,t],{x}]==mu*D[u[x,t],{x,2}];
ic  = u[x,0]==Piecewise[{{1,x<0},{0,x>=1}}];
sol = DSolve[{pde,ic},u[x,t],{x,t},Assumptions->mu>0]

 

 

Is it possible to use Regex to generate a complete list of patterns?

for search pattern in a list of characters

Strange (inconsistent) behavior of eval in piecewise

 

restart;#####################

a:=2:

p:=piecewise(x<a, 1/(x-a), x=a, 22, 33);

p := piecewise(x < 2, 1/(-2+x), x = 2, 22, 33)

(1)

eval(p, x=a);

22

(2)

restart;#####################

a:=Pi:

p:=piecewise(x<a, 1/(x-a), x=a, 22, 33);

p := piecewise(x < Pi, 1/(-Pi+x), x = Pi, 22, 33)

(3)

eval(p, x=a);

Error, (in eval/piecewise) numeric exception: division by zero

 

restart;#####################

a:=Pi+ln(2):

p:=piecewise(x<a, 1/(x-a), x=a, 22, 33);

p := piecewise(x < Pi+ln(2), 1/(-Pi-ln(2)+x), x = Pi+ln(2), 22, 33)

(4)

eval(p, x=a);

22

(5)

restart;#####################

a:=Pi+1:

p:=piecewise(x<a, 1/(x-a), x=a, 22, 33);

p := piecewise(x < Pi+1, 1/(-Pi-1+x), x = Pi+1, 22, 33)

(6)

eval(p, x=a);

Error, (in eval/piecewise) numeric exception: division by zero

 

restart;#####################

a:=gamma:

p:=piecewise(x<a, 1/(x-a), x=a, 22, 33);

p := piecewise(x < gamma, 1/(-gamma+x), x = gamma, 22, 33)

(7)

eval(p, x=a);

Error, (in eval/piecewise) numeric exception: division by zero

 

#######################

f:=x->piecewise(x<Pi, 1/(x-Pi), x=Pi, 22, 33);

f := proc (x) options operator, arrow; piecewise(x < Pi, 1/(x-Pi), x = Pi, 22, 33) end proc

(8)

f(Pi);

22

(9)

 


Download piecewise-strange.mw

how do i solve the following expression in maple and how do i plot sigma wrt a?

sigma = 4*sigma[s](1/4-(int((BesselJ(1, y))^2/y(1+y(400*10^(-10)/a)^2+sqrt(1+y(400*10^(-10)/a)^2)), y = 0 .. 10^4)))

 

I really need help to understand this i know it is a non associative operation but i just cannot see how no operator is handled in the computation here


 

A := (rand(1 .. 100))():

8

 

8

 

9424

(1)

A := (rand(1 .. 100))():

33

 

33

 

33

(2)

``


 

Download please_HELP.mw

This will be my last question i promise then i will go to bed for a week.

(its what happens when the government decide after 20 years they are going to make it illegal for me taking stimulants therefore must purchase from non pharmacy sources and can barely afford 1 out of every 2 weeks supply, they charge $6 AUD per tablet on the street so, i was prescribed 8 per day, i earn $250 a week, so yes, that is more than all of my money)

Sorry, just want to repeat that as much as possible to embarass my government an infintesimal amount in public forums, never go to australia, my country is a piece of shit and the people here are on the most part uncivilized socially backward morons 

 

 

Edit: Here is a better worksheet for you comrades 
 

restart

X := proc (A, B) options operator, arrow; (`mod`((`mod`(A, n))*(`mod`(B, n)), n))((`mod`(A, n))*(`mod`(B, n))) end proc:

Y := proc (A, B) options operator, arrow; (`mod`((`mod`(A, n))*(`mod`(B, n)), n))*(`mod`(A, n))*(`mod`(B, n)) end proc:

is(X(A, B) <> Y(A, B))

false

(1)

is((`mod`((`mod`(A, n))*(`mod`(B, n)), n))((`mod`(A, n))*(`mod`(B, n))) <> (`mod`((`mod`(A, n))*(`mod`(B, n)), n))*(`mod`(A, n))*(`mod`(B, n)))

false

(2)

A := (rand(1 .. 100))():

is((`mod`((`mod`(A, n))*(`mod`(B, n)), n))((`mod`(A, n))*(`mod`(B, n))) <> (`mod`((`mod`(A, n))*(`mod`(B, n)), n))*(`mod`(A, n))*(`mod`(B, n)))

true

(3)

is(X(A, B) <> Y(A, B))

true

(4)

``


 

Download helpPlz.mw

 

Hi dears,

I hope that my request (question) is appropriate for Mapleprimes.

I know Gröbner bases and Buchberger's algorithm and I want to understand  the F4-algorithm. However, I know that  the corresponding paper can be found:

https://www.sciencedirect.com/science/article/pii/S0022404999000055 

Could you please state the sketch and main parts of the algorithm s.t. I can understand it?
Is there any primary Maple implementation of F4-algorithm?

Thanks in advance.

Came across this issue again.  While working within a worksheet, everything seems fine, using commands like imagetools outputing bmp files etc.  I had to, in the the Options->Precision, uncheck limit expression length to 1000000 during my session.  I saved it multiple times, however and unfortunately did not save as seperate versions, so I was left with one file.

The file size ended up being 64Mb.  The problem is trying to load it into Maple, everytime I try to load the worksheet my computer seems to freeze (laptop, 4Gb RAM, windows 7 64 bit, Maple 2017) I check task manager and my javaw.exe file is consuming 3.7Gb of memory!  So that's why it's locking up. 

I've tried multiple times to open the file and utilmately end up pressing and holding the power button to restart my system. 

 

How to convert maple file into the pdf file?For example the attacahed file is maple file.I want to convert this to a pdf file.

conservation_of_wave_eq.mw

I posted this earlier on a question I asked more than a month ago due to the similarity of the problem.  However, I got no response.  So I will post this as a new question in an effort to get a response.

I get the following error when working with the "INERT" Sum?

Warning, solutions may have been lost

I do not get the message when working with the "ACTIVE" sum.  I tried the AllSolutions option, but still get the same message.  How can I get the proper output working with the "INERT" form?

lost_solutions.mw

How can I install GeM software from the link http://cpc.cs.qub.ac.uk/?

I have tried many times but I didn't get.

 

@mskalsi

I was trying the direct method for conservation law of wave equation.But the fluxes and conserved density are not coming correct in eq.(4)(see attached file) because (1) and (6) are not same.What mistake have I done?

 

 

wave_eq_3.mws

Thought it would be a neat way to create identation for loops and if branches in a text editor and copy the code into Maple. But Maple inserts a new prompt at the beginning of every line.

Is there a solution in 2018?

First 104 105 106 107 108 109 110 Last Page 106 of 2097