Solution (source code)

= Solution

Linearizing at extinction gives $n_t=(r-δ)n+Dn_{xx}$. The principal eigenfunction for Neumann data at $0$ and Dirichlet data at $L$ is $\cos(πx/(2L))$, with growth rate
$$
r-δ-Dπ^2/(4L^2).
$$
A population is viable exactly when this is positive, requiring $r>δ$ and $L>(π/2)\sqrt{D/(r-δ)}$. Thus intrinsic growth must beat predation and the refuge must exceed the diffusion-dependent critical size.