MaplePrimes Questions

Good day sirs,

         I am trying to solve this system of equations attached below, but got the following error message "The use of global variables in numerical ODE problems is deprecated, and will be removed in a future release".

       Anyone with useful informations please.

       Below is attached


how I can remove ROOTOF  from solution?


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 so 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

Dear sir I want to plot the graph where the lines are coincides maximize the graph in the same graph.  A sample graph i am attaching .some sample codes are here.

h:=z->1-(gamma2/2)*(1 + cos(2*(Pi/omicron1)*(z - d1 - omicron1))):
omicron1:=0.2: omega:=10:d1:=0.2:Zeta1:=Pi/6:

plot( [seq(eval(kappa, Nb=j), j in [0.01,0.02,0.03])], gamma2=0.02..0.1);



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.


This is using Maple 2018.

I noticed when solving Laplace PDE on disk, that no condition is needed to tell Maple if one is asking for solution inside the disk or outside. So how does Maple know which one it is?

It turned out Maple gives the same solution for the PDE outside as inside, which is wrong.

The solution to Laplace PDE inside a disk of radius 1 is

Which Maple gives correctly. But it also give the same above solution for outside the disk. The solution outside the disk should have r^(-n) and not r(n).  Like this

Basically Maple ignores assumption on `r`. This is what I tried

pde := (diff(r*(diff(u(r, theta), r)), r))/r+(diff(u(r, theta), theta, theta))/r^2 = 0:
bc := u(1, theta) = f(theta), u(r, -Pi) = u(r, Pi), (D[2](u))(r, -Pi) = (D[2](u))(r, Pi):
sol_inside:=pdsolve([pde, bc], u(r, theta), HINT = boundedseries) assuming r<1;

pde := (diff(r*(diff(u(r, theta), r)), r))/r+(diff(u(r, theta), theta, theta))/r^2 = 0:
bc := u(1, theta) = f(theta), u(r, -Pi) = u(r, Pi), (D[2](u))(r, -Pi) = (D[2](u))(r, Pi):
sol_outside:=pdsolve([pde, bc], u(r, theta)) assuming r>1;


Both the above gives the same answer.

How then does one solve the Laplace PDE outside the disk using Maple? And why is assumptions on "r" seems to be ignored in the above?



I am new to using maple and was wondering if i could get some help with this problem...


I'm having problems with 2b)

pell := proc (d, K)

local y; 

y := sqrt(d*x^2+1); 

d := 2; 

if y <= K then print*(x, y) end if 

end proc

this is what i have come up with, feel like it is completely wrong though.

Any help would be much appreciated.

(ps. there is no Maple 2018 product to select, so I selected Maple 2017 from the menu).

The new UNTIL keyword added to Maple 2018 seems to me to be confusing and a useless addition to the Maple language.

First of all, using it in a DO loop, one does not use an closing END DO as normal. This makes it harder to use, since one is used to seeing an END DO to close each DO. They align physically better, which makes the code easier to read.

In addition, I can't think of anything that can't be done using current language constructs that needs this new keyword. Can someone? 

Adding a whole new keyword to make one type maybe few less characters seems like  a bad language design. A language constructs should be orthogonal to each others for the language to remain simple and clean. Adding more keywords for the fun of it should be avoided if something can be written using exisiting language constructs.

n := 37:
  n := n + 1
until isprime(n);

very confusing to read. It has no end do. At first, I did not see where the loop ends. And the above can be done in many other ways allready, one direct way could be

n := 37:
  n := n + 1;
  if isprime(n) then

And it is more clear as well since the DO is aligned with the END DO and I find the logic clearer with no new keyword added. Another way could be

n:= 37:
found_prime := false:
while not found_prime do
   n:= n + 1;
   found_prime := isprime(n);

I am sure there are other ways to do this.

Could someone please show an example where UNTIL is really needed and will make the code much more clear that justifies adding it to the language?




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.

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

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

Hi everybody,

Please take the example given in the help pages of DocumentTools[Tabulate] (the one where a cardinal sine is plotted)
Change plot(sin(x)/x) by plot(sin(x),/x, legend=sinc(x))

The legend doesn't appear if the list (named "A" in the help page) is displayed through DocumentTools:-tabulate.

Is it possible to circumvent this problem ?


i get wrong solution in maximize. i have to get a approximate 0.18 but i get 0.1

