To determine a constant in an ODE 
Let $w(r)$ be a function of $r$, we have the following ODE:
  $$r^{n-1}w'+\frac{1}{2}r^nw=a$$
  for a constant $a$. 

Assume the equation holds for all positive integer $n$. The book claims that if assuming $\lim\limits_{r\to \infty}w= 0$ and $\lim\limits_{r\to \infty}w'= 0$, we have $a=0$. I cannot see why this holds. Any help is appreciated.

Assume $a=1$ and $n=3$, then you have
\begin{align}
w'+\frac{r}{2}w= \frac{1}{r^2}.
\end{align}
Let us assume $w(1) = 1$, then we see that
\begin{align}
w(r) = \exp\left( \frac{1-r^2}{4}\right)+\exp\left(\frac{-r^2}{4} \right) \int^r_1 t^{-2} \exp\left(\frac{t^2}{4} \right)\ dt 
\end{align}
and
\begin{align}
w'(r) = -\frac{r}{2}\exp\left( \frac{1-r^2}{4}\right)-\frac{r}{2}\exp\left( \frac{-r^2}{4}\right)\int^r_1 t^{-2} \exp\left(\frac{t^2}{4} \right)\ dt + \frac{1}{r^2}.
\end{align}
Observe
\begin{align}
\lim_{r\rightarrow \infty}w(r) =&\  \lim_{r\rightarrow \infty}\exp\left(\frac{-r^2}{4} \right) \int^r_1 t^{-2} \exp\left(\frac{t^2}{4} \right)\ dt\\
=&\ \lim_{r\rightarrow \infty} \frac{r^{-2}\exp\left( \frac{r^2}{4}\right)}{\frac{r}{2}\exp\left( \frac{r^2}{4}\right)} = \lim_{r\rightarrow \infty}\frac{2}{r^3}=0
\end{align}
and
\begin{align}
\lim_{r\rightarrow \infty} w'(r) = -\frac{1}{2}\lim_{r\rightarrow \infty}r\exp\left( \frac{-r^2}{4}\right)\int^r_1 t^{-2} \exp\left(\frac{t^2}{4} \right)\ dt =0.
\end{align}
Clearly $a=1\neq 0$. So I am not sure what your textbook is saying. Maybe limit as $r\rightarrow 0$ not $r\rightarrow \infty$?
