Content uploaded by Andrea Tosin

Author content

All content in this area was uploaded by Andrea Tosin on Dec 24, 2018

Content may be subject to copyright.

Hydrodynamic models of preference formation

in multi-agent societies

Lorenzo Pareschi∗Giuseppe Toscani†Andrea Tosin‡Mattia Zanella§

Abstract

In this paper we discuss the passage to hydrodynamic equations for kinetic models of

opinion formation. The considered kinetic models feature an opinion density depending on

an additional microscopic variable, identiﬁed with the personal preference. This variable de-

scribes an opinion-driven polarisation process, leading ﬁnally to a choice among some possible

options, as it happens e.g. in referendums or elections. Like in the kinetic theory of rareﬁed

gases, the derivation of hydrodynamic equations is essentially based on the computation of the

local equilibrium distribution of the opinions from the underlying kinetic model. Several nu-

merical examples validate the resulting model, shedding light on the crucial role played by the

distinction between opinion and preference formation on the choice processes in multi-agent

societies.

Keywords: Opinion and preference formation, choice processes, kinetic modelling, hydro-

dynamic equations

Mathematics Subject Classiﬁcation: 35L65, 35Q20, 35Q70, 35Q91, 82B21

1 Introduction

The mathematical modelling of opinion formation in multi-agent societies has enjoyed in recent

years a growing attention [4,5,6,29,36,46]. In particular, owing to their cooperative nature,

the dynamics of opinion formation have been often dealt with resorting to methods typical of

statistical mechanics [14,16]. Among other approaches, kinetic theory served as a powerful basis

to model fundamental interactions among the so-called agents [8,9,10,17,30,47] and to provide

a sound structure for related applications [1,49]. In kinetic models, analogously to the kinetic

theory of rareﬁed gases, the mechanism leading to the opinion variation is given by binary, i.e.

pairwise, interactions among the agents. Then, depending on the parameters of such microscopic

rules, the society develops a certain macroscopic equilibrium distribution [37,40], which describes

the formation of a relative consensus about certain opinions.

Two main aspects are usually taken into account in designing the elementary binary interac-

tions. The ﬁrst is the compromise [20,52], namely the tendency of the individuals to reduce the

distance between their respective opinions after the interaction. The second is the self-thinking [47],

i.e. an erratic individual change of opinion inducing unpredictable deviations from the prescribed

deterministic dynamics of the interactions.

Recently, many eﬀorts have been devoted to include further details in the opinion formation

models, so as to capture more and more realistic phenomena. The usual strategy consists in

∗Department of Mathematics and Computer Sciences, University of Ferrara, Via Machiavelli 35, 44121 Ferrara,

Italy (lorenzo.pareschi@unife.it)

†Department of Mathematics “F. Casorati”, University of Pavia, Via Ferrata 1, 27100 Pavia, Italy

(giuseppe.toscani@unipv.it)

‡Department of Mathematical Sciences “G. L. Lagrange”, Dipartimento di Eccellenza 2018-2022, Politecnico di

Torino, Corso Duca degli Abruzzi 24, 10129 Torino, Italy (andrea.tosin@polito.it)

§Department of Mathematical Sciences “G. L. Lagrange”, Dipartimento di Eccellenza 2018-2022, Politecnico di

Torino, Corso Duca degli Abruzzi 24, 10129 Torino, Italy (mattia.zanella@polito.it)

1

taking additional behavioural aspects into account, such as the stubbornness of the agents [34,45],

the emergence of opinion leaders [25,27], the inﬂuence of social networks [2,48], the expertise

in decision making tasks [41], the personal conviction [3,7,11,19]. Generally, the aim of such

additional parameters is to model on one hand the resistance of the agents to change opinion and,

on the other hand, the prominent role played by some individuals in attracting others towards their

opinions. In all these contributions, the additional variables act as modiﬁers of the microscopic

interactions. This means that they aﬀect the process of opinion formation but are not aﬀected in

turn by the evolving opinions.

In the present paper we aim instead at modelling a parallel process to opinion formation,

namely the formation of preferences. The preference, which is driven by, but need not coincide

with, the opinion, is here understood as representative of the choice that an agent makes among

some possible options, such as e.g. some candidates in an election or yes/no in a referendum [18].

As such, and unlike the opinion, the preference evolves towards necessarily polarised states, which

reﬂect the available options.

To pursue this goal, we consider a novel class of inhomogeneous kinetic models for the joint

distribution function f(t, ξ, w), where ξis the variable describing the preference and wthe one

describing the opinion. In particular, f(t, ξ, w)dξdw is the proportion of agents who, at time

t≥0, express a preference in the interval [ξ, ξ +dξ] and simultaneously an opinion in the interval

[w, w +dw]. As far as the modelling of the interactions leading to the evolution of the opinion

is concerned, we take advantage of the well consolidated background recalled before. Conversely,

concerning the evolution of the preference, we assume transport-type dynamics of the form

dξ

dt = (w−α)Φ(ξ).

Here, in analogy with the classical kinematics, wplays morally the role of the velocity, i.e. it

drags the preference in time, however biased by a perceived social opinion α, which accounts for

the predominant social feeling. Moreover, the zeros of the function Φ deﬁne the options where the

preference may polarise.

These ingredients lead us to an inhomogeneous Boltzmann-type kinetic equation of the form

∂tf+ (w−α)∂ξ(Φ(ξ)f) = Q(f, f ),

where Qis a Boltzmann-type collision operator encoding the opinion formation interaction dynam-

ics. From here, analogously to the classical kinetic theory of rareﬁed gases, we derive macroscopic

equations for the density ρ=ρ(t, ξ) and the mean opinion m=m(t, ξ) of the agents with pref-

erence ξat time tby means of a local equilibrium closure based on the identiﬁcation of the local

equilibrium distribution of the opinions – the equivalent of a local “Maxwellian”. The precise type

of hydrodynamic equations that we obtain in this way depends on whether the mean opinion of

the agents is or is not conserved in time by the microscopic dynamics of opinion formation. For

instance, if it is conserved we get the following system of conservation laws:

