## 3 Numerical Methods
### Description of the Eigenvalue Search Method  
We search for the eigenvalue \(\omega\) that satisfies the boundary conditions at \(r_{\max}\). To accomplish this, we employ a genetic algorithm (GA), which is rooted in the theory of evolution. In a GA, an initial population exists within a defined environment. Each individual in this population is assigned a fitness level, representing their suitability for survival in the environment. This fitness level is determined solely by the DNA of each individual of the population. Better-adapted individuals have a higher likelihood of reproducing and passing on their genetic material to subsequent generations. Offspring are generated from two parents, each contributing approximately 50% of their genetic material. However, in nature, offspring may adapt better to the environment than their parents due to mutations in their DNA. This iterative process continues for many generations until significant changes are observed in the population. Based on this understanding of evolution, we outline our GA as follows:  
1. Define the problem: In our context, each individual represents a potential solution to the eigenvalue problem of system (20). The DNA chain determining each individual is represented as \(\mathbf{DNA}=(\omega,r_{\max})\), where the components of these vectors are called genes. 2. Initialize the population: the population is generated randomly, with a constant size \(N_{\text{population}}\) maintained throughout the evolution. 3. Fitness function: Define the fitness function as \[f(\omega,r_{\max})=\Big{[}\psi(r_{\max})^{2}+\psi^{\prime}(r_{\max})^{2} \Big{]}^{-1},\] (21) where \(\psi(r)\) is the solution of the system (20) associated with the value \(\omega\). The choice of the form of Equation (21) is due to the fact that both the wave function and its derivative must vanish in the limit when \(r\to r_{max}\), and we would like the violation of the condition on \(\psi\) and on \(\psi^{\prime}\) to be of the same order; then, we define the fitness as the inverse of the mean squared violation of the separate violations of \(\psi\) and on \(\psi^{\prime}\). 4. Selection: using an elitist method to select the best \(N_{\text{best}}\) individuals, the value of the fitness function of each element of the population is obtained, and they are arranged in such a way that those with a higher fit are first in the list. 5. Reproduction: Select two random parents from the first \(N_{\text{best}}\) to generate a new individual. The DNA genes of the new individual are randomly selected from the genes of the parents. 6. First Mutation: after creating a new individual, apply a mutation where each gene in the DNA chain has a probability of being amplified by a factor of 1.5. 7. Replacement: Repeat steps 5-6 for \(N_{\text{population}}-N_{\text{best}}\) to generate the remaining individuals. 8. Second mutation: Apply a differential mutation to the entire population. For each individual with \(\mathbf{DNA}_{i}\), select two other individuals with \(\mathbf{DNA}_{1}\) and \(\mathbf{DNA}_{2}\) randomly. Generate a new individual with \(\mathbf{DNA}_{\text{new}}=\mathbf{DNA}_{i}+0.1(\mathbf{DNA}_{2}-\mathbf{DNA}_ {1})\). If \(f(\mathbf{DNA}_{\text{new}})>f(\mathbf{DNA}_{i})\), replace the \(i\)th individual with the new one. 9. **Stop condition:** repeat steps 4-8 for multiple generations until \(f(\mathbf{DNA})>10^{8}\) for at least one individual in the population. By applying this algorithm, it is possible to find a solution to our problem by specifying only the amplitude of the order parameter \(\psi_{c}\) at the origin and the coefficient of the nonlinear term \(g\). Let us remember that the choice of \(V_{c}\) can be made arbitrarily; however, once the solution is found, we can rescale the gravitational potential and the eigenvalue as follows:  
\[\omega-V(r_{\max})-\frac{M(r_{\max})}{r_{\max}} \rightarrow \omega,\] \[V-V(r_{\max})-\frac{M(r_{\max})}{r_{\max}} \rightarrow V,\]  
so that the gravitational potential satisfies monopolar boundary conditions.