I was playing around with a 3-D potential $V$ such that $V_{(r)} = 0$ for $r<a$, and $V_{(r)} = V_0>0$ otherwise. By using the Schrödinger Equation, I showed that: $$\frac{-\hbar}{2m}\frac{1}{r^2}\frac{d}{dr}\bigl( r^2\frac{d}{dr}\bigr)\psi = E\psi$$
I then used the substitution $\psi_{(r)}=f_{(r)}/r$ and $k=\sqrt{2mE}/\hbar$ to get: $$\frac{1}{r}\frac{d^2f_{(r)}}{dr^2}=-\frac{k^2}{r}f_{(r)} \tag{I}$$
which describes the wavefunction $\psi_{(r)}=f_{(r)}/r$ inside the sphere. Hence, the differential equation has the domain $0\leq r<a$, and I cannot multiply both sides by $r$. This is unfortunate, because there is a similar equation for the outside of the sphere: $$\frac{1}{r}\frac{d^2f_{(r)}}{dr^2}=\frac{k'^2}{r}f_{(r)}$$ As this is outside the sphere, I can multiply both sides by $r$ to get a familiar differential equation that can be solved easily: $$\frac{d^2f_{(r)}}{dr^2}=k'^2f_{(r)}$$
If I do the same thing to $(I)$, I obtain the equation for simple harmonic motion, but substituting the solution back into $(I)$ as a sanity check gives a division by zero when evalutating for $r=0$. After that, I tried a number of substitutions to make $(I)$ have a more recognisable form - to no avail. Then I had the idea of multiplying my trial solution by some other function of $r$ so that upon substitution into $(I)$, the evaluation of $r=0$ doesn't give an infinity... but I don't know quite how to do that...
Long story short..... my question is: what trick do I need to get a meaningful solution to $(I)$?