Maple 2020 Questions and Posts

These are Posts and Questions associated with the product, Maple 2020

From another question I asked, I learned that parse("string") returns an unevaluated Maple expression. 

But in interactive mode (in worksheet), the result looks the same as normal evaluated expression. That is why I did not know this. For example

ode1:= :-parse("diff(y(x),x$2)=0");
ode2:= diff(y(x),x$2)=0;

it gives

There is no difference when looking at it.  That is why when I was in Maple debugger, I could not see why Maple was complaining about it. An eval  was needed.

I looked at the types to see if there is something like type(variable,`unevaluated`) or such, and could not find one.

If Maple can at least display unevaluated expression with different color, or different notations when in the worksheet interface,  I would have noticed that parse returns unevaluated expression.

In Mathematica, these things are done using wrappers, (called Hold or Inactive) but these are visible in the notebook and use different color shading or Hold is present and had to expliclity removed,  and so looking at them, one can see the differerence between the expressions. 

How can one in Maple distinguish between unevaluated expression such as ode1 above and evaluated one such as ode2 above?  This can be useful to use inside a proc for example.  Is there an option in the GUI itself to tell Maple may be to color each differently?

 

I can't figure why dsolve and odeadvisor fail to process ode when it is parsed from string and only inside a proc, but works ok in global space.

This works OK:

restart;
ode  :=  :-parse("diff(y(x),x$2)=0"):
func := :-parse("y(x)"):

dsolve(ode);
DEtools:-odeadvisor(ode,func);

But the same code, when inside a proc, fail

restart;
foo:=proc()
  local ode,func;  
  local x,y; #adding this did not  help

  ode  :=  :-parse("diff(y(x),x$2)=0");
  func :=  :-parse("y(x)");

  dsolve(ode);
  try
     DEtools:-odeadvisor(ode,func);
  catch:
     error lastexception;
  end try;

end proc;

foo()

It seems to have with name scoping, but I do not see what is the problem. :-parse works fine.

How to resolve this? Since I must use :-parse as I am reading the ode as string from database with Maple as string from inside a proc inside a module and the above is just a simple example that shows the problem.

Maple 2020.1 with Physics 724

Hello!

Could you help me plesase, I have a matrix like this:

And I want to get determinant of this matrix as function f(w1,w2) but when I use Determinant I always get something like this:

Hello!

I have a matrix and all elements has two indexes. For example 3x3 case:

1,1 1,2 1,3

2,1 2,2 2,3

3,1 3,2 3,3

So if I want to travers this matrix in zig-zag way and fill it with increasing numbers I will get this matrix:

1 2 6

3 5 7

4 8 9

From 1 to 2,3 and 4,5,6 ...

We have 9 elemets in this order:

1 - (1,1); 2 - (1,2); 3 - (2,1); 4 - (3,1); 5 - (2,2); 6 - (1,3); 7 - (2,3); 8 - (3,2); 9 - (3,3).

The question is - do we have a way to convert two indexes in one digit like (3,1) -> 4 or (2,3) -> 7

Thank you!

Could you help me please if there is a way to convert to

So, here again, I'm still having this problem with Maple 2020 on Machbook OS 10.13.6 (all updates have been performed): Maple 2020 does not start. I see an icon appearing in the dock but it then disappears soon without showing anything like splash something. I reinstalled and restarted the copmuter several times, reactivated the software several times (always successful), and still I'm having the problem. I installed java and then it worked for one time, but after that the same problem happens and I'm still having this issue.

I went through steps suggestged in the help and arrived at JAVA reisntallation. What else can I try? 

Please help me. Thanks.

Hiro

 

 

Suddently Maple 2020 (on Macbook) stops launching... I reinstalled it and restarted a couple of times. 

Can someone give me some clues about what is causing this problem.

I really need it right now... 

Thanks,

Hiro

 

