The differential equation
$\frac{1}{u(r)}u^\prime(r)(u^2(r)-1)=\frac{2}{r}-\frac{2}{r^2}$
has four classes of solutions, as illustrated in this figure:
- $u'=0$, $u''<0$ at $r=1$
- $u=1$, $u'=+1$ at $r=1$
- $u=1$, $u'=-1$ at $r=1$
- $u'=0$, $u''>0$ at $r=1$
The slope for the case $u(1)=1$ can be gotten from $\lim_{h \to 0}u'(1+h)$:
$ u'(1+h)=\frac{u(1+h)}{u(1+h)^2-1}\left(\frac{2}{1+h}-\frac{2}{(1+h)^2}\right) $
and using the binomial approximation $(1+h)^\alpha \approx 1+\alpha h$ for small $h$, and the expansion $u(1+h)=u(1)+h u'(1) + O(h^2)$:
$ u'(1+h)=\frac{1+h u'(1)}{u'(1)} $
Taking the limit $h \to 0$ gives
$u'(1) = \pm 1$
As shown in the figure, however, I am able to numerically solve the equation for cases 1 (blue and magenta curves) and 4 (green and yellow curves). The numerical solver fails for the case u(1)=1, where the derivative is, naively, $0/0$.
Is there an analytical solution to this differential equation that allows me to plot solutions of class 2 and 3? Or can the equation be recast to permit a numerical solution in this case?