kill(all)$

biotech:apppendix : method of lines 'fisher nonlinear pde', version 1
peter.vlasschaert@gmail.com,26/05/2020

method of lines:need 'system of discrete odes'

model :fisher nonlinear pde
======================

q1:diff(u(x,t),t) = D*diff(u(x,t),x,2)+r*u(x,t)*(1-u(x,t));

D= diffusion coef.
r  = reaction rate
---------------------------------------------------------------------------
→ : solve 'q1' ,need BC,IC
----------------------------------------------------------------------------
BC : Boundary Condition
IC   : Initial         Condition
-----------------------------------------------------------------------------

 ==========================================

discrete model(= method of lines), fisher equation.
=======================================
u(x,t)  → u[j](t)   , j = x-direction

eq[i]:=diff(u[i](t),t) = D/h^2*(u[i+1](t)-2*u[i](t)+u[i-1](t))+r*u[i](t)*(1-u[i](t));

m1:makelist(eq[ii],ii,1,10);
m2:makelist(u[ii](t),ii,1,10);
m2a:makelist(lhs(m1[ii])=expand(rhs(m1[ii])),ii,1,length(m2));

→  differentation with respect to, 't'

m3:diff(m2,t);

?,correction , coefmatrix → r*u[i](t)^2
============================
reason : linear coef. for 'coefmatrix'

p1:expand(coefmatrix(m1,m2));

see: above,u[0](t) ,u[11](t) ,needed be specified by : 'Boundary condition'
----------------------------------------------------------------------------------------------------

p2:augcoefmatrix(m1,m2);

need: last column vector of 'p2', "neg : sign , see :'m2a' above".
---------------------------------------------------------------------------------------

p2a:col(p2,10+1);

we get same : equation of, 'list , m1'
-------------------------------------------------

here correction: needed, nonlinearity
--------------------------------------------------
→  -r*transpose(m4)

m4:makelist((u[jj](t))^2,jj,1,length(m2));

p3:transpose(m3 ) = p1.transpose(m2)+(-1)*p2a-r*transpose(m4);

p3a:lhs(p3)=expand(rhs(p3));

----------------------------------------------------------------------------------------------------------------------------------------------------------------