We describe how to adapt a first-order perturbation approach and apply it in a piecewise fashion to handle occasionally binding constraints in dynamic models. Our examples include a real business cycle model with a constraint on the level of investment and a New Keynesian model subject to the...