I will update this blog post when I find time along with data coming from the Outbreak. Code and data can be found in this Github repository. The data used are the one provided by Protezione Civile on the official repository.

The SIR model is a system of ODEs designed to model the dynamics of an epidemics not affected by birth and death. This model was originally developed by Kermack-McKendrick in 1927, and is expressed by the following ordinary differential equations:

In particular is defined as the product between the average number of contacts per person times the probability the disease transmit at each contact, and is the duration of the infection in days. An other important quantity is the average number of secondary infection, i.e. , in particular in SIR model it is defined as . This is known to be a some sort of magic number when it comes to epidemic spread. If we define the two quantity:

we can rewrite (E1) as:

then the initial growth in infected is given by the ODE:

this tell us that if is greater then one we will have an exponential growth in the infected. More detail regarding the significance of in particular related to the COVID-19 outbreak can be found in **B1**. The number for the COVID-19 has been estimated around 3.28, more information can be found in **B2**.

More sophisticated model have been introduced to model pandemics. Birth and death can be included in the SIR model, but given the fast dynamics of the COVID-19 outbreak this was not necessary. Model where the immunity is not achieved after the infection, called SIS model, have been developed, but given the limited period and the localization of the case study those model where not taken into consideration. Last but not least model that take in consideration age structure can be used, and given the way COVID-19 affect differently elderly population, this would have been appropriate. But due to the complexity in building the contact matrix was decided not to use those type of models. More complex deterministic model have been applied to the Chinese COVID-19 outbreak in **B3** and **B4**. All the model here discussed are deterministic model, stochastic model are an other valid approach. In particular we can see a branching model applied to the COVID-19 outbreak in **B5**. More information about the epidemic modeling can be found in **B6**.

Our aim was to fit the SIR model to the COVID-19 outbreak in Lombardy, to find the right configuration of two parameters i.e. , . We estimated those parameters confronting model simulation with data collected from the first 12 days of the outbreak, starting from the 21st of February to the 3rd of March. We limit the data taken in consideration to the first 12 days because due to change of the testing policy in Lombardy the number of new infection could not be considered completely reliable. In particular we decided to discharge the data from the day the mortality rate surpassed the world average, which is 3.4% according to **B7**, by more then the variance in the death rate, i.e. 0.52.

As previously mentioned is important to chose the most accurate and parameters for the model to correctly represent the COVID-19 outbreak. We then estimated the value of and minimize the following error:

where and are the recorded data from the Lombardy outbreak, as described in section regarding the data, and is equal to 12.

To minimize we used a gradient descent method with starting point ranging in and ranging in . In particular automatic differentiation based on centered finite difference approximation is used to compute the gradient. The parameters for which the model best fitted the data, according to the error function , were found to be and .

This give us an initial number equal to , which placed the number for the Lombardy outbreak just below the worst estimate for the Hubei province outbreak, **B2**.

In this section we described how to take into account the effect of quarantine in our SIR model. We decided to model the effect of quarantine studying the COVID-19 data from the Lodi province where most of the original red zone where placed. We computed the R0 number form the data using the following definition:

in particular we tracked the evolution of the for COVID-19 in the Lodi province, assuming a fixed value for the . Last but not least we used the mean of the value over four days, to damp the statistical error. We decided to model the effect of quarantine modifying (**E1**) as follow:

where represent the fraction of that is effected by the quarantine, we can image this as a measure of how much the red zone quarantine procedure is respected in Lombardy. To compute and we represented the clustered data from Lodi in a logarithmic scale and then we used linear regression.

This figure represent an estimation of the beta value, fitted on the clustered data from the Lodi province using a linear regression in the logarithmic space.

Once we run the simulation for the SIR modeling over a full period of 120 days we find out that the peak in infection will be reached between the 27th and the 31st day of the infection. Furthermore the critical proportion of the people to be vaccinated, to gain hard immunity, in case a vaccine is developed, need to be around the 80% of the population.

The figure show the simulation for the above described SIR

model over the duration of 120 days.This figure shows the effect of quarantine with changing value of p.

**B1)** Giulio Viceconte and Nicola Petrosillo. Covid-19 r0: Magic number or conundrum? Infectious Disease Reports, 12(1), 2020.

**B2)** Ying Liu, Albert A Gayle, Annelies Wilder-Smith, and Joacim Rocklöv. The reproductive number of covid-19 is higher compared to sars coronavirus. Journal of Travel Medicine, 2020.

**B3)** Jonathan M Read, Jessica RE Bridgen, Derek AT Cummings, Antonia Ho, and Chris P Jewell. Novel coronavirus 2019-ncov: early estimation of epidemiological parameters and epidemic predictions. medRxiv, 2020.

**B4)** Biao Tang, Xia Wang, Qian Li, Nicola Luigi Bragazzi, Sanyi Tang, Yanni Xiao, and Jianhong Wu. Estimation of the transmission risk of the 2019-ncov and its implication for public health interventions. Journal of Clinical Medicine, 9(2):462, 2020.