Consider the family of functions "{`f__n`   : -infinity< n<infinity}," where the index n is
integer, and f__n; proc (R) options operator, arrow; R end proc.   It is known that diff(f__n(x), x) = `f__n-1`(x) for all n.

 

I want to convey that information to Maple.  For instance, given the input
diff(f[3](x),x), Maple should return f__2(x).  Similarly:
diff(f[3](x), x$2)                   should return   f__1(x)
f[4](x)*diff(f[3](x),x)^5   should return   f__4(x)*f__2(x)^5

What is a good way of doing that?

 

Hello!

Could you help me please to plot a fuction with domain and complex range (Maple 2020.1). For example:

f := (x, w) -> exp(w*x*I)

x,w are real numbers

 

Hello!

I've just want to use indexes in functions, like this (Maple 2020.1)

f[l,m]:=(x,y)->x^k + y^m

But I can't get the result of it:

f[1,1](2,2)

Maple show me not 4, but the same function.

In the OrthogonalExpansions package, how can I change the summation variable to be n instead of i?

According to Wikipedia, Abel's first order odes have general analytical solutions, due to "Panayotounakos, Dimitrios E.; Zarmpoutis, Theodoros I. (2011)" where the claim is that, if I understand it right, all Abel ode's can be solved analytically.

https://en.wikipedia.org/wiki/Abel_equation_of_the_first_kind

"Construction of Exact Parametric or Closed Form Solutions of Some Unsolvable Classes of Nonlinear ODEs (Abel's Nonlinear ODEs of the First Kind and Relative Degenerate Equations)"

Maple is very good on solving ODE's, but some Abel ode's it can not solve. For example

restart;
ode:=diff(y(t),t)= y(t)^3+exp(-5*t);#_Abel
ode:=diff(y(x),x) = (1+x^3*y(x))*y(x)^2;#_Abel
ode:=diff(y(x),x) = y(x)^2-a*x*(1-x^(n-1))*y(x)^3;#_Abel
ode:=diff(y(x),x) = a*y(x)^2+x*y(x)^3*(b+c*x^(n-1));#_Abel
ode:=diff(y(x),x) = f0(x)+f1(x)*y(x)+f2(x)*y(x)^2+f3(x)*y(x)^3;#_Abel
ode:=(tan(x)*sec(x)-2*y(x))*diff(y(x),x)+sec(x)*(1+2*y(x)*sin(x)) = 0;#_Abel, `2nd type`, `class A`
ode:=x*(a+y(x))*diff(y(x),x)+b*x+c*y(x) = 0; #[_Abel, `2nd type`, `class B`]
ode:=(g0(x)+y(x)*g1(x))*diff(y(x),x) = f0(x)+f1(x)*y(x)+f2(x)*y(x)^2+f3(x)*y(x)^3;#_Abel, `2nd type`, `class C`

etc..

All the above Abel ode's are from Book: Ordinary differential equations and their solutions. By George Moseley Murphy. 1960

I am just asking what is the status of this. Is it true there is now a method to solve all these exactly and may be Maple's implementation is not in yet for this? 

btw, I found the description of solution methods in https://fr.maplesoft.com/support/help/Maple/view.aspx?path=odeadvisor/Abel much easier to follow to learn how to solve Abel ode's. That paper mentioned on Wikipeida, I had hard time following after the 3rd page. (need more time to study it).

Could someone please comment on the status of solving Abel's first order ODE's in Maple and if it possible now to solve them all analytically?

 

 

 

 

 

Why when trying to substitute a term in denominator, subs does not work, when this term is product. But it works when this term is single variable?

subs((x*y)=t,1/(x*y));

does not work. i.e. it does not return 1/t

But this works

subs(z=t,1/z);

and returns 1/t

algsubs does not work either on the first example above. 

Just wondering why, that is all.

 

I do not think Maple help on the subject is easy to follow as the exampels are not clear. I was hoping someone can give a very simple example.  

