How to numerically solve an eigenvalue problem of an ODE I am trying to replicate a result from a paper (Eq. 36).
There, the authors numerically solved an eigenvalue problem:
$\frac{d}{d\zeta}\left[ \alpha_1 f^{\frac{1}{2}} \frac{df}{d\zeta}\right] + (1-\mu) \zeta \frac{df}{d\zeta} + 2\mu f - \frac{c_1}{\alpha_1} f^{\frac{3}{2}}=0$,
$\frac{d f^{\frac{3}{2}} (0)}{d\zeta} = 0, f(1)=0,  \frac{d f^{\frac{3}{2}} (1)}{d\zeta} = 0. $
Just to be clear, $f$ is just a function of $\zeta$. $\mu$ is a parameter of the ODE. It determines if a solution exists according to the authors. $\alpha_1, c_1$ are constants.
The authors claimed that such an eigenvalue problem could be easily solved numerically but I do not know how I should approach.
Could you please advice?
 A: Assuming $f$ and $\mu$ are unknown but everything else is a known constant: you can solve for $f$ and $\mu$ using a shooting method.

*

*Write everything in terms of $g(\zeta) = f(\zeta)^{3/2}$ instead of $f$, so that the boundary conditions become ordinary Dirichlet and Neumann conditions.

*Next, cut up the $\zeta$-interval $[0,1]$ into a 1D grid of spacing $h = \frac{1}{N}$ and let $g_i = g(i/N)$. Larger choices of $N$ will yield a more accurate answer at higher computational cost.

*Discretize your ODE onto the grid by expressing differential operators as finite differences. Since the ODE is second-order, you will get a set of discrete equations involving three consecutive values of $g$:
$$L(g_{i}, g_{i+1}, g_{i+2},\mu) = 0.$$

*Guess a value of $\mu$.

*Since you know $g_N$ and $g_{N-1}$ from the boundary conditions, you can solve for $g_{N-2}$, and then iteratively solve for all other values of $g_i$.

*Does $\frac{g_1-g_0}{h}\approx 0$? If so, your value of $\mu$ happened to be correct. If not, change your guess and repeat step 5. There are several reasonable strategies here: you might start with a coarse sampling of different $\mu$ guesses and then refine the search near where $|g'(0)|$ is smallest, or start with one guess and incrementally update $\mu$ in the direction that decreases $|g'(0)|$.