**B5)** Joel Hellewell, Sam Abbott, Amy Gimma, Nikos I Bosse, Christopher I Jarvis, Timothy W Russell, James D Munday, Adam J Kucharski, W John Edmunds, Fiona Sun, et al. Feasibility of controlling covid-19 outbreaks by isolation of cases and contacts. The Lancet Global Health, 2020.

**B6)** Matt J Keeling and Pejman Rohani. Modeling infectious diseases in humans and animals. Princeton University Press, 2011.

**B7)** T. Adhanom. WHO director-general’s opening remarks at the media briefing on covid-19 – 3 march 2020”, 2020.

**B8)** Jantien A Backer, Don Klinkenberg, and Jacco Wallinga. Incubation period of 2019 novel coronavirus (2019-ncov) infections among travellers from wuhan, china, 20–28 january 2020. Eurosurveillance, 25(5), 2020.

**B9)** Qun Li, Xuhua Guan, Peng Wu, Xiaoye Wang, Lei Zhou, Yeqing Tong, Ruiqi Ren, Kathy SM Leung, Eric HY Lau, Jessica Y Wong, et al. Early transmission dynamics in wuhan, china, of novel coronavirus–infected pneumonia. New England Journal of Medicine, 2020.

**B10)** Brauer, Fred, Carlos Castillo-Chavez, and Carlos Castillo-Chavez. Mathematical models in population biology and epidemiology. Vol. 2. New York: Springer, 2012.

So it’s holiday time and I find some times to write, my objective today would be to present and idea regarding how to use the first and the second Dahlquist barrier theorem to prove some theoretical limit of symplectic integrator.

In this first section we will focus our attention to the numerical method to solve the wave equation in one dimension with Cauchy initial condition, what we mean when saying this is that we are searching a function at least such that:

where , and are given and is not necessarily the derivative of . In particular we will call homogeneous wave initial value problem (IVP) the previous equation with , and we will begin by studying it.

**Note**

Before dealing directly with the wave equation is interesting to introduce briefly the characteristic method. This is a resolution technique for the first order parabolic partial differential equation (PDE), but we will see that can be applied as well to the wave equation. Let’s consider the advocation equation:

we fix the point and define the function . If we define and we can compute:

this tell’s us that the solution to the ordinary differential equation (ODE) is equivalent to solving the advocation equation. If we know that is constant and therefore which is equivalent to ask and therefore:

Now if instead considering the advocation equation alone we consider the following IVP:

we have the solution to the avocation and is given by the characteristic line equation:

this tell’s as well that the solution to the avocation equation is constant along a line, that we will call **characteristic line** and has equation , for any .

Now let’s go back to the homogeneous wave IVP, and we can observe that the one dimensional wave equation can be decomposed as follow:

and therefore we know that the solution of the wave equation is as well solution of both forward and backward advocation equation. Therefore the characteristic line of the wave equation are both and . Now our will be to compute to prove that is constantly null:

and if we substitute in the last equation we get that . Now we can integrate to obtain a nice expression for :

where and are two function. Now let’s observe that since we have that and is as well possible to write down:

therefore combining what we have just seen we get the following result:

this last equation give as an analytical solution to the wave equation and is known as the **d’Alembert formula**. Analogously a formula for the inhomogeneous wave IVP can be obtained, provided that is at least :

Let us focus our attention to the d’Alembert formula, when and are “nice” function the analytical solution can be computed easily by hand but when the function aren’t nice we can use a wide number of numerical integration technique and quadrature formula to compute the integral in d’Alembert formula. For lack of a better name we will call here this class of solvers **d’Alembert solvers**.

We will here show the result of implementing a d’Alembert solvers that computes integral in the d’Alembert formula using equi-spaced node and the trapezoid quadrature formula, but is important to notice that far better result can be obtained using higher order Newton-Cotes methods, Gaussian quadrature etc.

We will here try to explain a different approach, known with the name of **time stepping**. Let’s define an equi-spaced spatial mesh , the time stepping method consist in approximating numerically using a **stiffness matrix** , ie:

where is a discretisation of the according to the spatial approximation chosen. In this report we will only treat the finite difference as a spatial approximation method, more information regarding finite difference can be found in the second part of this report. Now once we observe that still depends upon time, ie is easy to see that the IVP equation becomes:

which is am typical numerical ODE problem of second order. One might think about splitting the second order ODE system into a system of two first order ODE to be solved coupled using method such as Euler, Crank-Nicolson, Runghe-Kutta etc etc. This certainly is a valid idea that we will explore in the third part of our report.

Our aim here will be to address the problem of solving the IVP using second order ODE integration technique. In particular this section focuses on the Leapfrog integration. Let’s introduce to begin with an equi-spaced time mesh of time step and adopt the following notation , to define an other mesh of step such that . Now we are ready to define the Leapfrog integration scheme:

If we locate the Leapfrog integration on the mesh by observing that since then , and that the following Taylor expansions holds:

we get the following equation to describe the Leapfrog integration:

Our aim is here to study the stability of the Leapfrog integration using a the theory developed in B1. Our aim will be to see Leapfrog integration when solving the second order differential equation:

as way of solving the system of differential equations:

