Dynamics of a multiplier–accelerator model with nonlinear investment function