# Infinite expression NDSolve conditions even with Block machine epsilon

I have a question please. I have an issue with my code while trying to solve an equation. Here it is :

sol = Block[{\[Epsilon] = $MachineEpsilon}, NDSolve[{Div[(f[x])*(1 - f[x])*Grad[(-2 f[x] + 4*f[x]^2) - Laplacian[f[x], {x, y, z}, "Spherical"], {x, y, z}, "Spherical"], {x, y, z}, "Spherical"] == \[Epsilon], f == 0.6, f' == \[Epsilon], f == \[Epsilon],f'[\[Epsilon]]==\[Epsilon]}, f, {x, \[Epsilon], 5}]]  I get the following messages : Power::infy: Infinite expression 1/0. encountered. >>  And others of the same type. The last one is NDSolve::ndnum: Encountered non-numerical value for a derivative at x == 1.. >>  I don't get why since I suppressed all the zeros from my boundaries and values. I then tried, following (105714) : xmax = 5 e =$MachineEpsilon

sol = ParametricNDSolve[{Div[(f[x])*(1 - f[x])*Grad[(-2 f[x] + 4*f[x]^3) - Laplacian[f[x], {x, y, z}, "Spherical"], {x, y, z}, "Spherical"], {x, y, z}, "Spherical"] == 0, f == 0.6, f[xmax] == bc1, f'[e] == bc2, f'[xmax] == bc3}, f, {x, e, xmax}, {bc1, bc2, bc3}]

obj[bc1_?NumericQ, bc2_?NumericQ, bc3_?NumericQ] := sol[bc1, bc2, bc3][xmax]

solpc = FindRoot[obj[bc1, bc2, bc3] == 0, {{bc1, 0.1}, {bc2, 0.1}, {bc3, 0.1}}]

sols = f -> sol[bc1, bc2, bc3] /. solpc

Plot[Evaluate[f /. sols], {x, 0, 10}]


But I assume I made mistakes, since I get error messages from the line with solpc :

The function value...s not a list of numbers with dimensions {1} at {bc1,bc2,bc3} = \ {0.1,0.1,0.1}

• In any case, I think the problem is likely to be with "StartingInitialConditions". There are several problems similar to this one on the site, which you can find if you search for "StartingInitialConditions". – Michael E2 May 14 '18 at 11:45