I want to solve the following differential equation
f''[z] + (1/z)*f'[z] - f[z] + f[z]^3 == 0
subject to the boundary conditions
$$f^{\prime}(0)=0\qquad\lim_{z\to\infty}f(z)=0$$ The solution for R subject to these boundary conditions is known as Townes soliton. I have followed what is shown in the example solved here: https://mathematica.stackexchange.com/a/156362/73726.
What I have tried so far is the following:
sol = NDSolveValue[{f''[z] + (1/z)*f'[z] - f[z] + f[z]^3 == 0, f[5] == 0, f'[0] == 0}, f, {z, 0, 5}, Method -> { "Shooting", "StartingInitialConditions" ->{f[5] == 100, f'[0] == 0}}];Plot[sol[z], {z, 0, 5}, AxesLabel -> {z, f}]
But it is retuning the following errors
NDSolve`Shooting::ndcinit: Initial conditions should be specified at a single point.
NDSolveValue::dsvar: 0.00010214285714285715` cannot be used as a variable.
General::stop: Further output of NDSolveValue::dsvar will be suppressed during this calculation.