  Populations are made up of an integer number of individuals and are subject
to stochastic birth-death processes whose rates may vary in time. Useful
quantities, like the chance of ultimate fixation, satisfy an appropriate
difference (master) equation, but closed-form solutions of these equations are
rare. Analytical insights in fields like population genetics, ecology and
evolution rely, almost exclusively, on an uncontrolled application of the
diffusion approximation (DA) which assumes the smoothness of the relevant
quantities over the set of integers. Here we combine asymptotic matching
techniques with a first-order (controlling-factor) WKB method to obtain a
theory whose range of applicability is much wider. This allows us to rederive
DA from a more general theory, to identify its limitations, and to suggest
alternative analytical solutions and scalable numerical techniques when it
fails. We carry out our analysis for the calculation of the fixation
probability in a fluctuating environment, highlighting the difference between
(on average) deleterious and beneficial mutant invasion and the intricate
distinction between weak and strong selection.
