1 Introduction

Ubiratan D’Ambrósio (1998), in a characteristically provocative statement, wrote that the “Mathematics we teach in school is obsolete, boring and useless” (p. 28, informal translation by the authors). This statement has often been referred to in relation to the need for continuing to change how, why, and what for, mathematics is taught—and sometimes learned. He did not even need to mention examples present in mathematics syllabi at practically all levels, nor to mention our didactic practices in which so many teachers prefer paper and pencil (and, consequently, twelfth century technology) to modern software and databases (technologies of the present century), and also choose memorization instead of the ability to find information on-line and to think. According to Clements (2013) and others, the resource of technology plays a fundamental part in learning processes, in fact, as Williams and Goos (2013) stated, “This notion situates ‘technology’—and mathematics, also—as an essential part or ‘moment’ of the whole activity, alongside other mediational means; thus it can only be fully understood in relation to all the other moments” (p. 549). Now these movements involve the whole procedure of the study, comprehension, and expression of real-life problems, besides the mathematical efforts that follow, as well as evaluation and criticism.

Sometimes mathematical concepts and operations can be introduced playfully with games during which certain mechanical calculation results are remembered, but the ongoing challenge is to enable students to become full conscious citizens—and, for this, the mathematics to which Ubiratan D'Ambrósio referred is unfortunately quite irrelevant. An implicit corollary is that, as in much of the effective work with mathematics in the past centuries, mathematical development has also been based upon the need to change the world and its realities, besides its theoretical challenges. The authors believe that an immediate change of attitude in mathematics teaching is needed, in order to accomplish a reversal of Ubiratan D'Ambrósio's phrase.

All this is unfortunately true, not only in teaching and learning mathematics but in so many other areas as well. D'Ambrósio's words reflect a universe that is slowly (too slowly, for the authors) being relegated to the past in worldwide teaching experiences, but much of it still thrives in many schools. And it must be said that this is sadly true at all levels and in practical as well as theoretical teaching and learning situations.

In implicit agreement with Ubiratan D'Ambrósio, Freire (1967) stated that the first step in an educational process is (in his terms) “to 'read' the world”. But this is not so easily done, even if it is simple to say. There are many ethical requirements, many historical and cultural contexts and a quasi-infinite list of interpretations of facts that are discussed in a school environment, as in society.

Paulo Freire (1967) went on to mention that the second step is to construe knowledge with dialogue, collectively, with frequent back-tracking, modifications, and the acceptance of an enormous range of all kinds of differences.

The third step is to criticize and evaluate the knowledge thus obtained. Again, for this, there must be a combination of ethnic, cultural, historical and social contexts and environments. And there is also the transdisciplinary dialogue that is necessary for a critical understanding of what has been learnt, but not only this: in addition it must be asked, for how long do these concepts that were understood remain relevant in a learner’s daily activities?

For some, these three steps complete the learning cycle, but Freire has another 4th step: that of putting the acquired knowledge to use in serving communities, regions, groups and even whole towns.

Choosing to work with the COVID-19 pandemic in this pedagogical context inverts Ubiratan D'Ambrósio's statement: solving a social or natural problem using several different scientific fields with the help of mathematical modelling tools brings out mathematics which is interesting, useful (and necessary) as well as up to date, both theoretically and technologically.

We do not claim that working in this way is easy—it most certainly is not! Modelling a social situation like the successive dynamics of COVID-19 with its several variants succeeding each other in affecting human beings (as well as animals), leaves those responsible for this study in learning environments with some difficult challenges: there are no ‘correct’ answers, only adequate approximations; different ideas and techniques, with the use of many different softwares, is undertaken with the certainty that to disagree is not only accepted, but stimulated, and welcomed. In general this attitude may not only go beyond existing syllabi, but it presents a pedagogical problem: many times there is only the problem in itself—and no mathematical questions are asked, as in many mathematics textbooks, as well as most textbooks in general. Questions must be provided by the modellers themselves so that, consequently, approximations of the desired solutions must inevitably include the collective and dialogical evaluation both from a mathematical point of view as well as from a social stance.

In fact, Stillman, Brown and Geiger (2015), provided this challenging reference: Finding or generating a problem from a real world messy situation is a crucial cognitive step (Getzels, 1979). Besides this “mathematics of 'messy' needs”, Wolff-Michael Roth (2007)—referring to mathematical modelling and mathematics education—calls our attention to the fact that “... emotions are central to decision-making, 'motivation', learning and identity” which he presents as inherent to the modelling of real-world situations and, consequently, one can “no longer theorize mathematical modelling independent of emotions and emotional valence” (Roth, 2007). (Leash et al., p. 95)

For the authors, in agreement with vast literature sources, this is especially true when, instead of proposed problems by the teacher whose main purpose is to teach a mathematical concept, it becomes necessary to face those problems that affect student, their communities or towns and countries, or, as is the case with the COVID-19 pandemic, the whole world.

In this paper, we present the results of a modelling effort to describe successive models, studied and modified in order to learn about the dynamics of this disease in diversified societies with their dramatically different histories, cultures, governments, beliefs and resources. This activity was undertaken with a heterogeneous group of mathematicians and mathematics students at several levels of their courses, ranging from undergraduate to post-doctoral participants, in the search for an understanding of the multifaceted problem of the spread of the pandemic in so many different societies with so many different results.

In Sect. 2, we very briefly mention the history of the kind of model that was (and still is) used for the description and simulation of the pandemic in a society, mathematically working out the details. It is necessary to mention that, in all this, technology plays a very important part. Historically, as described by Murray (2002), models had to be much simpler in order for it to be possible to use almost exclusively analytical tools. Nevertheless, this type of modelling effort was not only revolutionary, it also allowed professionals to understand some of the basic concepts, limitations, thresholds and possibilities, some of which are still valid.

