**3. Error Estimate for the Solution**

We can here check the accuracy of the proposed method. Since the *SL*(*t*), *IL*(*t*), *RL*(*t*) is an approximate solution to Equation (1), once these functions and their first derivative are substituted into Equation (1), the obtained equations should satisfied approximately, in short, for *t* = *tr* ∈ [0, *R*], *r* = 0, 1, ...

$$\begin{aligned} E\_{1,L}(t\_{\mathcal{I}}) &= |\mathcal{S}'(t\_{\mathcal{I}}) + \beta \mathcal{S}(t\_{\mathcal{I}}) I(t\_{\mathcal{I}})| \stackrel{\cong}{=} 0\\ E\_{2,L}(t\_{\mathcal{I}}) &= |\mathcal{I}'(t\_{\mathcal{I}}) - \beta \mathcal{S}(t\_{\mathcal{I}}) I(t\_{\mathcal{I}}) + \gamma I(t\_{\mathcal{I}})| \stackrel{\cong}{=} 0\\ E\_{3,L}(t\_{\mathcal{I}}) &= |\mathcal{R}'(t\_{\mathcal{I}}) - \gamma I(t\_{\mathcal{I}})| \stackrel{\cong}{=} 0,\end{aligned} \tag{25}$$

4

and *Ei*,*<sup>L</sup>* <sup>≤</sup> <sup>10</sup>−*kr*, *<sup>i</sup>* <sup>=</sup> 1, 2, 3 (*kr* any positive contant). If *max*10−*kr* <sup>=</sup> <sup>10</sup>−*<sup>k</sup>* is prescribed, the truncation limit *L* is increased until the difference *Ei*,*L*(*tr*),(*i* = 1, 2, 3) at each of the points becomes smaller than the prescribed 10−*<sup>k</sup>* [21,22].

## **4. Illustrative Example**

+ 0.126768711610−7*t*

5.

In this section, to show the accuracy and efficiency of the presented method, the SIR model of epidemics, given in Equation (1), is solved with it. For the SIR model, the following parameter values that given in [9] are used. Numerical calculations were performed using Maple software.

$$N\_S = 20, N\_I = 15, N\_R = 10, \beta = 0.01, \gamma = 0.02.$$

In interval 0 ≤ *t* ≤ 1, we obtain approximate solutions for *L* = 5 using the presented method; in turn, approximate solutions with five terms:

$$\begin{aligned} S(t) &= 20.00000000 - 2.999999999t - 0.04499957685t^2 + 0.02804671200t^3 \\ &+ 0.0008058035642t^4 - 0.0003329149155t^5 \\ I(t) &= 15.00000000 + 2.699999999t + 0.01799970470t^2 - 0.02816759777t^3 - 0.0006626352597t^4 \\ &+ 0.0003329022387t^5 \\ R(t) &= 10.00000000 + 0.3000000000t + 0.2699987216t^2 + 0.0001208857706t^3 - 0.0001431683045t^4 \end{aligned}$$

The approximate solutions of this system were presented by Rafei et al. using the homotopy perturbation method (HPM) [10]. The homotopy perturbation method is a efficient method for finding solutions of ordinary/partial differential equations without the need for a linearization process. The obtained approximate solutions with five terms:

> *S*(*t*) = 20 − 3*t* − 0.045*t* <sup>2</sup> + 0.02805*t* <sup>3</sup> + 0.0007953750*t* <sup>4</sup> <sup>−</sup> 0.0003165502*<sup>t</sup>* 5 *I*(*t*) = 15 + 2.7*t* + 0.018*t* <sup>2</sup> <sup>−</sup> 0.02817*<sup>t</sup>* <sup>3</sup> <sup>−</sup> 0.0006545250*<sup>t</sup>* <sup>4</sup> + 0.0003191683*t* 5 *R*(*t*) = 10 + 0.3*t* + 0.027*t* <sup>2</sup> + 0.00012*t* <sup>3</sup> <sup>−</sup> 0.0001408500*<sup>t</sup>* <sup>4</sup> <sup>−</sup> 0.0000021681*<sup>t</sup>* 5.

The approximate solutions of this system were also presented by Dogan and Akin using Laplace-Adomian decomposition method (LADM) [12]. The LADM provides us with an approximate solution in the form of infinite series. The obtained approximate solutions with five terms:

$$\begin{aligned} S(t) &= 20 - 3t - 0.045t^2 + 0.02805t^3 + 0.000795375t^4 - 0.00031655t^5 \\ I(t) &= 15 + 2.7t + 0.018t^2 - 0.02817t^3 - 0.000654525t^4 + 0.000319168t^5 \\ R(t) &= 10 + 0.3t + 0.027t^2 + 0.00012t^3 - 0.00014085t^4 - 0.000002168t^5 \end{aligned}$$

We know that Equation (1) has no exact solution. So, we compared the obtained results using Hermite collocation method with the obtained results using HPM presented [10] and the obtained results using LADM presented [12].

From Figures 1–3, it is clear that the results obtained using HCM is very efficient.

**Figure 1.** Comparison of the error function *E*1,5(*t*) for *S*(*t*).

**Figure 2.** Comparison of the error function *E*2,5(*t*) for *I*(*t*).

**Figure 3.** Comparison of the error function *E*3,5(*t*) for *R*(*t*).

#### **5. Conclusions**

In this study, the Hermite Collocation Method was applied to obtain the approximate solutions of SIR model. We showed the accuracy and efficiency of the presented method with an example. To show the correctness of the obtained approximate solutions, we put the obtained approximate solutions back into Equation (1) with the aid of Maple software. Thus, it gives extra measure for confidence of the obtained approximate solutions. The obtained approximate results and the error values are compared with the error values and the approximate solutions obtained with homotopy perturbation method (HPM) [10] and Laplace-Adomian decomposition method [12]. These comparisons reveal that our method is more efficient and useful to find approximate solution the SIR model of epidemics. From Tables 1–3, it is seen that the numerical solutions of the HPM [10] and the LADM [12] are almost same. Therefore, it is observed that the presented method is an alternative way for the solution of nonlinear ODEs system that have no analytic solution. The greatest advantage of the presented method is that all of above computations can be computed easily in very shorter time by using the computer code written in Maple software.

**Table 1.** The values of *S*(*t*), and the residual errors *ERS* for HPM, HCM and LADM.


**Table 2.** The values of *I*(*t*), and the residual errors *ERI* for HPM, HCM and LADM.



**Table 3.** The values of *R*(*t*), and the residual errors *ERR* for HPM, HCM and LADM.

**Author Contributions:** All authors contributed equally to the writing of this paper. All authors read and approved the final manuscript.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


c 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
