Robert Israel

6522 Reputation

21 Badges

18 years, 185 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are replies submitted by Robert Israel

There are links, but they don't seem to work:  I just get "Page Not Found".

Sorry, I inadvertently left something out at the beginning:

> A := a(t,y);

(which is just a convenience to avoid a few keystrokes).  Without this, of course Maple thinks A is a variable with no connection to a, and in particular its partial derivatives wrt t and y are 0.

Sorry, I inadvertently left something out at the beginning:

> A := a(t,y);

(which is just a convenience to avoid a few keystrokes).  Without this, of course Maple thinks A is a variable with no connection to a, and in particular its partial derivatives wrt t and y are 0.

simplify(convert(usol, exp)) assuming l > 2*Pi;
simplify(convert(usol, exp)) assuming l > 2*Pi;

It would be good if you learned enough Maple to make small changes in the code, e.g. putting in another term in the equation. 
Here is an animation of a solution of your modified equation.

>  ikdv:= diff(f(x,t),t) + diff(f(x,t),x,x,x) + 6*f(x,t)*diff(f(x,t),x)=sin(sqrt(2)*x);
   P:= 10*Pi/sqrt(2);  # period is a multiple of the period of your new term
   S:= pdsolve(ikdv,{f(0,t)=f(P,t),D[1](f)(0,t)=D[1](f)(P,t),
     D[1,1](f)(0,t) = D[1,1](f)(P,t),f(x,0) =  0},numeric, spacestep=0.01);
   S:-animate(t=0 .. 5);

It would be good if you learned enough Maple to make small changes in the code, e.g. putting in another term in the equation. 
Here is an animation of a solution of your modified equation.

>  ikdv:= diff(f(x,t),t) + diff(f(x,t),x,x,x) + 6*f(x,t)*diff(f(x,t),x)=sin(sqrt(2)*x);
   P:= 10*Pi/sqrt(2);  # period is a multiple of the period of your new term
   S:= pdsolve(ikdv,{f(0,t)=f(P,t),D[1](f)(0,t)=D[1](f)(P,t),
     D[1,1](f)(0,t) = D[1,1](f)(P,t),f(x,0) =  0},numeric, spacestep=0.01);
   S:-animate(t=0 .. 5);

Sorry, there is no way around that.  It is inherent in the definition of "independent".  For more advanced applications, where r[i] may not be independent of r[j] for j < i but it still doesn't help, you might look up such things as "Optional stopping theorem".

Sorry, there is no way around that.  It is inherent in the definition of "independent".  For more advanced applications, where r[i] may not be independent of r[j] for j < i but it still doesn't help, you might look up such things as "Optional stopping theorem".

That does not take symmetry into account. 
The symmetry group consists of 8 mappings: e (the identity), r (a 90 degree rotation), r@@2, r@@3, s (a reflection), s @ r, s @ r@@2, s @ r@@3, where

> r := L -> [L[7],L[4],L[1],L[8],L[5],L[2],L[9],L[6],L[3]];
  s := L -> [L[7],L[8],L[9],L[4],L[5],L[6],L[1],L[2],L[3]];

According to Burnside's lemma  <en.wikipedia.org/wiki/Burnside%27s_lemma>, if you identify boards related by symmetry, the number of allowed boards can be computed as follows.

> 1/8 * (nops(OKboards) + add(nops(select(t -> evalb(f(t)=t), OKboards)), 
       f = [r, r@@2, r@@3, s, s @ r, s @ r@@2, s @ r@@3]));            
    
     765

That does not take symmetry into account. 
The symmetry group consists of 8 mappings: e (the identity), r (a 90 degree rotation), r@@2, r@@3, s (a reflection), s @ r, s @ r@@2, s @ r@@3, where

> r := L -> [L[7],L[4],L[1],L[8],L[5],L[2],L[9],L[6],L[3]];
  s := L -> [L[7],L[8],L[9],L[4],L[5],L[6],L[1],L[2],L[3]];

According to Burnside's lemma  <en.wikipedia.org/wiki/Burnside%27s_lemma>, if you identify boards related by symmetry, the number of allowed boards can be computed as follows.

> 1/8 * (nops(OKboards) + add(nops(select(t -> evalb(f(t)=t), OKboards)), 
       f = [r, r@@2, r@@3, s, s @ r, s @ r@@2, s @ r@@3]));            
    
     765

In fact

> seq(whatever(a), a = a);

is legal: the special evaluation rules for seq make this work, so that only the final a is evaluated as a global variable.  For example:

> a := [1, 2, 3]:
  seq(a^2, a = a);

    1, 4, 9

However, it is not good practice because it is very confusing to any human who tries to read your code. 
There's no shortage of variable names, so why use the same name to do two different jobs?

In fact

> seq(whatever(a), a = a);

is legal: the special evaluation rules for seq make this work, so that only the final a is evaluated as a global variable.  For example:

> a := [1, 2, 3]:
  seq(a^2, a = a);

    1, 4, 9

However, it is not good practice because it is very confusing to any human who tries to read your code. 
There's no shortage of variable names, so why use the same name to do two different jobs?

I guess it should be stated that any resemblance between the names of that [poor excuse for a] hockey team and our favourite computer algebra system is purely coincidental.

The output of PDF looks strange because it involves (unnecessarily) nested piecewise functions.  However, Maple can simplify it:

> simplify(PDF(exp(r*X),t));

              {             0                    t < 0
              {
              {                        2
              {      1/2          ln(t)
              {     2    exp(-1/2 ------)
              {                      2
              {                    r~
              { 1/2 ---------------------        0 <= t
              {            1/2
              {          Pi    t r~

 

First 30 31 32 33 34 35 36 Last Page 32 of 187