In the 1990s, after a series of experiments, the behavioural psychologist and economist Daniel Kahneman and his colleagues formulated the following peak-end evaluation rule: the remembered utility of pleasant or unpleasant episodes is accurately predicted by averaging the peak (most intense value) of instant utility (or disutility) recorded during an episode and the instant utility recorded near the end of the experience (Kahneman et al 1997 Q. J. Econ. 112 375–405). Based on this rule, we propose a mathematical model for the time evolution of the experienced utility function given by the scalar differential equation where f represents exogenous stimuli, h is the maximal duration of the experience, and are some averaging weights. In this work, we study equation and show that, for a range of parameters and a periodic sine-like term f, the dynamics of can be completely described in terms of an associated one-dimensional dynamical system generated by a piece-wise continuous map from a finite interval into itself. We illustrate our approach with two representative examples. In particular, we show that the utility u(t) (e.g. ‘happiness’, interpreted as hedonic utility) can exhibit chaotic behaviour.