kill(all)$

biotech:Fisher Equation( = pde),intro (relation dimensional,non dimensional) ,version 1.0
peter.vlasschaert@gmail.com,11/05/2020

see : website
-------------------
--------------------------------------------------------------------------------------------
D=0 : ( (F)isher (E)quation (=FE) :term with D≠0)
 → biotech :numerical model(rk4),epidemic:one ode ,version 1.0a
      → variable        x :u   (in FE ,  u = u(x,t))
      → Parameters D,r
------------------------------------------------------------------------------------------

why : 
===
use D because ,space element(≠ D)  ,time element are both in the model( =FE)

load :packages
============

load(lrats)$

a)  first part : FE
=============

1e)   dimensional pde = ode  ( D = 0)
---------------------------------------------------
u=u(t): reason pde = ode ( nonlinear ode)
t:time

p1:'diff(u,t) = r*u*(1-u);

2e)  nondimensional pde = ode  ( D = 0)
---------------------------------------------------

→ find : nondimensional pde , use (t → tdot)

p1a:1/r*p1;

→tdot = r*t

p1b:'diff(u,tdot) = rhs(p1a);

b)  second part : FE
===============

1e)   dimensional pde ,  ( D ≠ 0)
---------------------------------------------------
u=u(x,t): reason pde ( = nonlinear pde)
x : space
t  : time

p2a:D*'diff(u,x,2);
p2b:lhs(p1)= rhs(p1)+p2a;

2e)  nondimensional pde   ( D ≠0)
---------------------------------------------------

→ find : nondimensional pde , use (t → tdot) ,same
                                                  , use (x →xdot)

p2c:1/r*p2b;

p2c1:lhs(p2c)=expand(rhs(p2c));

find xdot :

→ step1:coef 'diff(u,t,1),('diff(u,x,2))
-----------------------------------------------

p2da:ratcoeff(lhs(p2c1),'diff(u,t,1))       = A;
p2da1:rhs(p2da) = lhs(p2da)$
p2db:ratcoeff(rhs(p2c1),'diff(u,x,2))      = B;
p2db1:rhs(p2db) = lhs(p2db)$

→ step2:A,B into p2c1
--------------------------------

p2ea:lratsubst([p2da],lhs(p2c1))=lratsubst([p2db],rhs(p2c1));

A=1/r, B =1/(1/B) = 1/(r/D)

→step 3
------------

→step3a: second order derivative: 1/(r/D) = 1/sqrt(r/D)*1/sqrt(r/D)
set : C=sqrt(r/D)

p2ea1:lhs(p2c1)=(1/C)*(1/C)*'diff(u,x,2) -u^2+u;

→step3b: relation B & C

p2ea2:ratcoeff(rhs(p2ea),'diff(u,x,2)) =ratcoeff(rhs(p2ea1),'diff(u,x,2));

p2ea2a:subst([p2db1],p2ea2);

→step3c: find C

p2ea2b:solve(p2ea2a,C)[2];

→step4: xdot
------------------

p2ea2c: x*rhs(p2ea2b) = xdot;
p2ea2c1:rhs(p2ea2c) = lhs(p2ea2c);

→step5
------------

find : ∂u/∂x →∂u/∂xdot*∂xdot/∂x

p3:'diff(u,x)='diff(u,xdot)*subst([p2ea2c1],'diff(xdot,x));

p3a:part(rhs(p3),2) ;

p3a1:ev(p3a,diff);

p3a2:[p3a=p3a1];

p3a3:subst(p3a2,p3);

find : ∂(∂u/∂x)/∂x → ∂/∂xdot *(∂u/∂x)*∂xdot/∂x

p3a4:'diff(u,x,2) = 'diff(rhs(p3a3),xdot)*p3a;

depends(u,xdot);

p3a5:lhs(p3a4) = ev(rhs(p3a4),diff);

→ step 6 : nondimensional version  FE
------------------------------------------------------
tdot  →  p1b    into 'p2c1'
xdot →  p3a5  into 'p2c1'

p4:['diff(u,t) /r= lhs(p1b),p3a5];
p4a:subst(p4,p2c1);

→ step 7 : remove the dot 
------------------------------------

p5:subst([tdot=t,xdot=x],p4a);

p5a:lhs(p5)=factorsum(rhs(p5));

final result  : relation,  xdot=sqrt(r/D)*x,tdot=r*t
===================================
-----------------------------------------------------------------------
reason : 'p5a'    xdot → x
                            tdot → t
reason : p5a ( = nondimensional FE ,nonlinear pde)
               u = u(x,t)
----------------------------------------------------------------------