Solution (source code)

= Solution

For $0\leq t\leq\tau$, the delayed argument lies in the prescribed history, so $n'(t)=r$ and $n(t)=1+rt$. For $\tau\leq t\leq2\tau$,
$$
n'(t)=r n(t-\tau)=r\{1+r(t-\tau)\}.
$$
Integrating from $\tau$ and using $n(\tau)=1+r\tau$ gives
$$
\boxed{n(t)=1+rt+\frac{r^2}{2}(t-\tau)^2,
\qquad \tau\leq t\leq2\tau.}
$$