In Sect. 3, we present some modifications of the original modelling efforts in order to include other situations, such as the asymptomatic transmission of the SARS-CoV-2 virus, adopted social distancing policies, as well as widespread vaccination campaigns. The results are evaluated critically and we hope that a challenge will emerge: new and improved models, using better software, must continue to be developed, so that decision-makers may have an auxiliary tool in mathematics, mathematical modelling and technological resources.

In Sect. 4, we present our conclusions, hoping that, in fact, these so-called ‘conclusions’ may serve as a starting point for other mathematicians.

2 Historical background

In 1927, 1932 and 1933, and building upon ideas of Ronald Ross and Hilda Hudson, A. G. McKendrick and W. O Kermack developed a theory that led to the use of compartmental models in the description and study of endemic and epidemic diseases. These models established an important trend in mathematical epidemiology. Their initial studies focused on cholera spread in the nineteenth century, which from the Ganges river delta, spread around the world. Besides studying the spread of the Spanish Flu, they also studied some aspects of several phenomena of the Bubonic plague, also called the Black Death, that entered Europe in the seventeenth century with almost unbelievable effects in terms of painful deaths throughout the entire continent (Kermack & McKendrick, 1927, 1932, 1933; Ross & Hudson, 1917).

Possible similarities in the dynamics and the geographical spread of infectious diseases led us to the modelling of the behaviour of this kind of disease using previous studies by Ross and Hudson (1917). The model they developed needed relatively more complex mathematical tools since it used the ages of susceptible individuals in identifying incidence of infection as well as removal and transmission rates. These mathematical tools evolved and became what is identified today as the model of Kermack and McKendrick (1927, 1932, 1933). This is much more than a model: it opens up a theory with which many diseases can be analysed, studied, understood and simulated (Edelstein-Keshet, 2005).

Whereas initial mathematical considerations focused only on the infected individual's etiology and evolution, Kermack and McKendrick's model considered society as a whole. The fundamental idea was that of dividing a population into separate compartments, acknowledging the fact that any individual must be in only one compartment at a time; and the movement from one of these compartments to another is used to describe, for example, the infection of a susceptible individual.

In the initial model, the considered population was divided into three compartments, namely, that of the Susceptible (identified as S), one for Infected individuals (denoted I) and the third compartment of Removed individuals (denoted by R). In some instances, this third compartment refers to those individuals who were removed to a cemetery and, in other situations and models, the R stands for permanently resistant (as in measles, for example) or temporarily resistant (as in cases of the common flu).

This can be illustrated with the following diagram (Fig. 1), which indicates that, in contact with Infected individuals, Susceptible ones also become Infected, and, after a certain time period, Infected individuals become removed, resistant or partially resistant.

Fig. 1
figure 1

Flow chart for the SIR model

The causes for the movement from one compartment to another are based on the transmission through individual contact and the time-periods during which individuals remain infected, or the time-period of a temporary resistance.

For university students, the Kermack and McKendrick model may be presented as a nonlinear system of differential equations, whereas at a high school level, a system of difference equations can be used, with which a discrete mathematical approach is not only completely adequate and feasible in terms of mathematics applications but also desirable in the concept of a trans-disciplinary educational practice.

3 Effective modelling

Schematically, Fig. 1 presents a visual model which indicates, albeit qualitatively, the spread of a disease in a certain population. It indicates that, as time passes, susceptible can become infected, infected become removed, which eventually become resistant, totally or partially. Using discrete difference equations, the dynamics of a disease in a society can be described identifying the movement individuals undertake when they stop belonging to one compartment and become individuals in another one. By using these difference equations, therefore, and assuming that a set of parameters can describe how this happens, we can describe the disease in a society using the system of equations given by the following:

