13070 Reputation

18 years, 298 days

Yes...

@Carl Love  Thanks for reminding me of this weird bug.
The bug as reported concerned Maple 2015. It seems that improvements were made in Maple 2016, and the bug seems to be gone in Maple 2017, and also in Maple 2018 - Maple 2020.

x_rkf45...

@Hnx The name x_rkf45 is just the formal parameter in the procedure resulting from dsolve/numeric with the default method rkf45 as in

```restart;
ivp:={diff(x(t),t)=x(t),x(0)=1};
res:=dsolve(ivp,numeric); # formal parameter x_rkf45
##
interface(verboseproc=2);
eval(res);
```

The reason for not just using plain x instead of x_rkf45 may be to inform the user that the method used is rkf45 (my guess).

You can find code for rkf45 (Runge-Kutta-Fehlberg) on the internet.
See e.g. this link to Douglas Wilhelm Harder:
https://ece.uwaterloo.ca/~dwharder/NumericalAnalysis/14IVPs/rkf45/complete.html

But as Georgios is pointing out you could use the events option in dsolve/numeric to do breaks or whatever it is you want to do. The help page for events isn't easy reading, but you could let us know what you are thinking of doing.

diff with []...

@acer You don't need the if statement which takes i = 0 as a special example.

diff(f(x), [] ) returns f(x). So the if statement can be skipped and in the loop we can just do:
U := 'Typesetting:-Typeset'(diff('f(x)',[x\$i]));

The variable k...

@dharr I don't understand your statement that k is used in two versions.
I don't think that k is local to sum nor to Sum:

```restart;
B[1] := BesselI(k - 1, alpha*(u - y));
sum(B[1],k=1..4);
Sum(B[1],k=1..4);
```

Good question...

@mthkvv A good question. With interface(warnlevel=0) it still happens (with 2D input).

This behavior is new to Maple 2020 and is clearly intended.

I can only speculate that the warning is meant to help new users. Furthermore turning off warnings in general would not be good even for experienced users.

I use 1D input exclusively so this problem doesn't affect me.

Different...

@Kitonum Notice that ArrayTools reverses rows and columns, where ListTools only reverses the outer list.

We can, however achieve the ArrayTools ordering by an additional Reverse (if desired):

```restart;
A:=[[0, 4], [1, 3], [2, 2], [3, 1], [4, 0], [0, 3], [1, 2], [2, 1], [3, 0], [0, 2], [1, 1], [2, 0], [0, 1], [1, 0], [0, 0]];
A1:=ListTools:-Reverse(A);
ListTools:-Reverse~(A1); # Elementwise
```

Correction...

@Grigoriy Yashin You are right: I didn't see that you were not considering the full system in the first solve command.

Please see my correction at the end of my answer. But the linear system sys6 in the variables vars has no solutions.

Thus solve returns NULL for that system.

Thanks...

@Carl Love Thanks Carl for taking the time to explain these notions. I really appreciate that!

List or sequence irrelevant here...

@lcz You get exactly the same error if you drop the list brackets. So those are irrelevant here.
Whether xxx[1] is used to select the first element in a list xxx or the first element of a sequence xxx is irrelevant.
(But notice there will be problems in this regard if the sequence xxx consists of 1 element, but you have 11 graphs).

The important point is that Tom Leslie has added to your code UnderlyingGraph. That is the problem mentioned by the error message.

I'm speaking as somebody who knows next to nothing about graph theory.

By reading the help page for ChromaticNumber I see that it is applied to an undirected unweighted graph. Your graph1 is weighted, but the underlying graph is not:
Take a look at the output from UnderlyingGraph(graphsof4[1]).

Conclusion...

@fatemeh1090 My conclusion is that the statement in the paper about the derivative of the trace of the Jacobian is wrong.
( Clearly this doesn't invalidate the whole paper, but it teaches us to be on guard when something is claimed to be obvious. )

Use instead the Maple expression given already in this discussion by dharr above.

You can check his result with the example given by vv above:
So try with TrJ and E__2 from dharr's worksheet

```TrJ_explicit:=eval(TrJ, E__2);
dTrJ:=simplify(diff(TrJ_explicit, alpha));
params_vv:=[alpha,beta,gamma,delta]=~[-1/2 + 2*sqrt(3), 1/6, 1, 13/6]; #Parameters from vv
eval(TrJ_explicit,params_vv);
simplify(%); # 0
eval(dTrJ,params_vv);
simplify(%); # 3/4
```

Very nice...

@vv Thank you for a very well chosen counter example to the "obvious" statement about the derivative of the trace in the paper:

Stability and bifurcation analysis in a predator–prey system with Michaelis–Menten type predator harvesting
by Dongpo Hu and Hongjun Cao.

pdf-file...

@fatemeh1090 I understand that you had to remove the full pdf-file for copyright reasons.

Thus I won't be able to find the authors' reasoning.

I tried a little on my own, but didn't manage to get down to the result given for the derivative of the trace w.r.t. alpha.

I'll give the steps I tried:

```restart;
local gamma;
##The system in the pdf-file. Right hand sides:
RHS:=[x*(1-x)-x*y,y*(delta-beta*y/x)-alpha*y/(gamma+y)];
ROsol:=solve(RHS=~0,{x,y});
RO:=op(indets(ROsol[2],specfunc(RootOf)));
E:=subs(ROsol[2],[x,y]);
da:=diff(E,alpha);
dxa,dya:=op(subs(RO=y,y=1-x,da));
J:=VectorCalculus:-Jacobian(RHS,[x,y]);
TR:=LinearAlgebra:-Trace(J);
TRxa:=normal(subs(y=1-x,x=x(alpha),TR));
diff(TRxa,alpha);
simplify(%,{TRxa=0}); # simplifying with the side relation TRxa=0
subs(diff(x(alpha),alpha)=dxa,x(alpha)=x,%);
res:=normal(%);
```

"Obviously"...

@fatemeh1090 The expression for the trace of J in (24) in the pdf-file is correct.

But how do you get from that to the expression given for the derivative of the trace w.r.t. alpha?
Of course x and y  depend on alpha, but it seems that the author is not using the explicit dependence we find easily with Maple.

The text continues after that with "Obviously, ..." and gives the derivative in terms of x etc.

Why is it obvious? There are several pages missing in the uploaded pdf-file. Maybe the derivative of x w.r.t. alpha has been found in those pages?

option remember...

@vv I use a similar device for fsolve. I give the procedure (here PUV) the option remember to minimize the expense of calling the procedure (PUV)  several times.

Doesn't run...

@666 jvbasha Your worksheet BAHAM.mw doesn't run without several errors on my machine in Maple 2020, Maple 2018 and Maple 18 (which you apparently use).

Since this is a new project you should start a new thread, where everybody is invited to participate.

 First 18 19 20 21 22 23 24 Last Page 20 of 219
﻿