theta = .2;
sol = NDSolve[{D[g[x, t], t] == x (1 - x) D[g[x, t], x, x] , g[1, t] == 0,
g[0, t] == theta (1 - Exp[-10000000 t]) }, g, {t, 0, 2 }, {x, 0, 1}]
f[x_, t_] := (g /. sol[[1, 1]])[x, t];
t = 0.5;
LogLogPlot[{f[x, t]/(x (1 - x)), 0.2/x}, {x, 0, 1}, PlotRange -> All,
PlotStyle -> {Red, Blue}]
One initial condition is required to solve the above equation as g[x, 0]. I do not have the functional form of g[x,0] whereas i have the data for
g[x,0]={19., 5., 4., 3., 3., 1., 3., 2., 2., 2., 3., 2., 0., 1., 0., 0., 0.,0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 1., 0., 0., 0., 1., 0.,1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0.,0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.} in steps of 0.01 and x varies from 0 to 1.
Can I use the values of g[x,0] from the list and invoke into the NDSolve to obtain the final numerical solution.
InterpolatingFunction
and use that. $\endgroup$g[1, t] == 0
. Just an advice. always write the pde on its own, write the BC on its own, and the ic on its own (i.e. on separate lines) and use these later in the call to NDSolve. This always makes things more clear instead of writing everything in one long command. $\endgroup$