(∂tρ+∂ξ(Φ(ξ)ρ(m−α)) = 0,

∂t(ρm) + ∂ξ(Φ(ξ)(M2,∞−αρm)) = 0,

where M2,∞denotes the energy of the local Maxwellian. For special classes of local equilibrium

distributions, that we compute from the collisional kinetic equation by an asymptotic procedure

reminiscent of the grazing collision limit of the classical kinetic theory [47,50], we can express

such an energy analytically in terms of the hydrodynamic parameters ρ,m. We recover therefore a

self-consistent macroscopic model, which we show to be hyperbolic for all the physically admissible

values of (ρ, m) and able to reproduce the preference polarisations, viz. the choices, discussed

above.

In more detail, the paper is organised as follows. In Section 2we give preliminary microscopic

insights into the joint process of opinion and preference formation, stressing in particular the role

of the perceived social opinion α. In Section 3we move to an aggregate analysis of the opinion

2

formation by means of Boltzmann-type kinetic models, studying in particular their steady states

which, as set forth above, pave the way for the identiﬁcation of the local equilibrium distributions

needed in the passage to the hydrodynamic equations. In Section 4we derive various types of

macroscopic models of preference formation out of the aforementioned inhomogeneous Boltzmann-

type equation and we link them precisely to key features of the microscopic interactions among the

agents. In Section 5we present several numerical tests, both at the kinetic and at the macroscopic

scales, which exemplify the distinction between the preference formation and the opinion formation

processes and show how much such a distinction enhances the interpretation of the social dynamics.

Finally, in Section 6we discuss further developments and research prospects.

2 A microscopic look at the opinion-preference interplay

The ﬁrst mathematical models of consensus formation in opinion dynamics were proposed in

the form of systems of ordinary diﬀerential equations (ODEs) describing the behaviour of a ﬁnite

number of agents. After the pioneering works [21,28], which introduced simple agent-based models

to understand the eﬀects of the inﬂuence among connected individuals, many research eﬀorts have

been devoted to the construction of sophisticated diﬀerential models of opinion formation. Besides

those dealing with simple consensus dynamics, in recent years new models of more realistic social

phenomena have been proposed to capture additional aspects. Without intending to review all

the literature, we give here some references on certain classes of models for ﬁnite systems: the

celebrated Hegselmann-Krause model [32], which considers bounded-conﬁdence-type interactions

to stress the impact of homophily in learning processes, see also [15,35]; models incorporating

leader-follower eﬀects [38]; models of social interactions on realistic networks [51]; models of opinion

control [12].

An aspect which, to our knowledge, has been so far basically disregarded in mathematical

models of opinion dynamics, in spite of its realism, is the distinction between the opinion in the

strict sense of the individuals about single issues and their overall preference, which, in some cases,

is actually mainly responsible for their choices. For instance, in case of referendums or political

elections, the preference of a voter can be identiﬁed with his/her voting intention, which may

not always coincide with his/her opinion on every topic debated during the election campaign.

Obviously, the preference evolves in time with the opinion, in such a way that if a certain opinion

persists for a suﬃciently long time it can aﬀect the preference considerably. For example, a

voter with a voting intention biased towards right (left, respectively) parties, who however ﬁnds

him/herself frequently in agreement with the positions taken by left (right, respectively) parties

on key topics of the election campaign, may end up with a ﬁnal vote opposite to his/her original

intention.

As a foreword to the subsequent contents of the paper, in this section we present some pre-

liminary considerations about the eﬀect of the interplay between opinion and preference, taking

advantage of a deterministic microscopic model for a ﬁnite number of agents. Let us consider then

a system composed by Nagents with microscopic state given by a pair (ξi, wi)∈[−1,1]2, where

wiis the opinion of the ith agent, ξiis his/her preference and i= 1, . . . , N . Sticking to a standard

custom in the literature of models of opinion dynamics, we describe mathematically the opinion of

an agent as a bounded scalar variable wiconventionally taken in the interval [−1,1]. In particular,

we understand the values wi=±1 as the two extreme opinions, while wi= 0 as the maximum of

indecisiveness. Since, from the physical point of view, the preference is commensurable with an

opinion, we adopt the same mathematical conventions also for the variable ξi.

In order to highlight the diﬀerent roles of the opinion and the preference variables, we rely on

the analogy with the classical kinetic theory of rareﬁed gases. There, a molecule moving on a line

is characterised by its position x∈Rand its velocity v∈R. In the absence of external forces, the

velocity remains constant, whereas the position varies according to the kinematic law

dx

dt =v. (1)

3

In practice, a particle with positive velocity will move rightwards, while a particle with negative

velocity will move leftwards. In ﬁrst approximation, it seems natural to assume that the opinion

plays the role of the velocity and the preference that of the position. Indeed, at least in the case

in which an agent has to end up with one of the two preferences ±1, like e.g. in a referendum,

one can assume that a large part of the agents with positive opinion will move their preferences

rightwards, while agents with negative opinion will move their preferences leftwards. Clearly, one

cannot resort to a law like (1), which allows the position to increase or decrease indeﬁnitely in

time: a correction is required in order to maintain the preference variable in the allowed interval

[−1,1].

A primary example of the analogy just discussed is provided below, where the time evolution

of the opinions and the preferences of the agents is modelled by the ODE system

dξi

dt = (wi−α)Φ(ξi)

dwi

dt =1

N

N

X

j=1

P(wi, wj)(wj−wi)

(2)

(3)

for i= 1, . . . , N, supplemented with initial conditions (ξi(0), wi(0)) = (ξ0,i, w0,i )∈[−1,1]2. The

second equation describes standard alignment dynamics among the opinions of the agents, i.e.

consensus, driven by the interaction/compromise function 0 ≤P(·,·)≤1, see e.g., [40,47]. The

ﬁrst equation describes instead the evolution of the preference of the ith agent based on the signed

distance between its true opinion wiand a reference opinion α∈[−1,1] perceived in the society,

which we will refer to as the perceived social opinion. The function Φ : [−1,1] →[0,1] has to be

primarily chosen so as to guarantee that ξi(t)∈[−1,1] for all t > 0. However, as we will see in

a moment, this function will be also useful to take into account meaningful polarisations of the

preferences.

In model (2)-(3), the coupling between opinion and preference is actually one-directional,

indeed the evolution of ξidepends on that of the wi’s but not vice versa. In particular, the

system (3) for the wi’s can be solved a priori, before analysing the dynamics (2) of the ξi’s. Let

us consider, in particular, the case of interactions with bounded conﬁdence, which are described

by taking

P(wi, wj) = χ(|wj−wi| ≤ ∆),(4)

where χdenotes the characteristic function and ∆ ∈[0,2] is a given conﬁdence threshold, above

which agents do not interact because their opinions are too far away from each other. If ∆ = 0

then only agents with the very same opinion interact, whereas if ∆ = 2 then we speak of all-to-all

interactions, considering that |wj−wi| ≤ 2 for all wi, wj∈[−1,1]. The latter case is actually

equivalent to choosing P≡1.

Depending on the value of ∆, one can observe a loss of global consensus. Asymptotically,

the opinions may form several clusters, whose number is dictated by ∆ and by the initial condi-

tions w0,1, . . . , w0,N , see Figure 1. However, since the function Pgiven in (4) is symmetric, i.e.

P(wi, wj) = P(wj, wi) for all i, j = 1, . . . , N, the mean opinion 1

NPN

i=1 wiis conserved in time

and for all t > 0 coincides, in particular, with the mean opinion at t= 0.

Now we give some insights into the preference dynamics modelled by (2), at least under special

forms of the function Φ. In order to avoid that the preference ξileaves the interval [−1,1], a very

natural condition is Φ(±1) = 0. This implies that the constant functions ξi(t) = −1 and ξi(t)=1

are indeed stationary solutions to (2) and may therefore represent attractive or repulsive equilibria

of the system, depending on the sign of wi−α.

For instance, we may choose

Φ(ξ) = 1 − |ξ|.

Taking for granted from (3) that wi(t)≤1 for all t > 0, if we integrate (2) starting from an initial

condition ξ0,i ∈[0,1] then for all times t > 0 in which ξiremains non-negative we ﬁnd

ξi(t)≤1−(1 −ξ0,i)e−(1−α)t≤1.

4

(a) ∆ = 1 (b) ∆ = 0.4 (c) ∆ = 0.2

Figure 1: Solution of (3) with N= 50 agents and Pgiven by (4) for decreasing values of the

conﬁdence threshold ∆. The initial opinions w0,i have been sampled uniformly in [−1,1]. The

ODE system has been integrated numerically via a standard fourth order Runge-Kutta method.

Likewise, taking for granted from (3) that wi(t)≥ −1 for all t > 0, if we start from an initial

condition ξ0,i ∈[−1,0] then for all times t > 0 in which ξiremains non-positive we deduce

ξi(t)≥ −1 + (1 + ξ0,i)e−(1+α)t≥ −1.

This argument, applied to the various time intervals in which ξihas constant sign, shows indeed

that ξi(t)∈[−1,1] for all t≥0. Nevertheless, we cannot solve (2) exactly, because from (3) we

cannot calculate exactly the function t7→ wi(t). On the other hand, we can get a useful idea at

least of the large time dynamics of (2) by ﬁxing wito its asymptotic value, say w∞,i ∈[−1,1],

and considering the equation dξi

dt = (w∞,i −α) (1 − |ξi|),

whose solution reads

ξi(t) = (−1 + (1 + ξ0,i)e(w∞,i −α)tif ξi(t)≤0

1−(1 −ξ0,i)e−(w∞,i −α)tif ξi(t)≥0.

From here we easily deduce that:

•if ξ0,i <0 and w∞,i < α then ξi→ −1 for t→+∞;

•if ξ0,i >0 and w∞,i > α then ξi→1 for t→+∞.

In both cases, the ﬁnal preference conﬁrms and consolidates the initial one, because w∞,i −αhas

the same sign as ξ0,i. Conversely,

•if ξ0,i <0 but w∞,i > α then ξi→1 for t→+∞;

•if ξ0,i >0 but w∞,i < α then ξi→ −1 for t→+∞.

In these cases, the ﬁnal preference reverses the initial one, because w∞,i −αhas opposite sign

with respect to ξ0,i.

Another possible choice of the function Φ is:

Φ(ξ) = |ξ|1−ξ2,(5)

which vanishes also at ξ= 0. Thus we are led to consider the equation

dξi

dt = (w∞,i −α)|ξi|1−ξ2

i,

whose solution reads

ξi(t) = ξ0,i

qξ2

0,i +1−ξ2

0,ie−2 sgn ξ0,i (w∞,i−α)t

.

Now the asymptotic trend of the preference can be summarised as follows.

5

(a) ∆ = 1, α =−0.3 (b) ∆ = 1, α = 0.3

Figure 2: The curves t7→ ξi(t) generated by the coupled system (2)-(3) with N= 50 agents and

P, Φ like in (4), (5) with ∆ = 1 and α=±0.3. The initial values w0,i,ξ0,i have been sampled

uniformly in the interval [−1,1]. The ODE system has been integrated numerically via a standard

fourth order Runge-Kutta method.

•For w∞,i < α:

–if ξ0,i <0 then ξi→ −1 for t→+∞;

–if ξ0,i >0 then ξi→0 for t→+∞.

•For w∞,i > α:

–if ξ0,i <0 then ξi→0 for t→+∞;

–if ξ0,i >0 then ξi→1 for t→+∞.

We observe that the large time behaviour of the preference is again a polarisation in poles coin-

ciding with the zeroes of the function Φ. Unlike the previous case, however, the presence of an

intermediate pole at ξ= 0 prevents a complete reversal of the initial preference when the latter has

opposite sign with respect to w∞,i −α. In such a situation, the agents simply become indecisive,

their preference tending indeed to zero.

In order to illustrate the actual coupled dynamics of (2)-(3), we solve numerically the coupled

system of equations with N= 50 agents and with the functions P, Φ given in (4), (5), respectively.

In Figure 2we present the curves t7→ ξi(t) in the case ∆ = 1 and for α=±0.3. Since

the agents reach a global consensus around the centrist opinion w= 0, cf. Figure 1(a), with a

leftward-biased perceived social opinion α < 0 we observe the polarisation of the preferences either

towards the indecisiveness ξ= 0, if the initial preference was in turn leftward-biased, i.e. ξ0,i <0,

or in ξ= 1, if the initial preference was rightward-biased, i.e. ξ0,i >0, cf. Figure 2(a). Conversely,

with a rightward-biased perceived social opinion α > 0 we observe indecisiveness if ξ0,i >0 and

consolidation in ξ=−1 if ξ0,i <0, cf. Figure 2(b).

Such rather simple dynamics may become more complex under the formation of multiple

opinion clusters. To exemplify this case, we consider now ∆ = 0.4, like in Figure 1(b), and again

the two cases α=±0.3, cf. Figure 3(a, b) along with also α=±0.6, cf. Figure 3(c, d). In this

case, simultaneous polarisations in ξ=±1 can also be observed, depending on the distribution of

the pairs (ξ0,i, w0,i ) at the initial time.

6

(a) ∆ = 0.4, α =−0.3 (b) ∆ = 0.4, α = 0.3

(c) ∆ = 0.4, α =−0.6 (d) ∆ = 0.4, α = 0.6

Figure 3: The same as in Figure 2but with ∆ = 0.4, cf. Figure 1(b), and α=±0.3 (top row),

α=±0.6 (bottom row).

3 Aggregate analysis of opinion dynamics

The discussion set forth in the previous section shows that it is in general quite hard to analyse

exactly the interplay between opinions and preferences from a strictly microscopic point of view.

Due to the severe dependence of the microscopic system on the particular initial state and tra-

jectory of each agent, the main diﬃculty is, as usual, to grasp the essential facts able to explain

the big picture, namely to depict the collective behaviour. For this reason, from this section we

move to a more aggregate analysis, which, starting from a description of opinion dynamics by

methods of statistical physics and kinetic theory, will ﬁnally lead us to macroscopic equations for

the preference dynamics written in terms of hydrodynamic parameters such as the density of the

agents and their mean opinion.

3.1 Microscopic binary interactions

In order to approach the opinion dynamics (3) from the point of view of kinetic theory, we need to

set up a consistent scheme of binary, i.e. pairwise, interactions among the agents. To this purpose,

inspired by [13], we consider (3) for just two agents, say i,j, and we discretise the diﬀerential

equation with the forward Euler formula during a small time step 0 < γ < 1. Setting

w:= wi(t), w∗:= wj(t), w0:= wi(t+γ), w0

∗:= wj(t+γ)

7

we obtain the binary rules

w0=w+γP (w, w∗)(w∗−w) + D(w)η,

w0

∗=w∗+γP (w∗, w)(w−w∗) + D(w∗)η, (6)

where we have also added a random contribution, given by a centred random variable η, modelling

stochastic ﬂuctuations induced by the self-thinking of the agents. Here, D(·)≥0 is an opinion-

dependent diﬀusion coeﬃcient modulating the amplitude of the stochastic ﬂuctuations, that is the

variance of η.

In general, the binary interactions (6) are such that

hw0+w0

∗i=w+w∗+γ(P(w, w∗)−P(w∗, w)) (w∗−w),(7)

where h·i denotes the expectation with respect to the distribution of η. Hence the mean opinion

is in general not conserved on average in a single binary interaction unless Pis symmetric, i.e.

P(w, w∗) = P(w∗, w) for all w, w∗∈[−1,1]. Furthermore, at leading order for γsmall enough

we have

h(w0)2+ (w0

∗)2i=w2+w2

∗+ 2γ(wP (w, w∗)−w∗P(w∗, w)) (w∗−w)

+D2(w) + D2(w∗)σ2+o(γ),(8)

where σ2>0 denotes the variance of η. Therefore, in general, also the energy is not conserved on

average in a single binary interaction, not even for a symmetric function P.

Equations (7), (8) show that a particularly interesting case is when Pis constant, for then

from (7) we deduce that the mean opinion is conserved in each binary interaction, while from (8)

we see that, at least in the absence of stochastic ﬂuctuations (i.e. formally for σ2= 0), the average

energy is dissipated:

h(w0)2+ (w0

∗)2i=w2+w2

∗−2γ(w∗−w)2+o(γ)≤w2+w2

∗+o(γ).

In order to be physically admissible, the interaction rules (6) have to be such that |w0|,|w0

∗| ≤ 1

for |w|,|w∗| ≤ 1. Observing that

|w0|=|(1 −γP (w, w∗))w+γP (w, w∗)w∗+D(w)η|

≤(1 −γP (w, w∗)) |w|+γP (w, w∗) + D(w)|η|,

where we have used the fact that |w∗| ≤ 1, we see that a suﬃcient condition for |w0| ≤ 1 is

D(w)|η| ≤ (1 −γP (w, w∗))(1 − |w|),

which is satisﬁed if there exists a constant c > 0 such that

(|η| ≤ c(1 −γP (w, w∗))

cD(w)≤1− |w|,∀w, w∗∈[−1,1].(9)

Considering that P(w, w∗)≤1 by assumption, the ﬁrst condition can be further enforced by

requiring |η| ≤ c(1 −γ), which implies that ηhas to be chosen as a compactly supported random

variable. The second condition forces instead D(±1) = 0. Taking inspiration from [47], possible

choices are: D(w)=1− |w|and c= 1, which produces |η| ≤ 1−γ; or D(w) = 1 −w2and c=1

2,

which yields |η| ≤ 1

2(1 −γ). Another less obvious option is

D(w) = q(1 −(1 + γs)w2)+and c=γs/2

√1 + γs, s > 0,(10)

where (·)+:= max{0,·} denotes the positive part, which produces |η| ≤ γs/2(1−γ)

√1+γs. This function

Dconverges uniformly to √1−w2in [−1,1] when γ→0+. Notice, however, that such a uniform

limit does not comply with (10) regardless of choice of c > 0, because of the inﬁnite derivative at

w=±1.

Exactly the same considerations hold true for the second interaction rule in (6).

8

3.2 Kinetic description and steady states

Introducing the distribution function f=f(t, w) : R+×[−1,1] →R+, such that f(t, w)dw is the

fraction of agents with opinion in [w, w +dw] at time t, the binary rules (6) can be encoded in a

Boltzmann-type kinetic equation, which, in weak form, writes:

d

dt Z1

−1

ϕ(w)f(t, w)dw

=1

2Z1

−1Z1

−1hϕ(w0) + ϕ(w0

∗)−ϕ(w)−ϕ(w∗)if(t, w)f(t, w∗)dw dw∗,(11)

where ϕ: [−1,1] →Ris an arbitrary test function, i.e. any observable quantity depending on the

microscopic state of the agents. Choosing ϕ(w) = 1, we obtain that the integral of fwith respect

to wis constant in time, i.e. that the total number of agents is conserved. This also implies that,

up to normalisation at the initial time, fcan be thought of as a probability density for every

t > 0. Choosing instead ϕ(w) = wwe discover

d

dt Z1

−1

wf (t, w)dw =γ

2Z1

−1Z1

−1

(P(w, w∗)−P(w∗, w))(w∗−w)f(t, w)f(t, w∗)dw dw∗,(12)

therefore the mean opinion M1:= R1

−1wf (t, w)dw is either conserved in time, if Pis symmetric so

that the right-hand side of the previous equation vanishes, or not conserved, if Pis non-symmetric.

This diﬀerence has important consequences on the steady distributions of (11), which in turn will

impact considerably on the equations describing the formation of the preferences. Therefore, in

what follows we investigate it in some detail.

3.2.1 Symmetric P

The prototype of a symmetric Pis the constant function P≡1. In this case, from (11) we

can recover an explicit expression of the asymptotic distribution function at least in the so-called

quasi-invariant regime, i.e. the one in which the variation of the opinion in each binary interaction

is small. To describe such a regime, we scale the parameters γ,σ2in (6) as

γ→γ, σ2→σ2,(13)

where > 0 is an arbitrarily small scaling coeﬃcient. Parallelly, in order to study the large time

behaviour of the system, we introduce the new time scale τ:= t and we scale the distribution

function as g(τ, w) := f(τ

, w). In this way, it is clear that, at every ﬁxed τ > 0 and in the limit

→0+,gdescribes the large time trend of f. Since ∂τg=1

∂tf, substituting in (11) and using

the symmetry of the interactions (6) with P≡1 we see that the equation satisﬁed by gis

d

dτ Z1

−1

ϕ(w)g(τ, w)dw =1

Z1

−1Z1

−1hϕ(w0)−ϕ(w)ig(τ, w)g(τ, w∗)dw dw∗.(14)

Now, because of the scaling (13), if ϕis suﬃciently smooth then the diﬀerence hϕ(w0)−ϕ(w)i

is small and can be expanded about wto give:

hϕ(w)−ϕ(w0)i=ϕ0(w)hw0−wi+1

2ϕ00(w)h(w0−w)2i+1

6ϕ000( ¯w)h(w0−w)3i,

where min{w, w0}<¯w < max{w, w0}. Plugging into (14) this produces

d

dτ Z1

−1

ϕ(w)g(τ, w)dw =γZ1

−1

ϕ0(w)(m−w)g(τ, w)dw

+σ2

2Z1

−1

ϕ00(w)D2(w)g(τ, w)dw +Rϕ(g, g),

9

-1 -0.5 0 0.5 1

0

0.5

1

1.5

2

Figure 4: Asymptotic opinion distribution (16) with mean m= 0.25 and four diﬀerent values of

the parameter λ.

where we have denoted by m∈[−1,1] the constant mean opinion and where Rϕ(g, g) is a reminder

such that |Rϕ(g, g)|=O(√) under the assumption that ηhas ﬁnite third order moment, i.e.

h|η|3i<+∞, cf. [47] for details. Hence for →0+it results Rϕ(g, g)→0 and we get

d

dτ Z1

−1

ϕ(w)g(τ, w)dw =γZ1

−1

ϕ0(w)(m−w)g(τ, w)dw +σ2

2Z1

−1

ϕ00(w)D2(w)g(τ, w)dw.

Integrating back by parts the terms on the right-hand side and assuming ϕ(±1) = ϕ0(±1) = 0,

due to the arbitrariness of ϕthis can be recognised as a weak form of the Fokker-Planck equation

∂τg=σ2

2∂2

wD2(w)g+γ∂w((w−m)g).(15)

Fixing1D(w) = √1−w2, the unique asymptotic (τ→+∞) solution with unitary mass, say

g∞(w), to (15) reads

g∞(w) = (1 + w)1+m

λ−1(1 −w)1−m

λ−1

22

λ−1B1+m

λ,1−m

λ, λ := σ2

γ,(16)

where B(·,·) denotes the Beta function. Notice that such a g∞is a Beta probability density

function on the interval [−1,1]. Using the known formulas for the moments of Beta random

variables, we easily check that its mean is indeed mand we compute its energy as

M2,∞:= Z1

−1

w2g∞(w)dw =2m2+λ

2 + λ.(17)

In Figure 4we illustrate some typical trends of the distribution function (16) with positive

mean, m= 0.25 in this example. We observe that, depending on the value of λ, such a distribution

may depict a transition from a strong consensus around the mean (λ= 0.1) to a milder consensus

(λ= 0.4) and further to a radicalisation in the extreme opinion w= 1 (λ= 1) up to the appearance

of a double radicalisation in the two opposite extreme opinions w=±1 (λ= 2).

3.2.2 Non-symmetric P

A natural prototype of a non-symmetric function Pis a linear perturbation of a constant P

depending on only one of the two variables w,w∗. More speciﬁcally, we consider

P(w, w∗) = P(w∗) = pw∗+q, (18)

1In view of the scaling (13), as →0+the function (10) converges uniformly to √1−w2, which can therefore

be chosen as diﬀusion coeﬃcient in the Fokker-Planck equation (15)after performing the quasi-invariant limit.

10

where p, q ∈Rhave to be chosen in such a way that pw∗+q∈[0,1] for all w∗∈[−1,1]. This is

obtained if

0≤q≤1,|p| ≤ min{q, 1−q}.

With respect to model (6), such a function Pdescribes a situation in which agents with opinion

w∗>0 are more persuasive than agents with opinion w∗<0 if p > 0 and vice versa if p < 0.

Using (18) in (12) we obtain that the evolution of the mean opinion M1=M1(t) is ruled by

dM1

dt =pγ

2Z1

−1Z1

−1

(w∗−w)2f(t, w)f(t, w∗)dw dw∗,

whence we see that the sign of the time derivative dM1

dt coincides with that of p. Thus, if p > 0

the mean opinion is non-decreasing, while if p < 0 the mean opinion is non-increasing. Continuing

the previous calculation, we further ﬁnd:

dM1

dt =pγ

2M2−M2

1,

which indicates that at the steady state (t→+∞) it results invariably M2,∞=M2

1,∞. This

implies that the asymptotic distribution has zero variance, thus that it is necessarily a Dirac delta

centred in the asymptotic mean opinion, i.e. f∞(w) = δ(w−M1,∞). Plugging this into (11) we

discover

hϕ(M1,∞+D(M1,∞)η)i − ϕ(M1,∞)=0,

which has to hold for every test function ϕ. As a consequence, we deduce D(M1,∞) = 0, whence

M1,∞=±1 if the only zeroes of the diﬀusion coeﬃcient are w=±1 like in the examples considered

in Section 3.1.

In conclusion, with the non-symmetric function Pgiven by (18) we fully characterise the

asymptotic distribution function as:

•f∞(w) = δ(w+ 1) if p < 0, the mean opinion decreasing from its initial value to M1,∞=−1;

•f∞(w) = δ(w−1) if p > 0, the mean opinion increasing from its initial value to M1,∞= 1.

The considerations above can be generalised to the following function P:

P(w, w∗) = rw +pw∗+q, (19)

where p6=r, so that Pis non-symmetric, and where the coeﬃcients p, q, r ∈Rhave to be chosen

in such a way that rw +pw∗+q∈[0,1] for all (w, w∗)∈[−1,1]2. Repeating the previous

calculations, we conclude that:

•f∞(w) = δ(w+ 1) if p−r < 0; in this case, the mean opinion decreases from its initial value

to M1,∞=−1;

•f∞(w) = δ(w−1) if p−r > 0; in this case, the mean opinion increases from its initial value

to M1,∞= 1.

From the modelling point of view, we may interpret the diﬀerence p−ras a balance between

the persuasion ability of the agents, expressed by p, and their tendency to be persuaded, expressed

by r. Notice indeed that for p= 0 and r6= 0 we obtain the mirror case of (18), in which agents

with opinion w > 0 are more inclined to change their opinion than agents with opinion w < 0 if

r > 0 and vice versa if r < 0.

The discussion above clearly shows that an arbitrarily small perturbation of a constant P, by

destroying the conservation of the mean opinion, may drag the system towards asymptotic conﬁg-

urations much less variegated than (16) independently of the parameters γ,σ2of the interactions.

11

4 Macroscopic description of preference formation

According to model (2)-(3), the opinions of the agents evolve through mutual interactions inde-

pendent of the preferences; on the other hand, the preference of each agent is transported in time

by his/her opinion. This suggests that a proper way to account for the interplay between opinion

and preference in an aggregate manner is by means of an inhomogeneous Boltzmann-type kinetic

equation, whose transport term describes the evolution of the preference and whose “collisional”

term accounts simultaneously for the changes in the opinions.

4.1 Inhomogeneous Boltzmann-type description and hydrodynamics

A Boltzmann-type description of the opinion dynamics in the form of binary interactions (6)

coupled to the transport of the preference (2) is obtained by introducing the kinetic distribution

function

f=f(t, ξ, w) : R+×[−1,1] ×[−1,1] →R+,

such that f(t, ξ, w)dξ dw is the proportion of agents that at time thave a preference in [ξ, ξ +dξ]

and an opinion in [w, w +dw]. The distribution function fsatisﬁes the following weak Boltzmann-

type equation:

∂tZ1

−1

ϕ(w)f(t, ξ, w)dw +∂ξΦ(ξ)Z1

−1

(w−α)ϕ(w)f(t, ξ, w)dw

=1

2Z1

−1Z1

−1hϕ(w0) + ϕ(w0

∗)−ϕ(w)−ϕ(w∗)if(t, ξ, w)f(t, ξ, w∗)dw dw∗,(20)

where the transport term (second term on the left-hand side) has been written taking into account

that, according to (2), the transport velocity of the preference ξis (w−α)Φ(ξ) and where w0,w0

∗

on the right-hand side are given by (6).

From the distribution function f, by integration with respect to the opinion w, we can compute

macroscopic quantities in the space of the preferences, such as the density of the agents with

preference ξat time t:

ρ(t, ξ) := Z1

−1

f(t, ξ, w)dw

and the mean opinion of the agents with preference ξat time t:

m(t, ξ) := 1

ρ(t, ξ)Z1

−1

wf (t, ξ, w)dw.

The interest in (20) is that it allows one to obtain evolution equations directly for the quantities

ρ,m, provided one is able to characterise the large time statistical trends of the opinions, like in

Section 3. The underlying key idea is to consider a so-called hydrodynamic regime, in which the

opinions reach a local equilibrium much more quickly than the preferences, pretty much in the

spirit of the microscopic investigations performed in Section 2.

Let 0 < δ 1 be a small parameter, which we use to deﬁne a macroscopic time scale τ:= δt,

i.e. the time scale of the evolution of the preferences, which then turns out to be much larger, viz.

slower, than the characteristic one of the binary interactions among the agents. If we want that,

on this new scale, the preference dynamics remain the same, from (2) we see that we need to scale

simultaneously the transport speed of the preference by letting Φ(ξ)→δΦ(ξ).

Let g(τ, ξ, w) := f(τ

δ, ξ, w), whence ∂τg=1

δ∂tf. Plugging into (20) we ﬁnd that gsatisﬁes

the equation

∂τZ1

−1

ϕ(w)g(τ, ξ, w)dw +∂ξΦ(ξ)Z1

−1

(w−α)ϕ(w)g(τ, ξ, w)dw

12

=1

2δZ1

−1Z1

−1hϕ(w0) + ϕ(w0

∗)−ϕ(w)−ϕ(w∗)ig(τ, ξ, w)g(τ, ξ, w∗)dw dw∗.(21)

Basically, the aforesaid scaling produces the coeﬃcient 1/δ in front of the interaction term,

hence δis analogous to the Knudsen number in classical ﬂuid dynamics. Since we are assuming

that δis small, a hydrodynamic regime is justiﬁed and, in particular, it can be described by a

splitting of (21), cf. [26], totally analogous to the one often adopted in the numerical solution of

the inhomogeneous Boltzmann equation, see e.g. [22,23,39]. One ﬁrst solves the fast interactions:

∂τZ1

−1

ϕ(w)g(τ, ξ, w)dw

=1

2δZ1

−1Z1

−1hϕ(w0) + ϕ(w0

∗)−ϕ(w)−ϕ(w∗)ig(τ, ξ, w)g(τ, ξ, w∗)dw dw∗,(22)

which, owing to the high frequency 1/δ, reach quickly an equilibrium described by a local (in ξand

τ) asymptotic distribution function playing morally the role of a local Maxwellian. Notice indeed

that (22) is actually an equation on the time scale of the microscopic interactions, because τcan

be scaled back to tusing the factor 1/δ. Next, one transports such a local equilibrium distribution

according to the remaining terms of (21) on the slower hydrodynamic scale:

∂τZ1

−1

ϕ(w)g(τ, ξ, w)dw +∂ξΦ(ξ)Z1

−1

(w−α)ϕ(w)g(τ, ξ, w)dw= 0.(23)

Due to (22), and taking the deﬁnition of ρinto account, the local “Maxwellian” can be given the

form g(τ, ξ, w) = ρ(τ, ξ)g∞(w), where g∞is one of the asymptotic opinion distribution functions

found in Section 3. This is the distribution transported by (23), hence we ﬁnally obtain

∂τρZ1

−1

ϕ(w)g∞(w)dw+∂ξΦ(ξ)ρZ1

−1

(w−α)ϕ(w)g∞(w)dw= 0 (24)

and we can use the knowledge of g∞to compute explicitly the remaining integral terms.

4.2 First order hydrodynamic models

Let us consider at ﬁrst the case of the non-symmetric functions P(18), (19) discussed in Sec-

tion 3.2.2. The asymptotic opinion distribution is either g∞(w) = δ(w+ 1) or g∞(w) = δ(w−1),

depending on the asymmetry of P. Plugging into (24) along with the choice ϕ(w) = 1 we ﬁnd

therefore either

∂τρ−(1 + α)∂ξ(Φ(ξ)ρ) = 0 (25)

or

∂τρ+ (1 −α)∂ξ(Φ(ξ)ρ)=0.(26)

In both cases, we get a self-consistent equation for the sole density ρand we speak thus of ﬁrst

order hydrodynamic model.

Unlike typical conservation laws, in (25) and (26) the ﬂux does not only depend on the variable

ξthrough the conserved quantity ρbut also explicitly through the function Φ. An analogous

characteristic is found, for instance, in conservation-law-based macroscopic models of vehicular

traﬃc featuring diﬀerent ﬂux functions in diﬀerent roads, see [31].

We observe that both (25) and (26) admit the family of stationary distributional solutions

ρ∞(ξ) =

M

X

k=1

ρkδ(ξ−ξk), ρk≥0,(27)

where the ξk’s are the zeroes of the function Φ. This indicates that models (25) and (26) reproduce

the asymptotic polarisation of the agents in the preference poles individuated by the points where

13

Φ vanishes. The coeﬃcients ρkrepresent the masses concentrating in each pole. Furthermore, (25)

describes invariably a leftward transport of ρin the space of the preferences, because −(1 + α)<0

for all α∈(−1,1] (if α=−1 the density is simply not transported). Conversely, (26) describes

invariably a rightward transport of ρ, since 1 −α > 0 for all α∈[−1,1) (now the density is not

transported if α= 1).

4.3 Second order hydrodynamic model

We now consider the symmetric case P≡1 discussed in Section 3.2.1, which produces the asymp-

totic opinion distribution g∞given by (16). Notice that this distribution is parametrised by the

(local) mean opinion m=m(τ, ξ), because the latter is conserved by the opinion dynamics. This

implies that, if we plug such a g∞into (24) together with the choice ϕ(w) = 1, we do not get a

self-consistent equation for the density ρ. In fact, we ﬁnd:

∂τρ+∂ξ(Φ(ξ)ρ(m−α)) = 0,

with both hydrodynamic parameters ρ,munknown. In order to close the macroscopic equations,

we need a further equation relating ρand m, which we can obtain from (24) with ϕ(w) = wand

recalling also (17):

∂τ(ρm) + ∂ξΦ(ξ)ρ2m2+λ

2 + λ−αm= 0.

On the whole, we get the second order (i.e., composed of a self-consistent pair of equations)

hydrodynamic model

∂τρ+∂ξ(Φ(ξ)ρ(m−α)) = 0

∂τ(ρm) + ∂ξΦ(ξ)ρ2m2+λ

2 + λ−αm= 0,

(28)

where the parameter λ=σ2/γ, which here enters the game through the energy of the stationary

opinion distribution (16), is reminiscent of the self-thinking (diﬀusion) of the agents.

Also in this case, (27) is a family of admissible stationary distributional solutions. Hence

model (28) can in turn reproduce the asymptotic polarisation of the preferences already observed

in the microscopic model.

It is useful to ascertain under which conditions system (28) is hyperbolic in the natural state

space {(ρ, m)∈R+×[−1,1]}. To this purpose, we rewrite it in the quasilinear matrix form

∂τU+ Φ(ξ)A(U)∂ξU+ Φ0(ξ)F(U)=0,

where U:= (ρ, m)T,A(U) is the matrix

A(U) := m−α ρ

λ(1−m2)

ρ(2+λ)

(2−λ)m

2+λ−α!(29)

and F(U) denotes lower order terms, which is not important to write explicitly. Since Φ is real-

valued, system (28) is hyperbolic if both eigenvalues of A(U) are real. To check this, we compute

the discriminant ∆(U) of the characteristic polynomial of A(U):

∆(U) := tr2A(U)−4 det A(U) = 4λ

λ+ 2 1−2m2

λ+ 2.

Since m∈[−1,1], thus m2∈[0,1], and λ≥0, we easily see that ∆(U) is always non-negative.

Therefore, we conclude:

Proposition 4.1. System (28)is hyperbolic in the whole state space {(ρ, m)∈R+×[−1,1]}for

every choice of the parameters α∈[−1,1],λ≥0and for every function Φ:[−1,1] →[0,1].

14

4.4 General ﬁrst and second order hydrodynamic models

If the asymptotic opinion distribution g∞is not known analytically, like e.g. in the signiﬁcant

case (4), the hydrodynamic models can still be written from (24), although only in a semi-analytical

form.

Assume that the microscopic dynamics (6) do not conserve the mean opinion. Then the sole

conserved quantity is the mass of the agents and from (24) with ϕ(w) = 1 we obtain the ﬁrst order

model

∂τρ+ (M1,∞−α)∂ξ(Φ(ξ)ρ)=0

in the unknown ρ=ρ(τ, ξ), where M1,∞:= R1

−1wg∞(w)dw is the asymptotic mean opinion. The

latter may be computed e.g. from (12), by means of an appropriate numerical approach.

Conversely, if the microscopic dynamics (6) conserve the mean opinion then g∞is parametrised

by mand from (24) with ϕ(w)=1, w we obtain the second order model

∂τρ+∂ξ(Φ(ξ)ρ(m−α)) = 0

∂τ(ρm) + ∂ξ(Φ(ξ)ρ(M2,∞(m)−αm)) = 0

(30)

in the unknowns ρ=ρ(τ, ξ), m=m(τ, ξ). Here, M2,∞(m) := R1

−1w2g∞(w)dw is the energy of

the asymptotic opinion distribution, expressed as a function of the conserved quantity m.

The precise calculation of M2,∞requires, in general, an accurate numerical reconstruction of

g∞. The latter is a stationary solution to the Fokker-Planck equation

∂τg=σ2

2∂2

wD2(w)g+γ∂w(B[g]g) (31)

with

B[g](τ, w) := Z1

−1

P(w, w∗)(w−w∗)g(τ, w∗)dw∗,(32)

which is obtained in the quasi-invariant regime starting from the binary interactions (6) with

a symmetric but not necessarily constant compromise function P. In particular, the following

implicit representation of g∞can be given:

g∞(w) = C

D2(w)exp −2

λZB[g∞](w)

D2(w)dw,(33)

where C > 0 is a normalisation constant and the integral on the right-hand side denotes any

antiderivative of the function w7→ B[g∞](w)/D2(w). For instance, if Pis the function (19) with

r=p, 0≤q≤1,|p| ≤ 1

2min{q, 1−q},

so that Pis symmetric and P(w, w∗)∈[0,1] for all (w, w∗)∈[−1,1]2, then from (33) we ﬁnd

the semi-explicit expression

g∞(w) = Ce 2p

λw(1 + w)

q(1+m)−p(1−M2,∞)

λ−1(1 −w)

q(1−m)+p(1−M2,∞)

λ−1,

which brings the calculation of M2,∞back to the numerical solution of the non-linear system of

equations

R1

−1g∞(w)dw = 1

R1

−1w2g∞(w)dw =M2,∞

parametrised by m.

In general, however, we observe that the type of dependence of M2,∞on mvalid for P≡1,

cf. (17), is somewhat paradigmatic. In fact, let us consider (14) in the quasi-invariant limit →0+

15

for binary interactions (6) with a symmetric P. Fixing D(w) = √1−w2, we obtain the following

equation for M2:

dM2

dτ = 2γZ1

−1Z1

−1

w(w∗−w)P(w, w∗)g(τ, w)g(τ, w∗)dw dw∗+σ2(1 −M2).

Set a:= infw,w∗∈[−1,1] P(w, w∗), 0 ≤a≤1. Then

−(2 + λ)M2+ 2am2+λ≤1

γ·dM2

dτ ≤ −(2a+λ)M2+ 2m2+λ,

which produces asymptotically

2am2+λ

2 + λ≤M2,∞≤2m2+λ

2a+λ.

This suggests that a perhaps rough but possibly useful approximation of M2,∞, to be used in (30),

is the average of these lower and upper bounds, i.e.:

M2,∞≈a

λ+ 2 +1

2a+λm2+λ(1 + a+λ)

(λ+ 2)(2a+λ),

which for a= 0, like e.g. in case (4), yields M2,∞≈m2

λ+λ+1

λ+2 .

5 Numerical tests

In this section we exemplify, by means of several numerical tests, the main features of the formation

of preferences at the kinetic and hydrodynamic scales as described by the models presented in the

previous sections.

The numerical approach is essential, in particular, to investigate the cases in which the com-

promise function Pdoes not allow for an explicit computation of the asymptotic opinion distri-

bution g∞. Therefore, ﬁrst we will brieﬂy review Structure Preserving (SP) numerical methods,

which are able to capture the large time solution to possibly non-local Fokker-Planck equations

with non-constant diﬀusion, such as those introduced in Sections 3.2.1 and 4.4, see [42,43]. Next,

we will compare the large time distributions so computed with those obtained from the numer-

ical solution of the original Boltzmann-type equation (14) in the quasi-invariant limit (1) by

means of classical Monte Carlo (MC) methods for kinetic equations [23,40]. After validating in

this way the accuracy of the numerical solver for the sole opinion dynamics (homogeneous kinetic

model), we will investigate the inhomogeneous kinetic model (20) as well as the hydrodynamic

models derived therefrom.

5.1 MC and SP methods for the homogeneous kinetic equation (14)

We begin we rewriting the Boltzmann-type equation (14) in strong form:

∂τg=1

Q+(g, g)−g,(34)

where Q+is the gain part of the kinetic collision operator:

Q+(g, g)(τ , w) := Z1

−1

1

0Jg(τ, 0w)g(τ, 0w∗)dw∗.

Here, (0w, 0w∗) are the pre-interaction opinions generating the post-interaction opinions (w, w∗)

according to the binary interaction rule (6) and 0Jis the Jacobian of the transformation from the

former to the latter.

16

To compute the solution of (34), we adopt a direct MC scheme based on the Nanbu algorithm

for Maxwellian molecules [40]. We introduce a uniform time grid τn:= n∆τwith ﬁxed step

∆τ > 0 and we denote gn(w) := g(τn, w). A forward discretisation of (34) on such a mesh reads

then

gn+1 =1−∆τ

gn+∆τ

Q+(gn, gn).(35)

From (34), owing to mass conservation, we see that R1

−1Q+(g, g)(τ , w)dw = 1 for all τ > 0 if

R1

−1g(0, w)dw = 1, therefore Q+(g, g)(τ, ·) can be regarded as a probability density function at

all times. From (35), under the restriction ∆τ≤, we obtain therefore that gn+1 is a convex

combination of two probability density functions and is therefore in turn a probability density

function. The probabilistic interpretation of (35) is clear: with probability ∆τ

any two particles

interact during the time step ∆τ; with complementary probability 1 −∆τ

they do not. This is

the basis on which to ground an MC-type numerical method for the approximate solution of (34).

However, it is in general numerically demanding to obtain from (35) an accurate reconstruction

of the asymptotic distribution g∞. To obviate this diﬃculty, one can take advantage of the fact

that, for suﬃciently small, the large time trend of (34) is well approximated by the Fokker-

Planck equation (31). In [43], an SP numerical scheme has been speciﬁcally designed to capture

the large time behaviour of the solution to (31) with arbitrary accuracy and no restriction on the

w-mesh size. Moreover, in the transient regime that scheme is second order accurate, preserves the

non-negativity of the solution and is entropic for speciﬁc problems with gradient ﬂow structure.

See also [24,33,42] for further applications.

To derive SP schemes for the Fokker-Planck equation (31), we rewrite the latter in ﬂux form:

∂τg=F[g],(36)

where the ﬂux is

F[g](τ, w) := C[g](τ, w)g(τ, w) + σ2

2D2(w)∂wg(τ, w)

and

C[g](τ, w) := γZ1

−1

P(w, w∗)(w−w∗)g(τ, w∗)dw∗+σ2

2(D2)0(w).

Next, we introduce a uniform grid {wi}N

i=1 ⊂[−1,1] such that wi+1 −wi= ∆w > 0, we denote by

gi(τ) an approximation of the grid value g(τ, wi) and we consider the conservative discretisation

of (36)

dgi

dτ =Fi+1/2− Fi−1/2

∆w,(37)

where Fi±1/2is an approximation of Fat wi±1/2:= wi±∆w

2. In particular, we choose a numerical

ﬂux of the form

Fi+1/2:= ˜

Ci+1/2˜gi+1/2+σ2

2D2

i+1/2

gi+1 −gi

∆w,

with ˜gi+1/2deﬁned as a convex combination of gi,gi+1:

˜gi+1/2:= 1−δi+1/2gi+1 +δi+1/2gi.

The coeﬃcient δi+1/2∈[0,1] has to be properly chosen. Setting in particular

˜

Ci+1/2:= σ2D2

i+1/2

∆wγ

σ2Zwi+1

wi

B[g](τ, w)

D2(w)dw + log Di+1

Di,(38)

where B[g] is given by (32), we obtain explicitly

δi+1/2:= 1

λi+1/2

+1

1−exp(λi+1/2)with λi+1/2:= 2∆w˜

Ci+1/2

σ2D2

i+1/2

.

17

The order of this scheme for large times coincides with that of the quadrature formula employed

for computing the integral contained in (38). In particular, if a standard Gaussian quadrature

rule is used then spectral accuracy is achieved in the wvariable. In the transient regime, instead,

the scheme is always second order accurate.

5.1.1 Comparison of the numerical solutions for large times

We now compare the large time numerical solution of the Boltzmann-type equation (34), obtained

by means of the MC scheme with the following speciﬁcations:

•105particles;

•quasi-invariant regime approximated by taking either = 10−1or = 10−2,

with the numerical solution of the Fokker-Planck equation (31), obtained by means of the SP

scheme with the following speciﬁcations:

•N= 81 grid points for the mesh {wi}N

i=1 ⊂[−1,1], yielding a mesh step ∆w= 2.5·10−2;

•fourth order Runge-Kutta method for the time integration of (37);

•Gaussian quadrature rule, with 10 quadrature points in each cell [wi, wi+1], for the approx-

imation of the integral in (38).

We use the symmetric bounded-conﬁdence-type compromise function Pgiven by (4) with several

choices of the conﬁdence threshold ∆ ∈[0,2]. At the initial time τ= 0, we prescribe the uniform

distribution in [−1,1], i.e.

g(0, w) = 1

2χ(w∈[−1,1]).

In Figure 5we ﬁx ∆ = 1 (left panels) and ∆ = 0.4 (right panels) and we take λ=σ2/γ =

5·10−3. We observe that, as expected, the smaller the more the MC solution coincides with

the SP solution of the Fokker-Planck equation for either value of the conﬁdence threshold ∆.

Furthermore, the asymptotic proﬁles compare qualitatively well with those obtained with the

deterministic microscopic model (3), cf. Figure 1(a, b), in terms of number and location of the

opinion clusters.

In Figure 6we repeat the same comparisons between the MC and SP numerical solutions

but with ∆ = 0.2. For λ= 10−4(left panels) we recover both a transient behaviour and an

asymptotic trend of the solution fully consistent with those already observed with the deterministic

microscopic model (3). In particular, four opinion clusters emerge in the long run. Interestingly, for

a slightly larger parameter λ= 10−3, indicating a higher relevance of the self-thinking (stochastic

ﬂuctuation) in the behaviour of the individuals, two opinion clusters merge, thereby giving rise

to just three clusters in the long run. This aggregate phenomenon can only be observed if some

microscopic randomness is duly taken into account in the model.

5.2 Inhomogeneous kinetic equation (21)

We now pass to the inhomogeneous kinetic model, in which the formation of the preferences is

driven by an interplay with the opinion dynamics studied before.

We start by outlining the procedure by which we solve the inhomogeneous Boltzmann-type

equation (21). Since the Knudsen-like number δis assumed to be small, at each time step we adopt

the very same splitting procedure already discussed in Section 4.1. Therefore, upon introducing a

time discretisation τn:= n∆τ, with ∆τ > 0 constant, we proceed as follows.

Interaction step. At time τ=τn, we solve the interactions towards the equilibrium during half

a time step:

∂τG(τ, ξ, w) = 1

δQ(G, G)(τ, ξ, w), τ ∈(τn, τ n+1/2]

G(τn, ξ, w) = g(τn, ξ, w)

(39)

18

-1 -0.5 0 0.5 1

0

1

2

3

4

5

-1 -0.5 0 0.5 1

0

0.5

1

1.5

2

2.5

Figure 5: Top row: contours of the distribution function gcomputed numerically for τ∈(0, T ],

T= 50, from the Fokker-Planck equation (31) with the SP scheme. Bottom row: comparison

of the numerical approximations at τ=Tof the large time distribution g∞obtained with the

previous SP scheme and with the MC scheme for the Boltzmann-type equation (34) with two

decreasing values of the parameter simulating the quasi-invariant regime. In both rows, the

conﬁdence thresholds are ∆ = 1 (left) and ∆ = 0.4 (right).

for all ξ=ξibelonging to a suitable mesh {ξi}i⊂[−1,1]. In this step, we take advantage

of the MC scheme introduced in Section 5.1, which has proved to give asymptotic solutions

comparable to those of the more accurate SP scheme, provided the parameter δis suﬃciently

small. In particular, we use a sample of 106particles and we ﬁx δ= 10−2.

In (39), Qdenotes the collision operator that appears on the right-hand side of (21) once

this equation has been written in strong form.

Transport step. Next, we take the asymptotic distribution obtained in the interaction step as

the input of a pure transport towards the next time step τn+1:

∂τg(τ, ξ, w)+(w−α)∂ξ(Φ(ξ)g(τ, ξ, w)) = 0, τ ∈(τn+1/2, τ n+1 ]

g(τn+1/2, ξ, w) = G(τn+1/2, ξ, w).

In the tests of this section, unless otherwise speciﬁed, we prescribe the uniform distribution in

the variables ξ,was initial datum:

g(0, ξ, w) := 1

4χ((ξ, w)∈[−1,1]2) (40)

we ﬁx λ= 10−3and we take the function Φ given in (5).

19

-1 -0.5 0 0.5 1

0

2

4

6

8

10

-1 -0.5 0 0.5 1

0

1

2

3

4

Figure 6: The same as Figure 5but with ∆ = 0.2. In the left panels we use λ= 10−4, in the

right panels λ= 10−3. In the latter case, the asymptotic distribution features only three opinion

clusters, well reproduced by both the SP Fokker-Planck solution and the MC Boltzmann solution

(especially with = 10−2), because the two central clusters merge during the transient due to

a higher relevance of the self-thinking (diﬀusion) with respect to the tendency to compromise

(transport).

(a) τ= 1 (b) τ= 3 (c) τ= 5

Figure 7: Contours of the inhomogeneous kinetic distribution g(τ, ξ, w) at diﬀerent times with

∆ = 1 and α=−0.3.

5.2.1 Symmetric P

First, we consider symmetric interactions described again by the bounded conﬁdence compromise

function (4) with ∆ = 1. In Figures 7,8we show the evolution of the inhomogeneous kinetic model

20

(a) τ= 1 (b) τ= 3 (c) τ= 5

Figure 8: The same as Figure 7but with α= 0.3.

(a) τ= 1 (b) τ= 3 (c) τ= 5

Figure 9: The same as Figure 7but with ∆ = 0.4 and α= 0.3.

-1 -0.5 0 0.5 1

0

2

4

6

(a) w-marginal at T= 10

-1 -0.5 0 0.5 1

0

2

4

6

8

(b) ξ-marginal at T= 10

Figure 10: Marginal distributions of the opinions (a) and of the preferences (b) for the numerical

test of Figure 9.

for two diﬀerent choices of the perceived social opinion, α=±0.3 respectively. We clearly observe

that while the opinions distribute around the conserved mean opinion m= 0, as expected, the

preferences polarise in two possible ways. For α=−0.3, cf. Figure 7, polarisations emerge in ξ= 0

and ξ= 1. Speciﬁcally, individuals with an initial preference in [−1,0] tend to polarise in ξ= 0,

whereas individuals with an initial preference in (0,1] tend to polarize in ξ= 1. For α= 0.3, cf.

Figure 8, the mirror trends emerge. These polarisation patterns of the preferences are very much

consistent with those observed in Section 2with the deterministic microscopic model (2)-(3), cf.

Figure 2.

Next, we consider the same symmetric compromise function Pas before but now we ﬁx ∆ = 0.4.

21

In Figure 9we depict the evolution of the inhomogeneous kinetic model for α= 0.3. As far as

the opinion dynamics are concerned, we recognise that individuals tend to cluster in two well

distinct positions, see Figure 10(a), directly comparable with the emerging clusters shown in

Figure 5(right) and also, up to diﬀusion, in Figure 1(b). Nevertheless, the social detail is now

higher, because we clearly distinguish that individuals with the same asymptotic opinion may

actually polarise in diﬀerent preferences. More speciﬁcally, the opinion cluster near w=−0.5 is

formed by individuals with preferences polarised in either ξ=−1 or ξ= 0, while the opinion

cluster near w= 0.5 is formed by individuals with preference polarised in either ξ= 0 or ξ= 1,

see Figure 9(c). Remarkably, three polarisations of the preference emerge on the whole in the long

run, see Figure 10(b), because the opinions do not reach a global consensus.

Also these polarisation patterns of the preferences are consistent with those discussed in Sec-

tion 2, indeed the deterministic microscopic model can account in principle for three preference

poles. The fact that Figure 3(b) shows asymptotically only two of them depends essentially on

the choice of the initial conditions, which in a particle model hardly allow one to observe the

representative average trend in a single realisation.

The case α=−0.3 is qualitatively analogous to the one just discussed, therefore we do not

report it in detail.

5.2.2 Non-symmetric P

Finally, we investigate the eﬀect of a non-symmetric compromise function P. As already discussed

in Section 3.2.2, we recall that the asymmetry of Pcan be understood as a systematic bias of

the individuals, who for some reason are more prone to change opinion in a speciﬁc direction.

In this numerical example, we remain in the class of the bounded conﬁdence models and, taking

inspiration from [32], we consider

P(w, w∗) = χ(−∆L≤w∗−w≤∆R),(41)

where ∆L,∆R∈[0,2] are two conﬁdence thresholds.

In order to understand the eﬀect of function (41), we observe that if w≤w∗then interactions

are allowed provided |w∗−w|=w∗−w≤∆R. Otherwise, if w≥w∗then interactions are allowed

provided |w∗−w|=w−w∗≤∆L. Thus, if e.g. ∆R>∆Lthen an individual with opinion wis

more incline to interact with other individuals with opinion w∗≥w. The converse holds if instead

∆R<∆L.

Remark 5.1.If ∆L= ∆Rthen (41) actually reduces to (4) with ∆ = ∆R.

We choose ∆L= 0.3 and ∆R= 0.7, meaning that individuals compromise preferentially with

other individuals with an opinion located on the right of their own. Moreover, we consider the

perceived social opinion α= 0.3. In Figure 11 we show the evolution of the inhomogeneous kinetic

model starting from the uniform distribution (40).

We observe that initially the mean opinion is neutral at any preference, indeed

Z1

−1

wg(0, ξ, w)dw = 0,∀ξ∈[−1,1].

Nevertheless, due to the non-symmetric interactions, the mean opinion is not conserved in time,

cf. Figure 11(d). In particular, owing to the bias induced by ∆R>∆L, the opinions tend to

shift on the whole rightwards, cf. Figure 11(e), while the preferences polarise in the three poles

ξ=−1,0,1, cf. Figure 11(f). Again, we notice that the joint picture preference-opinion is a

lot more informative than the sole opinion dynamics, because it allows us to observe e.g. that

two clusters with nearly the same asymptotic opinion about w≈0.5 actually include individuals

expressing strongly diﬀerent preferences (ξ= 0,1), cf. Figures 11(b, c).

22

(a) τ= 1 (b) τ= 5 (c) τ= 10

0246810

-1

-0.5

0

0.5

1

(d) Mean opinion trend

-1 -0.5 0 0.5 1

0

2

4

6

8

10

(e) w-marginal at T= 10

-1 -0.5 0 0.5 1

0

2

4

6

8

(f) ξ-marginal at T= 10

Figure 11: Top row: Contours of the inhomogeneous kinetic distribution g(τ, ξ, w) at diﬀerent

times with the non-symmetric compromise function (41) featuring ∆L= 0.3, ∆R= 0.7. Bottom

row: Time trend of the mean opinion (the symmetric case is plotted for duly comparison) and

marginal distributions of opinions and preferences at time T= 10.

5.3 Hydrodynamic model

Now we test the hydrodynamic model of preference formation derived in Section 4. In particular,

since the dynamics predicted by the ﬁrst order models of Section 4.2 are quite well understood

analytically, we focus on the second order model presented in Section 4.3, cf. (28).

To discretise the system of conservation laws (28), we introduce a uniform