  We study theoretically the formation of shear bands in time-dependent flows
of polymeric and wormlike micellar surfactant fluids, focussing on the
protocols of step shear stress, step shear strain (or in practice a rapid
strain ramp), and shear startup, which are commonly studied experimentally. For
each protocol we perform a linear stability analysis to provide a
fluid-universal criterion for the onset of shear banding, following our recent
Letter [Phys. Rev. Lett. 110 (2013) 086001]. In each case this criterion
depends only on the shape of the experimentally measured rheological response
function for that protocol, independent of the constitutive properties of the
material in question. (Therefore our criteria in fact concern all complex
fluids and not just the polymeric ones of interest here. A separate manuscript
[in preparation] will explore them in a broad class of disordered soft glassy
materials including foams, dense emulsions, dense colloids, and microgel bead
suspensions.) An important prediction is that pronounced banding can arise
transiently in each of these protocols, even in fluids for which the underlying
constitutive curve of stress as a function of strain-rate is monotonic and a
steadily flowing state is accordingly unbanded. For each protocol we provide
numerical results in the rolie-poly and Giesekus models that support our
predictions. We comment on the ability of the rolie-poly model to capture the
observed experimental phenomenology, and on the failure of the Giesekus model.
