dharr

Dr. David Harrington

3020 Reputation

17 Badges

17 years, 306 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a professor of chemistry at the University of Victoria, BC, Canada, where my research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

@vv Very nice! I especially like lhs~(Z) with the set. And nops(Z)=1 captures two cases.

@DJJerome1976  Realised for the row swap case, also have to check the row sums are 1, so have edited it.

The authors of the paper used Maple, so perhaps you could contact them to get their worksheet,

As @Preben Alsholm says, there are no methods for stiff equations, but you can try different methods, see ?dsolve,numeric,bvp. And the page ?dsolve,numeric_bvp,advanced has tips for difficult problems.

@vv A:=r^2 works as well. (I played around with replacing the constants with names but didn't suspect the r^2 was the problem.) Not sure why that would be.

Please try attaching the worksheet again (green up arrow)

@fati1988 As I said earlier I'd do four nested loops with a complicated if statement. This is not the most efficient, but is probably the most readable. But there will be 256 cases in the if statement (only one in the sample below) so really it is better to work out the pattern - perhaps from knowing the derivation which led to it.

QMatrix.mw

i:=0:
for l from 1 to N_x do
 for  p  from 1 to N_y do
  i:=i+1;
  j:=0:
  for l_prim from 1 to N_x do
   for  p_prim  from 1 to N_y do
    j:=j+1;
    if l::even and p::odd and l_prim::odd and p_prim::even then
      H[i,j]:=KroneckerDelta[l, l_prim]*KroneckerDelta[p, p_prim+1]
             +KroneckerDelta[l, l_prim-1]*KroneckerDelta[p, p_prim-1]
    else
      H[i,j]:=0;
    end if; 
   end do;
  end do;
 end do;
end do;

@janhardo fixed the system and the (") as before, and it works.

Download CH7B.mw

@janhardo There is a DynamicSystems package in newer versions of Maple that might be relevant.

@acer  OK, I see. I thought that was the plot required. It seems natural to want Nu to actually display as the Greek letter that it is.

@ahmadtalaei The solution given suggests the solution can't be written in that form. But if it can, then you should suggest a change of variables and use dchange to perform the change of variables, and then use pdsolve it the new variables.

@mmcdara  I took the OPs comment that points 13 etc repeated to mean point 13 was the same as point 1, i.e., the period is 12.

@vs140580 To find the longest of all paths is not just a trivial modification of the above, and I am out of time to make another algorithm. But for the above algorithm between two vertices, already the HypercubeGraph(4) is going to take forever and that only searches some of the subsets - as @Carl Love says it is a difficult problem. 

@fati1988 I am only giving help through this forum.

@fati1988 The problem is not well specified. What do you want if l::even, p::odd, l_prim::odd, p_prim::odd? There is some sort of pattern here that you should figure out because at the moment you will have to specify 16^2=256 conditions. 

First 8 9 10 11 12 13 14 Last Page 10 of 28