Now, I run long script, over say 1,000 problems. This takes long time each time I run it. Since each problem is completely independent of others, and there is no shared data at all (for each problem, its output is written to separate file), I am thinking of using the parallel programming in Maple, and hoping this will speed it up. I have an intel PC, with modern CPU. I think it has may be 10 or 16 cores, not sure now, so in theory it should be faster to complete.

For a very basic example, suppose I have this sequential program

foo:=proc(i::integer)
   return i^2;
end proc;

for i from 1 to 10 do
   foo(i);
od;

Where foo() is now called 10 times, one after the other. How would one change the above to make it run in parallel?

I know I need to call Threads:-Task:-Start and then use Threads:-Task:-Continue 

But I am not sure how to use Threads:-Task:-Continue to tell it to call foo in parallel passing each task 1,2,3,.... in turn, and wait until they are all done. This is the part not clear to me how to do even after looking at the help example under Task Programming Model

Could someone show how to do the above for this simple example?   

Since I have 1,000 problems, do I need to create 1,000 tasks at once, one for each problem and wait for them to all be done? what if I have 10,000 problems, creating 10,000 tasks at once might not work, would it? or will Maple handle this internally by queuing the creation of tasks as needed? This part is also not clear to me.

 

thanks

 

Hello!

I just want to try plot a conformal map for better understanding how it works.

For example, I want to plot a conformal map, so I do this:

restart;
assume(y, real);
assume(x, real);
f := z -> I + z*exp(1/4*I*Pi);
w := f(x + y*I);
u := Re(w);
v := Im(w);
A := array(1 .. 2);
A[1] := plots:-conformal(z, z = 0 .. 1 + I/2, grid = [16, 16], numxy = [16, 16], scaling = constrained);
A[2] := plots:-conformal(f(z), z = 0 .. 1 + I/2, grid = [16, 16], numxy = [16, 16], scaling = constrained);
plots:-display(A);

It works fine. But if I want to map more complecated region, I have lot's of problem. Could you help me please.

For example:

how to map a triangle [0,0], [1,0], [0,i] or half-plane Im z> 1, excluding the circle | z - 2i | <= 1.

Thank you!

Maple seems to suffer from too many levels of recursion issues. Here is another just found

restart;
current_solution:=y(x)-3/2 = 1/(x+2)^4*(-(x+2)^5*RootOf(-2+(x^5*C[1]^5+10*x^4*C[1]^5+40*x^3*C[1]^5+80*x^2*C[1]^5+80*x*C[1]^5+32*C[1]^5)*_Z^25+(5*x^5*C[1]^5+50*x^4*C[1]^5+200*x^3*C[1]^5+400*x^2*C[1]^5+400*x*C[1]^5+160*C[1]^5)*_Z^20)^20*C[1]^5+1)/RootOf(-2+(x^5*C[1]^5+10*x^4*C[1]^5+40*x^3*C[1]^5+80*x^2*C[1]^5+80*x*C[1]^5+32*C[1]^5)*_Z^25+(5*x^5*C[1]^5+50*x^4*C[1]^5+200*x^3*C[1]^5+400*x^2*C[1]^5+400*x*C[1]^5+160*C[1]^5)*_Z^20)^20/C[1]^5;

candidate_sol := limit(current_solution,C[1] = infinity);

Error, (in depends) too many levels of recursion

The problem with these is that they can not be cought by a try/catch. So the whole program/script comes to halt since error can not be cought.

Similar ones I found can be found here

https://www.mapleprimes.com/questions/229988-Error-in-Toolsmap-Too-Many-Levels
Error, (in tools/map) too many levels of recursion

https://www.mapleprimes.com/questions/229872-Error-in-Discontzero-Too-Many-Levels
Error, (in discont/zero) too many levels of recursion

https://www.mapleprimes.com/questions/229951-Random-Error-Error-in-EngineDispatch
Error, (in Engine:-Dispatch) too many levels of recursion

 

I am  not sure why these happen too often. Maple 2020.1 on windows 10. Physics version 724

 

 

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