I just got the new mathematica version 10 and tried to solve the following system of differential equation.
$$r^2\frac{d^2f}{dr^2} = 2f(1-f)(1-2f)+\frac{r^2}{4}h^2(f-1)$$ $$\frac{d}{dr}\left[r^2\frac{dh}{dr} \right]=2h(1-f)^2$$ $$ f(0)=h(0)=0, \quad f(\infty)=h(\infty)=1$$
and my code in mathematica,
Clear[eqn, bc, f, h]
eqn = {r^2*f''[r] == 2 f[r] (1 - f[r]) (1 - 2 f[r]) - r^2/4 (h[r])^2 (1 - f[r]),D[r^2*h'[r], r] ==
2 h[r] (1 - f[r])^2};
bc = {f[0.000001] == 0, f[20] == 1, h[0.000001] == 0, h[20] == 1};
sol = NDSolve[{eqn, bc}, {h, f}, {r, 0.000001, 20}]
Mathematica returned the error message:
NDSolve::ndsz: At r == 16.162462464292577`, step size is effectively zero; singularity or stiff system suspected. >>
Now, my problem is the New version 10 does not give me the InterpolatingFunction
while the previous version 8 gives me,
{{h->InterpolatingFunction[{{1.`*^-6,20.`}},"<>"],f->...}}
Does anybody know what's going wrong with the new version? How may I get the solution in V10? My sincere thanks for you patience and help!
It seems that the numerical solution behaves strangely in large $r$ region. If I set the boundary at $r=50$, the solution looks like this,
*^-6,20.
}},"<>"],f->...}} when I plot them out I just got the same plot as @Michael E2. However V10 does not give me that $\endgroup$