  We study the dynamics of opinion formation in the situation where changing
opinion involves a cost for the agents. To do so we couple the dynamics of a
heterogeneous bounded confidence Hegselmann-Krause model with that of the
resources that the agents invest on each opinion change. The outcomes of the
dynamics are non-trivial and strongly depend on the different regions of the
confidence parameter space. In particular, a second order phase transition, for
which we determine the corresponding critical exponents, is found in the region
where a re-entrant consensus phase is observed in the heterogeneous
Hegselmann-Krause model. For regions where consensus always exist in the
heterogeneous Hegselmann-Krause model, the introduction of cost does not lead
to a phase transition but just to a continuous decrease of the size of the
largest opinion cluster. Finally in the region where fragmentation is expected
in the heterogeneous HK model, the introduction of a very small cost
paradoxically increases the size of the largest opinion cluster.
