Example 3.2.8  Diffusion of a Substrate in an Enzyme Catalyzed Reaction - BVPs with Removeable Singularity 

Boundary value problems in cylindrical and spherical coordinates have an inherent singularity at x = 0.  These problems can be tackled using Maple's inbuilt midpoint methods.  For example, when obtaining the diffusion of a substrate in an enzyme catalyzed reaction,[6] the governing equation for the dimensionless  concentration is 

 

Typesetting:-mrow(Typesetting:-mo( 

 

where fTypesetting:-mrow(Typesetting:-mi( is a dimensionless function which describes the change of diffusion coefficient as a function of concentration: 

 

                                       fTypesetting:-mrow(Typesetting:-mi(=1+Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mi(Typesetting:-mrow(Typesetting:-mo( 

The boundary conditions are: 

 

Typesetting:-mrow(Typesetting:-mo(Typesetting:-mrow(Typesetting:-mo( 

and 

 

                                                 yTypesetting:-mrow(Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn( 

 

This boundary value problem is solved in Maple below for different values of  λ: 

> restart:
 

> with(plots):
 

> f(y):=1+lambda/(y(x)+0.01)^2;
 

`+`(1, `/`(`*`(lambda), `*`(`^`(`+`(y(x), 0.1e-1), 2)))) (1)
 

> Eq:=1/x^2*diff((x^2*f(y)*diff(y(x),x)),x)=10*y(x)/(y(x)+0.1);
 

`/`(`*`(`+`(`*`(2, `*`(x, `*`(`+`(1, `/`(`*`(lambda), `*`(`^`(`+`(y(x), 0.1e-1), 2)))), `*`(diff(y(x), x))))), `-`(`/`(`*`(2, `*`(`^`(x, 2), `*`(lambda, `*`(`^`(diff(y(x), x), 2))))), `*`(`^`(`+`(y(x)...
`/`(`*`(`+`(`*`(2, `*`(x, `*`(`+`(1, `/`(`*`(lambda), `*`(`^`(`+`(y(x), 0.1e-1), 2)))), `*`(diff(y(x), x))))), `-`(`/`(`*`(2, `*`(`^`(x, 2), `*`(lambda, `*`(`^`(diff(y(x), x), 2))))), `*`(`^`(`+`(y(x)...
`/`(`*`(`+`(`*`(2, `*`(x, `*`(`+`(1, `/`(`*`(lambda), `*`(`^`(`+`(y(x), 0.1e-1), 2)))), `*`(diff(y(x), x))))), `-`(`/`(`*`(2, `*`(`^`(x, 2), `*`(lambda, `*`(`^`(diff(y(x), x), 2))))), `*`(`^`(`+`(y(x)...
(2)
 

> eq:=expand(subs(lambda=0,Eq));
 

`+`(`/`(`*`(2, `*`(diff(y(x), x))), `*`(x)), diff(diff(y(x), x), x)) = `+`(`/`(`*`(10, `*`(y(x))), `*`(`+`(y(x), .1)))) (3)
 

> BCs:=(D(y)(0),y(1)-1);
 

(D(y))(0), `+`(y(1), `-`(1)) (4)
 

> sol:=dsolve({eq,BCs},{y(x)},type=numeric);
 

Error, (in dsolve/numeric/bvp) system is singular at left endpoint, use midpoint method instead
 

Maple identifies the singularity at x = 0 and suggests the midpoint method: 

> sol:=dsolve({eq,BCs},{y(x)},type=numeric,method=bvp[midrich]);
 

proc (x_bvp) local res, data, solnproc, ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; `:=`(_EnvDSNumericSaveDigits, Digits); `:=`(Digits, 14); if _EnvInF... (5)
 

> odeplot(sol,[x,y(x)],0..1,thickness=4,title="Figure Exp. 3.2.15.",axes=boxed);
 

Plot_2d
 

> sol(0);
 

[x = 0., y(x) = 0.227913456960032040e-1, diff(y(x), x) = 0.] (6)
 

> L:=[0,1e-2,1e-1,1,10];
 

[0, 0.1e-1, .1, 1, 10] (7)
 

> MM:=nops(L);
 

5 (8)
 

> clr:=[red,green,gold,blue,magenta];
 

[red, green, gold, blue, magenta] (9)
 

> for i to MM do
 

> eq:=expand(subs(lambda=L[i],Eq));
 

> sol:=dsolve({eq,BCs},{y(x)},type=numeric,method=bvp[midrich]);
 

> p[i]:=odeplot(sol,[x,y(x)],0..1,thickness=4,color=clr[i],title="Figure Exp. 3.2.16.",axes=boxed);
 

> od:
 

> display({seq(p[i],i=1..MM)});
 

Plot_2d
 

>