A linear growth-diffusion equation is studied in a time-dependent interval whose location and length both vary. We prove conditions on the boundary motion for which the solution can be found in exact form and derive the explicit expression in each case. Next, we prove the precise behaviour near the boundary in a ‘critical’ case: when the endpoints of the interval move in such a way that near the boundary there is neither exponential growth nor decay, but the solution behaves like a power law with respect to time. The proof uses a subsolution based on the Airy function with argument depending on both space and time. Interesting links are observed between this result and Bramson's logarithmic term in the nonlinear FKPP equation on the real line. Each of the main theorems is extended to higher dimensions, with a corresponding result on a ball with a time-dependent radius.