kill(all)$

biotech : find U(z) = one term  approx , wavefront propagation from FE ,part 4 ,version 1.0
peter.vlasschaert@gmail.com,14/05/2020

load packages
============

load(lrats)$

see:website
=========

biotech : find U(z) ? , wavefront propagation from FE ,part 3 ,version 1.0
maxima : biotech :appendix 2: asymptotic solution(second order diff. equation),version 1.0

assume(a>0,b>0,c>0);

p1:'diff(U,z)*c+U*(1-U^q)+'diff(U,z,2)=0;

rem : c = wave speed.,
rem : L(U) =0

find solution : U(z), one term
======================

p1a:U=1/(1+a*exp(b*z))^s;

find : a,b, s=f(q)
=============

1e) step : subst , p1a into p1
----------------------------------------

p2a:subst([p1a],p1);

p2a1:ev(p2a,diff);

p2b:L(U)= lhs(p2a1);

rhs:L(U)

p2b1:args(rhs(p2b));

p2b2:map(factor,p2b1);

I need to factor out :(a*%e^(b*z)+1)^(-s-2)
================================
from list 2b2

p2b3:[1,(a*%e^(b*z)+1)^(-2),(a*%e^(b*z)+1)^(-1),(a*%e^(b*z)+1)^(-1)];

→ compensation

p2b3a:makelist(1/p2b3[i],i,1,4);

 =>  orginal

p2b4:p2b2*p2b3;

p2b5:lratsubst([(a*%e^(b*z)+1)^(-s-2)=mm],p2b4/mm);

 => compensated

p2b6:p2b5*p2b3a;

p2b7:map(expand,p2b6);

p2b8:sum(p2b7[i],i,1,4);

p2b9:collectterms(p2b8,exp(2*b*z),exp(b*z));

find coef:
=======

→ %e^(2*b*z)  =r1

p10a :lratsubst([%e^(2*b*z)=r1],part(p2b9,1));

p10b:expand(p10a/r1)=0;

→%e^(b*z)  =r2

p11a :lratsubst([%e^(b*z)=r2],part(p2b9,3));

p11b:expand(p11a/r2)=0;

→%e^(0) 

p12a:part(p2b9,2)+part(p2b9,4) =0;

reason 1  - 1 =0 only when

p12b:args(lhs(p12a));

p12b1:p12b[2];

p12b2:args(p12b1)[1];

p12b3:args(p12b2);

p12b4:p12b3[2] =0;

p12b5:solve(p12b4,s)[1];

q=1, nonlinear ode
--------------------------

p13a:subst([q=1],p1);

find  s ?

p13b:subst([q=1],p12b5);

use : %e^(2*b*z) ,p10b
==================

p14a:subst([p13b],p10b);

p14a1:factorsum(lhs(p14a))=rhs(p14a);

→  a=1,arbitrary

p14a2:subst([a=1],p14a1);

→ solve :b

p14a3:solve(p14a2,b);

use : %e^(b*z) ,p10b
==================

p15a:p11b;
p15a1:factorsum(p15a);

p15a2:subst([a=1,s=2],p15a1);

→ solve :c

p15a3::solve(p15a2,b);

p15a4:subst([c=2],p15a3);

positiv values :b

p15a5:float(p15a4);

=> when c=2,use 'p14a3'

p16a:subst([c=2],p14a3);

p16a1:p16a[1];

  => approximation  U(z),asymptotic solution 
-------------------------------------------------------------

insert  U(z)  = (p16a1;p13b)

p17:subst([p16a1,p13b],p1a);

BC : U=1/2  (z=0),find :a

p17a:1/2=subst([z=0],rhs(p17));

because : a>0,second value

p17b:solve(p17a,a);

 => approximation : U(z)
---------------------------------

p17c:subst([p17b[2]],p17);

test  limit : z=-∞,z=∞
================

p18a:'limit(rhs(p17c),z,minf) =limit(rhs(p17c),z,minf) ;

p18b:'limit(rhs(p17c),z,inf) =limit(rhs(p17c),z,inf) ;

wxplot2d([rhs(p17c)], [z,-1,1])$

wxplot2d([rhs(p17c)], [z,-100,100])$

other approximation:insert  U(z)  = (p15a4[2];p13b),subst :p1

p19:subst([p15a4[2],p13b],p1a);

use BC : U(z=0) =1/2

p19a:subst([U=1/2,z=0],p19);

only use : a>0,second value

p19b:solve(p19a,a);

p19c:subst([p19b[2]],p19);

test  limit : z=-∞,z=∞
================

p20a:'limit(rhs(p19c),z,minf) =limit(rhs(p19c),z,minf) ;

p20b:'limit(rhs(p19c),z,inf) =limit(rhs(p19c),z,inf) ;

wxplot2d([rhs(p19c)], [z,-1,1])$

wxplot2d([rhs(p19c)], [z,-100,100])$

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