I am trying to solve the following ODE using Mathematica:
0=-f''[r]-(3/r)f'[r]+f[r]-3/2 f[r]^2 + a/2 f[r]^3
with the boundary conditions f'[0]=0 and f[r->infty]=0. a is just a number between 0 and 1.
I am quite new to Mathematica so am not sure of the technical details but I am currently using NDSolve. According to a paper that I have lifted the equation from, this is solved using the shooting method and 4th order Runge-Kutta; however, I thought NDSolve would do this for me. My Mathematica code is
f[r] /. NDSolve[{-f''[r] - 3/r f'[r] + f[r] -
3/2 f[r]^2 + a/2 f[r]^3 == 0, f'[0.1] == 0,
f[120] == 0}, f[r], {r, 0.1, 120}][[1]]
which outputs an Interpolating Function which is just a horizontal line at the x-axis, which is clearly wrong. Can anyone help please?
a
isn't defined, that's why NDSolve doesn't evaluate! $\endgroup$