NOTE: Whoever finds a working way for obtaining the basins of attraction in the $(x,\mu)$-plane will add his/her name along with @Quantum_Oli in the list of the acknowledgements of the resulted research paper.
In a recent previous post @Quantum_Oli proposed a very efficient and elegant code for obtaining the basins of attraction of the potential of the planar circular restricted three-body problem.
The code is the following:
The potential function and the derivatives
μ = 1/2;
V[x_, y_] := ((1 - μ)/Sqrt[(x + μ)^2 + y^2]) + μ/Sqrt[(x + μ - 1)^2 +
y^2] + 1/2*(x^2 + y^2);
Vx = D[V[x, y], x];
Vy = D[V[x, y], y];
Vxx = D[V[x, y], {x, 2}];
Vyy = D[V[x, y], {y, 2}];
Vxy = D[V[x, y], x, y];
Vyx = D[V[x, y], y, x];
Determining the equilibrium (Lagrange) points
sol = N /@ Solve[{Vx == 0, Vy == 0}, {x, y}]
The formula for the Newton's iterative method
newton[{x_, y_}] = {x, y} - {Simplify[(Vx Vyy - Vy Vxy)/(Vyy Vxx -
Vxy^2)], -Simplify[(Vx Vyx - Vy Vxx)/(Vyy Vxx - Vxy^2)]};
The iterative method
tab = ParallelTable[{{i, j},
Sequence @@ Through[{Length, Last}[FixedPointList[newton, {i, j}, 100]]]},
{i, -2, 2, 0.01}, {j, -2, 2, 0.01}];
and finally creating a list with all the required information
rules = Rule @@@ Transpose[{sol[[;; , ;; , 2]], Range[Length[sol]]}];
tab[[;; , ;; , 3]] = Map[First@Nearest[rules, #[[3]]] &, tab, {2}];
dataList = Flatten /@ Flatten[tab, 1];
The result is the following beautiful plot
The above code works fine with $(x,y)$ initial conditions and for a specific value of $\mu$ (e.g., $\mu = 1/2$). Now I want the following: obtain the basins of attraction for a continuum spectrum of values of $\mu$, where $y = 0$. In other words we scan initial conditions on the $x$-axis $(y = 0)$ in the $(x,\mu)$-plane. Now the two-dimensional grid of initial conditions will be
data = Flatten[Table[{i, j}, {i, -8, 8, 0.0079}, {j, 0.10, 0.49, 0.0079}], 1];
where $i$ corresponds to $x$, while $j$ corresponds to $\mu$.
The structure of the desired plot should be something like that
I tried myself but the are some issues which I cannot solve. First the initialSolve (sol) seems not to working with decimal values of $\mu$. Then at the end when we create the rules the solutions now are not fixed but they vary with respect to the particular value of $\mu$.
Any ideas on how to achieve what I want?
Many thanks in advance!



Rationalizemu – Quantum_Oli Dec 08 '15 at 16:25