For such a equation
$$-y''(x) + x^2\cdot y(x) - |y(x)|^2\cdot y(x) = 0$$
with initial conditions: $y(-500) = 0$ and $y(500) = 0$.
I write in mathematica
ic1 = 0;
xmax = 500;
xmin = -500;
sol = NDSolve[{-y''[x] + x^2*y[x] - Abs[y[x]]^2*y[x] == 0,
y[xmax] == ic1, y[xmin] == ic1}, y[x], {x, xmin, xmax}]
Plot[y[x] /. sol, {x, xmin, xmax}]
but the graph is incorrect. Please help me
y[x]
, we can see that there is only one real root. (Solve[-y''[x] + x^2*y[x] - Abs[y[x]]^2*y[x] == 0, y[x]]
). Moreover, your conditions suggestion that, there will be only trivial solution to this problem. Please paste a link, where we can see the equation ourselves. $\endgroup$