I am working through a problem of a bead moving without friction on a surface $z=f(r)$ in cylindrical polar coordinates $(r,\theta,z)$, under the influence of gravity. I have shown that $h=r^2\dot\theta$ is constant and that $$(*)\;\;\;\large (1+f_r^2)\ddot r+f_rf_{rr}\dot r^2-\frac{h^2}{r^3}+gf_r=0.$$ Then $f$ and $h^2$ are given as $$f(r)=\frac{1}{2}\alpha r^2-\frac{1}{6}\beta r^6,\;\;h^2=\frac{3\alpha^2g}{16\beta}$$ and I must now determine the linear stability of the equilibrium point $r_-=\large(\frac{\alpha}{4\beta})^\frac{1}{4}.$
Writing $r=r_-+r_1$ for small $r_1$, we see $\ddot r=\ddot r_1$, $f_r=\alpha r-\beta r^5$, and we can neglect the $\dot r^2=\dot r_1^2$ term as it is small.
In the solution though, they immediately go on to write $$(1+f_r^2)\ddot r_1+P'(r_-)r_1=0$$ where $P(r)=-\frac{h^2}{r^3}+gf_r$, determining the stability of the point by checking the sign of $P'(r_-).$
Could someone explain how they have deduced this linearised equation and why we can introduce the derivative of the $P(r)$ term? I cannot see how this follows from $(*)$