$$\left\{\begin{array}{l}S\left(n+1\right)-S\left(n\right)= -{\beta }_{SI}.S\left(n\right).I\left(n\right),\\ I\left(n+1\right)-I\left(n\right)= {\beta }_{SI}.S\left(n\right).I\left(n\right)-{\gamma }_{IR}.I\left(n\right),\\ R\left(n+1\right)-R\left(n\right)={\gamma }_{IR}.I\left(n\right).\end{array}\right.$$
(1)

Here, βSI and γIR respectively represent how contagion moves a susceptible individual into the compartment of infected individuals in the context of 1/(time.person) whereas γIR is the inverse of the time during which an individual remains infected. After this time-period an infected individual becomes removed or permanently resistant. A similar system can model a disease where resistance is temporary, a disease to which individuals have resistance for a period of time:

$$\left\{\begin{array}{l}S\left(n+1\right)-S\left(n\right)= -{\beta }_{SI}.S\left(n\right).I\left(n\right) + {\delta }_{SR}.R(n),\\ I\left(n+1\right)-I\left(n\right)= {\beta }_{SI}.S\left(n\right).I\left(n\right)-{\gamma }_{IR}.I\left(n\right),\\ R\left(n+1\right)-R\left(n\right)={\gamma }_{IR}.I\left(n\right)- {\delta }_{SR}.R(n).\end{array}\right.$$
(2)

In this situation, δSR (when staying in compartment R is temporary) stands for the inverse of the time during which the temporary resistance remains. Some remarks are in order:

  1. 1.

    In both of these systems, the considered disease has a short duration, so the number of individuals in the entire population remains constant, say, N. Then,

    $$S\left(n\right)+I\left(n\right)+R\left(n\right)=N.$$
  2. 2.

    A disease is considered endemic when we have, for whatever moment n in time after an initial period, S(n + 1) = S(n) = S, I(n + 1) = I(n) = I and R(n + 1) = R(n) = R, where the constant numbers S, I and R respectively represent the number of susceptible, infected and resistant individuals in the studied society for any given time.

  3. 3.

    Due to the equation in the first remark, one has R(n) = N − S(n) − I(n), and the three-dimensional system can be reduced to a bi-dimensional one; in which casa the algebraic work becomes somewhat simpler.

Working with these systems can be quite easy using adequate spreadsheet software. Also, a phase diagram can be used to illustrate different situations by using the x-axis for successive values of S(n) and the y-axis for successive values of I(n), and with these graphs, to analyse how different behaviours—which means different values for the parameter βSI, representing mask use, for example, lockdowns or vaccination procedures—affect a disease dynamic. In general, the necessary initial conditions that are used take into account the beginning of a disease, with only one infected individual: S(0) = N − 1, I(0) = 1 and R(0) = 0.

In the first months of the COVID-19 pandemic, discrete equations (as in systems (1) and (2)) were very useful but, as time went by, this disease showed itself to last much longer. This led to a modification in the initial models and mathematicians resorted naturally to the use of ordinary differential equations in which, instead of successive discrete time steps, a continuous variable is used for time: the derivatives of S(t), I(t) and R(t) are used instead of the differences S(n + 1) − S(n), I(n + 1) − I(n) and R(n + 1)  − R(n).

The second model described above (for temporary resistance) becomes the following:

For S(t), I(t), R(t), given S(0), I(0), R(0), and for t varying in the interval [0,T],

$$\left\{\begin{array}{l}\frac{dS(t)}{dt}= -{\beta }_{SI}.S\left(t\right).I\left(t\right) + {\delta }_{SR}.R(t),\\ \frac{dI(t)}{dt}= {\beta }_{SI}.S\left(t\right).I\left(t\right)-{\gamma }_{IR}.I\left(t\right),\\ \frac{dR(t)}{dt}={\gamma }_{IR}.I\left(t\right)- {\delta }_{SR}.R\left(t\right).\end{array}\right.$$
(3)

Here, the first model is obtained simply making parameter δSR = 0.

In a mathematical sense, the first equation of system (3) describes the instantaneous change in the rate with which susceptible individuals become infected ones. The same with the second and third equations.

These equations describe the movement per time unit from S to I, from I to R and from R back to I given by the dynamics of the disease, as presented in Fig. 2.

Fig. 2
figure 2

Flow chart for the SIR model

The chart presented in Fig. 2 indicates that S, the number of susceptible individuals decreases as I, the number of infected individuals increases, and at the same rate, βSI. Analogously, the number of infected individuals decreases as the number of removed or resistant individuals increases, also by the same rate, δSR.

As mentioned above, it is necessary to note that no increase in the total population is considered in this model, used for an illness that has a relatively short duration, such as measles, and not as in the case of Chagas’ or Hansen’s diseases, which are generally long-lasting phenomena.

Considering (3) as the continuous form of (2) will permit us to analyse the equations that make up both systems and to obtain conclusions about the dynamics of the considered disease—and this can be done numerically and graphically, on the following two levels: systems (1) and (2) for a high-school environments and system (3) for university undergraduate students. But rather than trying to solve these non-linear systems (a very nice theoretical analysis and approximation can be found in Murray, 2002, 2003), the mathematical work developed in an adequate software environment and even in a spreadsheet will enable us to gather relevant information based on a modern, useful and interesting use of mathematics.

Considering both the continuous (3) and the discrete systems presented by (1) and (2), a question that arises is that of recognizing when the number of infected individuals begins to decrease in a society—possibly leading to the disappearance of the disease. In other words, when is it that I(n) or I(t) decrease, or I(n + 1) < I(n)? The same kind of question might be asked of S, the set of susceptible, or of R, the set of resistant or temporarily resistant individuals, who after a certain period of time, return to the compartment of Susceptible: when do the populations is each compartment increase or decrease? To answer this question, we can rewrite the right-hand side of the second equation of system (2), in order to have a better working posture, as follows:

$$I\left(n\right).\left[{\beta }_{SI}.S\left(n\right)-{\gamma }_{IR}\right].$$

We can then see that, since I(n) is a number of individuals and therefore greater than zero, which means that the population of infected individuals increases, then this product is positive whenever

$${\beta }_{SI}.S\left(n\right)-{\gamma }_{IR}>0, \quad or \, when$$
$$S\left(n\right)>\frac{{\gamma }_{IR}}{{\beta }_{SI}}.$$

On the other hand, the number of infected persons in a disease decreases, i.e. I(n + 1) < I(n), when we have \(S\left(n\right)<\frac{{\gamma }_{IR}}{{\beta }_{SI}}\) and this indicates that, mathematically, a disease begins to decrease only when (in a colloquial sense) you run out of susceptible individuals to whom the disease may be transmitted. The very same conclusion with the same inequation holds for the model that uses, continuously, system (3). Of course many other possibilities can and should be considered in analysing the dynamics of the studied disease. Nevertheless, in all its simplicity, this model is still used to identify a possible turning point in the spread of a disease.

But since this model is for short-term diseases, one can always recover the dynamics of the R compartment simply by using

$$R=N-\left(S+I\right),$$

whether the model is discrete or continuous, allowing one to use curves in a plane to describe the interaction of the two compartments S and I. Using this ‘phase diagram’, we can observe the evolution of the behaviour of both populations simultaneously whether for discrete or continuous models (Fig. 3).

Fig. 3
figure 3

The phase plane for the SIR model: simultaneous behaviour of susceptible and infected individuals (developed in Wolfram Mathematica®)

With the construction of phase planes like this one presented in Fig. 3, it can be remarked that, for whatever initial condition one begins with, the values of S and I tend to the same stationary point and, therefore, so does R. As we can see in this illustration, the model chosen for the simulation—with a temporary resistance—indicates the endemic situation, in which, after some time, the three compartments achieve a stationary point at which the population as a whole coexists with a permanent proportion of individuals in the susceptible, infected and temporarily resistant categories: the disease does not go away, rather, it is permanent in the population for as long as the parameters effectively describe the disease's behaviour.

Another possibility is to present in the same graph the number of individuals in each one of the three compartments as a function (susceptible, infected and temporarily removed, as in Fig. 4) of the considered time steps.

Fig. 4
figure 4

Evolutionary dynamic of the SIR model

With this graph, the observation made for Fig. 3 still holds, since S, I and R tend to a stationary situation in which the disease co-exists with the whole population at a constant level. In the graph presented in Fig. 4 we can verify that the three considered compartments do, in fact, reach an equilibrium which indicates an endemic situation. Now this model, simple as it may be, does indicate what happens if the value of βSI decreases, meaning that transmissibility is smaller as is the case, for example, if the use of masks, through some public sanitary policy, becomes mandatory, or at least, usual. Students can see this, when, using a simple programme, the results are obtained when for two different values of βSI, different equilibrium stages are assumed, either with a continuous system or with a discrete one.

This same model can be used—although not in COVID-19 situations—with a simpler mathematical expression, for the study of other diseases, such as measles, mumps, and chickenpox, for example. The model may (with no loss of its generality, as seen above) consider exclusively susceptible and infected individuals. This happens for many reasons, two of which (the main ones) are as follows: this type of model, which can be used to understand rapid epidemic surges that do not last for a long time in society—so that the increase of the latter need not be considered and, secondly, the case in which, since resistance is permanent, the return from the R compartment to the S one does not exist. Therefore, the model can be used with only two compartments, S and I. We will then have, for the discrete model, also called an SI model,

$$\left\{\begin{array}{l}S\left(n+1\right)-S\left(n\right)= -{\beta }_{SI}.S\left(n\right).I\left(n\right),\\ I\left(n+1\right)-I\left(n\right)= {\beta }_{SI}.S\left(n\right).I\left(n\right),\end{array}\right.$$
(4)

where n represents the time-step.

System (1) has now become a nonlinear one with only two equations, a form of system (4) which is easier to ‘see’ or with which it can be easier to ‘read’ the world. To use the model, students in high school (and those who wish to become mathematics teachers) can use what has been learnt for sequences (usually one-dimensional), to accompany the behaviour of a disease in society, thereby developing mathematical concepts before actually formalizing them. In fact, this process may be described as intuitively learning mathematics. On the other hand, for undergraduate students in teacher education, the introduction of this kind of system of discrete difference equations as well as differential ones presents mathematics not as an objective in itself, but rather as an important and useful tool with which to understand life, effectively showing with a present and urgent situation, the educational value of working out these models (i.e., systems of both difference and differential equations). For the authors, situations and mathematical approaches such as those described here permit students at many levels to understand that the boundaries between themes such as mathematics and epidemiology are not crisply defined, but rather fuzzy—as always happens in real life situations.

Besides this, what else can be accomplished with the presentation and use of models like these (and the equivalent programmes)? Well, an important aspect is that different situations, derived from this initial one, can be proposed. One challenge is presented in the next section.

3.1 The inclusion of vaccination

What can be accomplished with the presentation of this model? One challenge would be that of considering a vaccination programme that modifies the model presented in (2), with the inclusion of a new compartment, which includes the vaccinated population with a temporary immunity, as seems to be the case for all COVID-19 vaccines.

This model requires another compartment, besides that of Susceptible, Infected and Temporarily Resistant individuals—that of Vaccinated individuals. An illustrative chart for this new proposition, is presented in Fig. 5.

Fig. 5
figure 5

Flow chart for the SIRV model

This figure has the purpose of describing the modification of the previous models with the introduction of a new compartment, that of vaccinated individuals. This picture shows that besides the previous movements, there is also a movement from the compartment of susceptible individuals to that of vaccinated ones. And from the latter back to the former, due to the end of the validity of the immunization given by the vaccine. This chart indicates the passage from the compartment of susceptible individuals to infected ones, as well as the return from temporary resistance and, besides the return from temporary resistance R back to Susceptibles, also the passage from Susceptibles to Vaccinated and back.

Borba (2021) suggested that we use the COVID-19 pandemic as a mathematical tool, for example using the application of exponential functions to explain the spread of the coronavirus. However, we propose using the pandemic to obtain a function that describes the behaviour of vaccination. This illustrates the fact that, in real-life situations, we use what we can to study and understand phenomena. And, sometimes, we create mathematical tools in order to study and understand these facts in a better way.

In Brazil, the National Vaccination Campaign against COVID-19 started on January 18, 2021, and four vaccines are currently available in Brazil. Ever since the first vaccines appeared, they have had a different vaccination schedule and variations in effectiveness (Prüβ, 2021). The graph presented in Fig. 6 provides us with information about the overall immunization behaviour as a function of time for Brazil.

Fig. 6
figure 6

Number of people in Brazil during 2021 according to the number of vaccination doses (Our World in Data, 2021)

As the vaccination data are dynamic and there was a step in the number of people with full immunization as of May 25, we considered the data from that day onwards for adjusting an exponential curve to the data, using the least squares method.

The question arises: how can students work with this type of data? The main focus is on the analysis of the dynamics of a vaccination policy. A relationship between time and the number of vaccinated persons could permit simulations to be made, and different vaccination policies to be studied for such a functional relationship to be found; a good strategy could be to obtain the best simple linear regression model, observing that the ‘best’ model is subjective to the chosen tools, as is the case with many so-called ‘objective’ mathematical results.

The given data for the considered time-period can be described by a curve with exponential characteristics. This adjustment demands technological resources and this necessity for technology increases with the complexity of the chosen curves for adjustment using least square methods. The chosen curve relating a dependent variable y (the number of vaccinated individuals) to a single independent variable x (time) is given by the following:

$$y\left(x\right)=a.{e}^{b.x},$$

With this choice comes an implicit warning about the validity of mathematical modelling with regard to the range of variation of the variables, both dependent and independent: these adjustments serve the modelling process in so far as the modelling assumptions remain valid.

The graph of the comparison of the number of people who received the second dose of vaccines and the obtained curve (by the least square method) is shown in Fig. 7.

Fig. 7
figure 7

Number of people with full immunization and the adjusted curve (Our World in Data, 2021)

3.2 Adapting the original model to include vaccination

Although the possibility of vaccinated individuals contracting the SARS-CoV-2 virus exists in relevant quantities, the simplified model adopted here will suppose that vaccinated persons, after a period during which any individual remains immune, become susceptible again. As in the previous example, we assume that the total population does not change significantly, so that S(t) + I(t) + V(t) + R(t) = N, a constant value.

This demands the creation of the above-mentioned compartment for persons that are neither susceptible, nor infected nor temporarily resistant: the compartment of vaccinated individuals.

When knowing the values of S(0), I(0), R(0) and V(0), a discrete mathematical model for obtaining the successive values of S(n), I(n), R(n), V(n) can be developed. It is similar to that of system (3), with the presence of the vaccinated individuals as described previously. And besides using the same parameters representing the very same movements between compartments, system (5) includes υSV and υVS indicating the movement of susceptible individuals to the compartment of vaccinated ones and, after the period of immunization, returning to the susceptible state.

$$\left\{\begin{array}{l}S\left(n+1\right)-S\left(n\right)= -{\beta }_{SI}.S\left(n\right).I\left(n\right) + {\delta }_{SR}.R\left(n\right)-{\vartheta }_{SV}.S\left(n\right)+{\vartheta }_{VS}.V(n),\\ I\left(n+1\right)-I\left(n\right)= {\beta }_{SI}.S\left(n\right).I\left(n\right)-{\gamma }_{IR}.I\left(n\right),\\ V\left(n+1\right)-V\left(n\right)= {\vartheta }_{SV}.S\left(n\right)-{\vartheta }_{VS}.V\left(n\right),\\ R\left(n+1\right)-R\left(n\right)={\gamma }_{IR}.I\left(n\right)- {\delta }_{SR}.R\left(n\right),\end{array}\right.$$
(5)

where n represents the time-step.

A new figure can be presented with all four compartments changing in time (with the same parameters as in system (5)) in order to be able to understand how vaccination programmes can affect the final results. For this, we can use, instead of system (5), a system of ODE's, in a continuous context:

$$\left\{\begin{array}{l}\frac{dS(t)}{dt}= -{\beta }_{SI}.S\left(t\right).I\left(t\right) + {\delta }_{SR}.R\left(t\right)-{\vartheta }_{SV}.S\left(t\right)+{\vartheta }_{VS}.V(t),\\ \frac{dI(t)}{dt}= {\beta }_{SI}.S\left(t\right).I\left(t\right)-{\gamma }_{IR}.I\left(t\right),\\ \frac{dV(t)}{dt}= {\vartheta }_{SV}.S\left(t\right)-{\vartheta }_{VS}.V\left(t\right),\\ \frac{dR(t)}{dt}={\gamma }_{IR}.I\left(t\right)- {\delta }_{SR}.R\left(t\right),\end{array}\right.$$
(6)

for t varying in the interval [0,T].

There is a justification for the use of both kinds of modelling efforts. If, on the one hand, data are collected daily—which is to say in a discrete way and, therefore with difference equations—on the other hand, the long period of time permits the use of a continuous model and, consequently, using differential equations. A study of the phase planes of both systems (5) and (6) leads to the same kind of graph and very similar numerical values. A use of system (6) would probably not be possible in a high school environment. And a spreadsheet would only be useful for discrete systems such as (5), whereas, for simulating system (6) there is the need to approximate numerically the solutions of ordinary differential equations. In spite of the possibility of using a spreadsheet for a discrete system, the results presented here were obtained using Wolfram Mathematica®, in which numerical methods for ordinary differential equations were used in the approximations.

Although the general aspect is qualitatively similar to that of the SIR model as seen in previous figures, in Fig. 8 it can be seen that the endemic stationary situation happens with a smaller population of infected individuals. In other words, the disease tends to an endemic situation (called a ‘steady state’) in which the number of individuals in each of the compartments remains the same.

Fig. 8
figure 8

The phase plane for SIRV model, considering only S and I (developed in Wolfram Mathematica®)

This graph (Fig. 9) illustrates the positive effect of an adequate vaccination policy, showing a much smaller population level for infected individuals than the steady-state values in the graphs shown in Figs. 3 and 4, where the model does not include vaccination, in spite of the fact that the utilized vaccine does not guarantee permanent immunity for the disease.

Fig. 9
figure 9

Evolutionary dynamic of the SIRV model

Modelling at this level, and using technologies, be it to approximate the behaviour of systems of difference equations or of systems of ordinary differential equations, will permit modelling techniques and attitudes to be tested, to be evaluated and to have results criticized both mathematically and socially. In the next section, a further modification is discussed, always in the same spirit of trying, testing, checking… and learning. The purpose of this modification is to show how a useful model can be extended by including, or eliminating, aspects such as compartments, parameters, relationships, as is done in the next section.

3.3 Modelling including confinement

Another possible (and necessary) modification can very well be that of having an additional compartment of those people who can stay at home, respecting social distancing in a disciplined manner. In such a case, it must be considered that for many people, this is not possible: hospital and sanitary professionals, bus and truck as well as taxi drivers, cannot operate from a home office. These and so many other professionals must be ready to face the pandemic, depending mostly on individual protection equipment, as well as hoping that others also have similar socially responsible behaviour and attitudes.

Figure 10 presents this new situation in which social distancing is respected by those who have the opportunity to do so. The chart describes a situation in which, besides compartments of susceptible, infected and removed individuals, there is another compartment of confined persons. confined persons are also subject to the possibility of catching the disease, even with a much smaller possibility and, therefore, the passage from confined to infected can exist, as can also happen that due to social or economic pressures, individuals may leave the compartment of confined persons returning to the compartment of susceptible ones. The diagram, however, takes into account that the rate with which those in susceptible move to confined is, in fact, the difference between those that go from S to C minus those that return from C to S.

Fig. 10
figure 10

Flow chart for the SCIR model

Using a system of difference equations, with the intention of working this out quantitatively at a high school level, with adequately simple spreadsheet software, we may very well have a discrete mathematical model given by the following:

For S(n), C(n), I(n), R(n) and knowing S(0), C(0), I(0) and R(0), we have

$$\left\{\begin{array}{l}S\left(n+1\right)-S\left(n\right)= -{\beta }_{SI}.S\left(n\right).I\left(n\right)-{\alpha }_{SC}.S(n) + {\delta }_{SR}.R\left(n\right),\\ C\left(n+1\right)-C\left(n\right)= {\alpha }_{SC}.S\left(n\right)-{\beta }_{CI}.C\left(n\right).I\left(n\right),\\ I\left(n+1\right)-I\left(n\right)= {\beta }_{SI}.S\left(n\right).I\left(n\right)+{\beta }_{CI}.C\left(n\right).I\left(n\right)-{\gamma }_{IR}.I\left(n\right),\\ R\left(n+1\right)-R\left(n\right)={\gamma }_{IR}.I\left(n\right)- {\delta }_{SR}.R\left(n\right),\end{array}\right.$$
(7)

where n represents the time-step.

Again, as in previous settings, this can be worked out numerically with a relatively simple theoretical explanation. This is qualitatively indicated in Figs. 11 and 12. If it becomes necessary to use, instead of system (7), a system of ODE's, we will have the following system:

$$\left\{\begin{array}{l}\frac{dS(t)}{dt}= -{\beta }_{SI}.S\left(t\right).I\left(t\right)-{\alpha }_{SC}.S(t) + {\delta }_{SR}.R\left(t\right),\\ \frac{dC(t)}{dt}= {\alpha }_{SC}.S\left(t\right)-{\beta }_{CI}.C\left(t\right).I\left(t\right),\\ \frac{dI(t)}{dt}= {\beta }_{SI}.S\left(t\right).I\left(t\right)+{\beta }_{CI}.C\left(t\right).I\left(t\right)-{\gamma }_{IR}.I\left(t\right),\\ \frac{dR(t)}{dt}={\gamma }_{IR}.I\left(t\right)- {\delta }_{SR}.R\left(t\right),\end{array}\right.$$
(8)

for t varying in the interval [0,T].

Fig. 11
figure 11

The phase plane for SCIR model: simultaneous behaviour of susceptible and infected cases (developed in Wolfram Mathematica®)

Fig. 12
figure 12

Evolutionary dynamic of the SCIR model

The results of system (8) are qualitatively indicated in Figs. 11 and 12.

Figures 11 and 12 also indicate an endemic situation in which, as in previous ones, the disease remains affecting society, with all its dire consequences, even if the level of infected populations is low with respect to that of other compartments.

As in both previously presented situations, an endemic situation is obtained, and COVID-19 (or any analysed disease) will remain within society—and society will have to learn to live with this presence. These previous modelling efforts, however, demonstrate that employing only vaccines or only social distancing, cannot, in general, eliminate a disease such as the one theoretically described here.

The use of convenient software (or, preferably, of adequate freeware) can enable us to consider a continuous modelling effort, using an analogue system of ordinary differential equations, such as the one described in system (8).

All this should possibly lead us to a new step in the modelling process, namely, that of considering a combination of social distancing with self-confinement together with a vaccination programme.

3.4 Modelling including confinement and vaccination

The chart in Fig. 13 illustrates a situation in which the susceptible are vaccinated but the immunity is only for a period of time, after which individuals become susceptible again. Besides that, it considers that isolated individuals may still be infected albeit in a very much smaller proportion than that of non-confined individuals.

Fig. 13
figure 13

Flow chart for the SCIRV model

For S(n), C(n), I(n), R(n), V(n) and S(0), C(0), I(0), R(0) and V(0), we have

$$\left\{\begin{array}{l}S\left(n+1\right)-S\left(n\right)= -{\beta }_{SI}.S\left(n\right).I\left(n\right)-{\alpha }_{SC}.S(n) + {\delta }_{SR}.R\left(n\right)-{\vartheta }_{SV}.S\left(n\right)+{\vartheta }_{VS}.V(n),\\ C\left(n+1\right)-C\left(n\right)= {\alpha }_{SC}.S\left(n\right)-{\beta }_{CI}.C\left(n\right).I\left(n\right),\\ I\left(n+1\right)-I\left(n\right)= {\beta }_{SI}.S\left(n\right).I\left(n\right)+{\beta }_{CI}.C\left(n\right).I\left(n\right)-{\gamma }_{IR}.I\left(n\right),\\ V\left(n+1\right)-V\left(n\right)={\vartheta }_{SV}.S\left(n\right)-{\vartheta }_{VS}.V\left(n\right),\\ R\left(n+1\right)-R\left(n\right)={\gamma }_{IR}.I\left(n\right)- {\delta }_{SR}.R\left(n\right),\end{array}\right.$$
(9)

where n represents the time-step.

Assumptions are similar to those of the previous models in order to emphasize possible and many times necessary adaptations and modifications, in order to include different considerations in the modelling processes. We can use, instead of system (9), the following system of ODE's:

$$\left\{\begin{array}{l}\frac{dS(t)}{dt}= -{\beta }_{SI}.S\left(t\right).I\left(t\right)-{\alpha }_{SC}.S(t) + {\delta }_{SR}.R\left(t\right)-{\vartheta }_{SV}.S\left(t\right)+{\vartheta }_{VS}.V(t),\\ \frac{dC(t)}{dt}= {\alpha }_{SC}.S\left(t\right)-{\beta }_{CI}.C\left(t\right).I\left(t\right),\\ \frac{dI(t)}{dt}= {\beta }_{SI}.S\left(t\right).I\left(t\right)+{\beta }_{CI}.C\left(t\right).I\left(t\right)-{\gamma }_{IR}.I\left(t\right),\\ \frac{dV(t)}{dt}={\vartheta }_{SV}.S\left(t\right)-{\vartheta }_{VS}.V\left(t\right),\\ \frac{dR(t)}{dt}={\gamma }_{IR}.I\left(t\right)- {\delta }_{SR}.R\left(t\right),\end{array}\right.$$
(10)

for t varying in the interval [0,T].

In this case, there are some relevant comments. The first one is that the parameter that describes the movement of confined individuals to the compartment of infected ones is significantly smaller than the one that describes the movement from susceptible to infected compartments. Another comment is that this model could possibly be improved, considering the fact that confined persons may return to the compartment of susceptible individuals facing social pressures, as mentioned before.

As in other modelling efforts with other hypotheses, this graph (Fig. 14) indicates that an endemic situation is reached in the relative quantities of individuals in the Susceptible and Infected categories.

Fig. 14
figure 14

The phase plane for SCIRV model: simultaneous behaviour of susceptible and infected (developed in Wolfram Mathematica®)

As in the Fig. 14, this graph (Fig. 15) clearly indicates an endemic situation in which the disease remains in society—unless new measures appear, introducing the need for changes in the present models.

Fig. 15
figure 15

Evolutionary dynamic of the SCIRV model

3.5 A comparison of models

In this section, we present the different types of evolutionary behaviour of the models we have discussed previously. This is not in any way a comprehensive list of models—there are, in fact a vast number of other choices for this modelling (Aguiar, et al., 2020; Amaku, et al., 2021; Ciufolini & Paolozzi, 2020; Thomas, et al., 2020; Zeb, et al., 2020). Also, there are other types of modelling efforts using different mathematical tools and numerical procedures. It is not only the choice of different models that can adapt the mathematical work of different situations and contexts. Even choosing to use only non-linear systems of ordinary differential equations, it is necessary to consider that very important changes in the parameters may be necessary and may have surprising results. For example, the choice of having the transmissibility parameter varying in time in order to simulate successively changing virus strains, as well as varying social attitudes, will modify the rates of change in confined and vaccinated compartmental populations, thus changing the outcomes of the results.

For the models cited above, a comparative consideration can and should be used. From an educational point of view, these graphs can motivate a critical evaluation of the modelling efforts, as well as their capability in simulating social scenarios. And we believe that qualitative illustrations, such as that in Fig. 16, may very well be used to assess and evaluate social and sanitary policies chosen and adopted by authorities. Figure 16 illustrates, therefore, the tendencies according to different models and possible outcomes.

Fig. 16
figure 16

Number of the Infected people using different models

A comparison with and a subsequent adaptation to real-life data, as undertaken by Meyer et al. (2021), can be quite useful in testing values, decisions, policies. Of course, when a model is forced to agree with real-life information, there is always a risk of ‘'spoiling’' simulations, since models demand empirical as well as heuristic evaluations and corrections.

As we mentioned before, another challenge is to use simplicity in altering models of this kind in order to test scenarios. For example, we could very well consider a model in which vaccinated individuals, after a period of time, can be considered as temporarily resistant to the disease and, therefore, do not return immediately to the compartment of Susceptible, passing previously by the compartment of temporarily resistant persons.

3.6 The pedagogical value of these models on the pandemic COVID-19

For the authors, besides some comments in the introduction (as well as elsewhere) on the importance of pedagogical values evident in working with a sequence of different mathematical models for real-life situations, there is another aspect to be mentioned. In lieu of a meaningless learning of mathematics, working with the models described here, as well as with their viable modifications, can present learners with a mathematics of necessities, to be used as an instrument to understand the world around us—and to change it. Therefore, not only in the sense that these mentioned models can enable students, also working in groups, to use mathematics to understand, criticize and simulate different governmental actions to combat the pandemic as well as to evaluate several actions that were (or that were not, in some countries) adopted in combating COVID-19. That is to say that working with these models and procedures can be considered as Mathematics for Education and not the other way round. Using different mathematical tools, researchers world-wide have evaluated governmental attitudes in terms of the criteria for adopting public health policies (an example is that of Silva & Sagastizábal, 2021, with results for some regions in Brazil).

Another important factor for learners and students is the fact that, in the majority of situations, the exhibition of apparently precise numerical results of mathematical modelling of phenomena, such as those related to the pandemic, say very little in different areas, to the media and to many professionals in public health about possible simulations and results, and mathematics is not, in any way, exact (in spite of what common sense states). Instead, the presentation of qualitative results, of possible tendencies, of illustrative graphs, albeit inexact, may very well display what the mathematical results are about, in the sense of the ‘what if’ questions, which should arise in the simulations; and those cases should be discussed by teachers with their students, in order to adjust the mathematical modelling to describe the real scenarios in a better way.

There is a third pedagogical value that can justify the use of the modelling of social and natural phenomena in the learning of mathematics and where it is needed: that is, using simulations and corresponding graphs can lead to a better interpretation of data. There are almost infinite links to data on the internet. These data, in order to become information, need mathematics and, in very many cases, mathematical modelling of the problem under study. It goes without saying that the same number can very well represent a catastrophic sanitary problem in one place, while showing an inevitable improvement in other regions. In this case, both the use of derivatives, as is the case with differential equations, and the use of discrete differences, which are the basis for difference equations, can immediately identify very different tendencies and, in so doing, permit a dynamical description of the problem, in spite of some similar numerical results.

For the authors, there is a fourth and important factor in the use of this type of modelling in classroom and school activities: models can and do function while situations remain the same. A very small change in the transmissibility of a virus may result in a substantial modification of the complete model. In other words, applying mathematics to real-life situations through some mathematical modelling effort is almost never the same in time, neither does it necessarily hold when space variables change: mathematical modelling consists in constantly evaluating results and adjusting procedures, models, equations, and instruments whenever necessary.

This section was used to emphasize that the use of mathematical modelling of social and environmental phenomena does have a very important place in the learning of mathematics, as well as in school activities. Four possibilities were mentioned, out of many other possible aspects, as follows: the mathematics of necessity, resulting from challenges to being able to study and understand a developing and demanding world; the inexactness of mathematics allied to its strength in simulations which can be decisive in evaluating social and natural situations; the always urgent need of interpreting data to obtain faithful information; and the ever-changing real world impinging on the dynamics of mathematical modelling.

Finally, there is another provocative remark: in these situations, here described and mentioned, there is generally no specific mathematical question. While students learn how to obtain the unique and exact answers to classroom problems, real life demands that they be able to ask the right questions as well.

4 Conclusions

The main objective of the work described in this paper is to present modelling techniques that students can use to learn (1) to adapt models to slight changes and prepare for the creation of new models, (2) to evaluate modelling choices of state variables, parameters and mathematical tools, (3) to recognize modelling limitations and, most certainly, to understand critically how the use of mathematical models, also employing technological and numerical strategies, can be useful for learning about a certain problem and understanding its aspects, and for simulating scenarios for social and natural decisions as regards human actions in society and nature. In the introduction, the expression ‘messy’ was used for real-life situations, an evaluation to which both authors agree. On the other hand, in a text written by Kaiser et al. (2011), (with a very appropriate title in its reference to “Authentic Modelling Problems in Mathematics”) the readers' attention is called not only to the mathematical difficulties but also to the problem of choosing an adequate hypotheses for modelling a studied situation. Attitudes, as described in the mentioned text, which “promote the whole range of [learning] modelling competencies” as well as enhancing the need for students to take action (this last phrase is an interpretation of the text), must be learnt.

It is not always the complex mathematical outlook which leads to the best results, even though, in general, sophisticated mathematics as well as advanced software packages do result in better understanding and evaluations. This is especially true in an environment where mathematics is used for studying both non-mathematical as well as mathematical situations and creating knowledge for relevant social responsibilities.

The modelling efforts presented and discussed above can, both in a high school and at undergraduate levels, motivate the use of mathematics, coupled with other scientific outlooks, creating an essential, albeit auxiliary tool, which is, in fact, an important support for decision-making procedures in a transdisciplinary situation.

Another purpose of this text, possibly implicit in all that is stated, refers to the fact that a mathematical model as well as mathematical modelling is not necessarily ‘good’ per se. It does, in fact, promote learning, evaluation, decision-making, and critical analysis concerning mathematical processes—but in which context or in which contexts? Now this is put forth from the point of view of mathematics education, since a model can be very ‘good’ in its efficiency, regardless of ethical consequences. Some years ago, in the questions-and-answers period after a conference, Professor Nelson Maculan, who was the chancellor of the Rio de Janeiro Federal University, said that in his childhood, the photograph from the simple graduation ceremony of his junior school was taken, as was the case for all his little colleagues, with a coloured terrestrial globe beside each child. He went on to say that, for older students, the equivalent of the globe, which should be used today against negationist theories, was the mathematical model (Maculan Filho, 2018). The authors tend to agree with him, but it is also true that the attitude behind modelling in a school environment must always take into account that mathematics is an essential tool in the modelling process, and that it can (and should) become a very important tool in the sense of Mathematics for Education.

Mathematical Modelling has always been used, for example, in creating and improving mass destruction artifacts, in the production of toxic material which is said to be useful in the culture of cereal grains, in calculating the increase in profits coupled to both the increase in quantities as well as the reduction of quality in so many areas of human activities. The model can be an efficient tool, but wielding it correctly needs education in a critically ethical sense, education for effective human development, or, as a UNESCO study suggests, “Learning to study, inquire and co-construct together (learning to learn), Learning to collectively mobilize, Learning to live in a common world and Learning to attend and care” (Sobe, 2021, p. 1) or, in the words of Rodrigues (2021), “Learning to know, learning to do, learning to live together and learning to be” (p. 3). This attitude identifies the perspective of mathematical modelling with what it entails for an education to improve the context for humanly relevant values, for society and nature. Villa-Ochoa and Berrío (2015) affirmed that, (in the authors’ words) besides, “[activating] other dynamics of the individual knowledge of some members of a culture”, the individual’s knowledge “[is] to be discussed, … socially organized, thus becoming a body of knowledge which is a response to its members' needs and will” (p. 249). This perspective places a challenge for the educational use of mathematical modelling that does, in fact, reach quite farther than the useful and necessary learning of mathematical concepts and processes.

There are, of course, many other models and possible approaches for infected diseases in a human-to-human transmission, in vector-born infections, and in situations in which these mentioned vectors provide the contact between humans and natural hosts.

Simpler models are not always the best, but they are necessary for the procedure that might eventually lead to important tools for understanding, studying, analysing, and simulating infectious diseases in many environments. Besides, simpler models can and do lead the way to the learning of mathematical concepts and uses, and they enable mathematics students, most especially those who are learning to become mathematics teachers, not only to exhibit the power and the necessity of mathematics for developing the posture of conscientious citizens, but to interact in a transdisciplinary way with other knowledge, other points of view, other backgrounds and cultures, as well as so many other ways for coping with the challenge of living in an ever-changing world. In other words, this enterprise involves understanding how mathematics is, together with other sciences, essential in reading the world, creating knowledge, evaluating it, and using it for a better society and a better environment.