where . We know that equation that characterize the leapfrog method, and we can see the second equation as being the one solving the second equation of the first order formulation while the third equation solves the first equation of the first order formulation.

In particular is important to notice that while the second equation of the first order formulation dosen’t present particular problems the first one can be reformulated to obtain component by component a set of differential equation of the form .

The idea behind this that if we suppose our stiffness matrix is diagonalizable we can rewrite as:

where is the digitalization of by the matrix , and this means that we can study instead of system of equation that describe the first order formulation the following formulation:

now we rewrite the Leapfrog scheme equations as a linear multi step method (more information can be found in B1):

supposing that the eigenvalues of are negative we get that both the linear multi step method respect the roots criteria, since they have characteristic polynomials:

and both polynomials have roots in the unit disk.

Therefore the Leapfrog scheme is 0-stable but what we are interested to check now is if it is as well absolutely stable, as defined in B1 which is different from being -stable, as defined by Hairer-Lubich and as well in B1.

To study the Leapfrog scheme we will notice that the first equation of that describe the Leapfrog scheme can be obtained by applying the explicit Euler scheme to the problem:

and under suitable hypothesis on , which we are not going to present in detail here, we need for the solution not to explode with that:

**Note**

Last but not least we would like to observe that if as stiffness the finite difference matrix in 1D (more information can be found in the second part of this report) we know that its eigenvalues are:

is clear that is in the negative portion of the complex plane and the second requirement mentioned in the definition of -stability is tight if which is equivalent to ask:

which turns out to be the Courant–Friedrichs–Lewy condition.

In this section our aim is to present a wide class of methods, among which we could find as well the Leapfrog integration scheme. The class of methods here presented is known as sympletic integrator and have the peculiar property of conserving some sort of numerical energy.

If we image that describes the motion of particles in space, we introduce the Hamiltonian of this system and Hamilton’s equations:

now we would like to integrate numerically the above mentioned system of equation, this means that the numerical solution of the above system will be associated to an perturbed Hamiltonian, which is conserved since solution to the Hamilton equations conserves .

We will here present the same approach as in B2, which is base upon the idea that we can split the Hamiltonian as follow:

now we introduce the vector and observe that Hamilton equations can be rewritten as:

where are the Poisson brackets. We now introduce a notation useful in future:

rewriting those equation as we can easily find a solution to the ODE using the exponential matrix, since which is a property that comes directly from the assumption that :

we now wont to approximate the above mentioned operator as follow:

if the problem is quick to solve and painless , for the coefficients we are searching for are and . In particular in B3 solutions until are presented, while in B2 the Baker-Campbell-Hausdorff formula is used to a compute and for any symmetric symplectic integrator.

If we perform a Taylor expansion of the exponentials involved in the previous equations we get that:

and since:

we end up with the following equations:

now if we substitute this recursively in the previous equations we get:

which in Lagrangian coordinates becomes:

and those equations defines recursively a symplectic integrator. For example if we have as coefficents we have symplectic Euler integration which is defined by the following equations:

Instead if we choose as coefficients we end up with the Verlet integration scheme, which is defined by the following equations:

Last not but least we find out the Leapfrog integration if we choose .

We will here call symplectic integrator any integrator built with the technique presented, that can be found as well in B2 and B3.

Using the same argument proposed in the previous section, if we rewrite a symplectic scheme as a linear multi step scheme is possible to use the Dahlquist’s second barrier we can find out that no symplectic method can be -stable or -stable.

In particular we now know that any symplectic integrator as a multi step linear method, therefore we can use some of the instruments developed for the stability of multi step linear method with regard to symplectic integrator. The instruments we are speaking about are the first and the second Dahlquist Barrier:

**First Dahlquist Barrier** There are no multi step linear method, consisting of step which have a order of convergence if is odd and of if is even.

**Second Dahlquist Barrier** There are no explicit multi step linear method which are -stable or -stable. Further more there is no multi step linear method which is -stable and has order of convergence greater then .

In particular we’d like to formulate the following theorem, that will be based upon the first and the second Dahlquist barrier.

**Theorem** There are no symplectic integrator obtained by iteration of the Negri technique that have a order of convergence if is odd and of if is even. Further more there is no symplectic integrator that is -stable and has order of convergence greater then .

**Proof** We will show here just a sketch of the proof that is based on what we have seen previously:

- We reduce a symplectic integrator to a system of equations representing a multi step linear method, as we have done for the Leapfrog integration.
- We are justified to study equation by equation the stability of the symplectic integrator, as we proven in the Leapfrog Integration paragraph.
- We apply the second and the first Dahlquist barrier results to each equation representing a multi step linear method to prove the thesis above mentioned.

B1. Quarteroni, Alfio, Riccardo Sacco, and Fausto Saleri. *Matematica numerica*. Springer Science & Business Media, 2008.

B2. Yoshida, Haruo. “Construction of higher order symplectic integrators.” *Physics letters A* 150.5-7 (1990): 262-268.

B3. Negri, F. “Lie algebras and canonical integration.” *Department of Physics, University of Maryland, prepffnt* (1988).