app := proc (x) options operator, arrow; 0.14546e-1*sin(3.141592654*x)+(-1)*0.50512e-2*sin(6.283185308*x)+0.19918e-2*sin(9.424777962*x) end proc;
ex := proc (x) options operator, arrow; evalf(-AiryAi(2^(2/3)*x)*(5*3^(5/6)-9*AiryBi(2^(2/3))*GAMMA(2/3))/(8*AiryAi(2^(2/3))*3^(5/6)-8*AiryBi(2^(2/3))*3^(1/3))-AiryBi(2^(2/3)*x)*(9*AiryAi(2^(2/3))*GAMMA(2/3)-5*3^(1/3))/(8*AiryAi(2^(2/3))*3^(5/6)-8*AiryBi(2^(2/3))*3^(1/3))+(1/4)*x^3+3/8) end proc;
plot([100*abs(app(x)-ex(x))], x = 0 .. 1)
Maximize(100*(abs(app(x)-ex(x))), x = 0 .. 1);

This is on Maple 2017.3 under windows

After obtaining solution from pdsolve(), I tried to see if Maple can convert it to hyperbolic trig functions by calling `convert(sol,trigh)`. 


I waited and waited and nothing happened. Then clicked on the `interrupt current operation` button at top of menu. 

But I found that mserver.exe has hanged in a loop. Taking 100% CPU and still running. So Had to terminate it from task manager.

Question is: It is ok if Maple can't do the conversion, but why does it hang? Maybe if I want for one hr it will finish, I do not know. But the important part, why does `interrupt current operation` does not work, in the sense that the mserver.exe is still running?

Is this common thing to happen? Should this be fixed? 

Here is example


f:=x-> piecewise(x>0 and x<1/2, 2*x, x>1/2 and x<1, 2-2*x);
sol:=pdsolve([pde,bc],u(x,y)) assuming x>0,y>0;

The above works OK and generates a solution. Now the next call hangs mserver.exe


In case your Maple version can't solve the above PDE. Here is the solution obtained, so you can try this below without having to solve the PDE


sol := u(x, y) = Sum(8*sin((1/2)*n*Pi)*sin(Pi*x*n)*(exp(Pi*n*(3*y-2))-
            n = 0 .. infinity);

I also tried convert(rhs(sol),trigh); but it made no difference.


This is my code.  It's not appending as I need it to.  Any help would be humbly and gratefully appreciated!



restart; Sort4 := proc (Q, T, U, Rx1, Ry1, Rx2, Ry2, Rx3, Ry3, Rx4, Ry4) local i, k; description "Organizes vectors Q,T into new vectors Rx1...Ry4 correspponding to values of U."; for i from 5 to nops(U) do if U(i) = 1 then Append(Rx1, Q(i)); Append(Ry1, T(i)) elif U(i) = 2 then Append(Rx2, Q(i)); Append(Ry2, T(i)) elif U(i) = 3 then Append(Rx3, Q(i)); Append(Ry3, T(i)) elif U(i) = 4 then Append(Rx4, Q(i)); Append(Ry4, T(i)) end if end do; return Rx1, Rx2, Rx3, Rx4, Ry1, Ry2, Ry3, Ry4 end proc

Q, T, U := `<,>`(0, 2, 4, 6, 7, 17, 27, 57, 67, 97), `<,>`(0, 2, 1, 8, 19, 20, 21, 22, 23, 24), `<,>`(o, o, o, o, 1, 2, 3, 2, 4)

Vector[column](%id = 18446744078670632710), Vector[column](%id = 18446744078670632830), Vector[column](%id = 18446744078670632950)


Rx1 := Vector([Q(1)]); Ry1 := Vector([T(1)]); Rx2 := Vector([Q(2)]); Ry2 := Vector([T(2)]); Rx3 := Vector([Q(3)]); Ry3 := Vector([T(3)]); Rx4 := Vector([Q(4)]); Ry4 := Vector([T(4)])















Vector[column](%id = 18446744078670620662)


Sort4(Q, T, U, Rx1, Ry1, Rx2, Ry2, Rx3, Ry3, Rx4, Ry4)

Vector[column](%id = 18446744078670623558), Vector[column](%id = 18446744078670625238), Vector[column](%id = 18446744078670626678), Vector[column](%id = 18446744078670619942), Vector[column](%id = 18446744078670624518), Vector[column](%id = 18446744078670625958), Vector[column](%id = 18446744078670619222), Vector[column](%id = 18446744078670620662)





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