1 Introduction

Computer viruses have cost billions of dollars since their invention in the 1980s. Actual figures are somewhat speculative, but have been reported to be $12.1 billion in 1999, $17.1 billion in 2000 and $10.7 billion for the first three quarters of 2001 [1]. Thus, methods to analyze, track, model, and protect against viruses are of considerable interest. Similar to the biological virus, there are two ways to study this problem: microscopic and macroscopic models. Following a macroscopic approach, since [10, 11] took the first step towards modeling the spread behavior of computer virus, much effort has been done in the area of developing a mathematical model for the computer virus propagation [3, 8, 19, 22, 24].

Epidemic models for computer virus spread have been investigated since at least 1988. Murray [17] appears to be the first to suggest the relationship between epidemiology and computer viruses. Although he did not propose any specific models, he pointed out analogies to some public health epidemiological defense strategies. Gleissner [7] examined a model of computer virus spread on a multi-user system, but no allowance was made for the detection and removal of viruses or alerting other users to the presence of viruses. More recently, a group at IBM Watson Research Center [912] has investigated susceptible-infected- susceptible (SIS) models for computer virus spread. In [10], they formulated a directed random graph model and studied its behavior via deterministic approximation, stochastic approximation, and simulation. Piqueira and Araujo [19] suggested a modified epidemiological model for computer viruses.

Nowadays several researchers work on the fractional order differential equations because of best presentation of many phenomena. Fractional calculus has been used to model physical and engineering processes, which are found to be best described by fractional differential equations. It is worth noting that the standard mathematical models of integer-order derivatives, including nonlinear models, do not work adequately in many cases. In the recent years, fractional calculus has played a very important role in various fields such as mechanics, electricity, chemistry, biology, economics, notably control theory, and signal and image processing see for example [6, 15, 16]. In this paper, we investigate the applicability and effectiveness of the homotopy analysis method (HAM) when treated as an algorithm in a sequence of intervals (i.e. time step) for finding accurate approximate solutions to the epidemiological model for computer viruses. This modified method is named as the multi-step homotopy analysis method. It can be found that the corresponding numerical solutions obtained by using HAM are valid only for a short time. While the ones obtained by using multi-step homotopy analysis method (MHAM) are more valid and accurate during a long time [2]. In this paper, we intend to obtain the approximate solution of the fractional-order Model for computer viruses via the multi-step homotopy analysis method. Finally we compare our numerical results with fourth-order Runge-Kutta method.

2 Model description

In this paper, we consider the model presented by Piqueira and Araujo [19]. In this model, they considered that the total population \(T\) is divided into four groups: \(S\) of non-infected computers subjected to possible infection; \(A\) of noninfected computers equipped with anti-virus; \( I \) of infected computers; and \(R\) of removed ones due to infection or not. The influx and mortality parameters of the model are defined as:

\(N\): influx rate, representing the incorporation of new computers to the network;

\(\mu \): proportion coefficient for the mortality rate, not due to the virus.

The susceptible population \(S\) is infected with a rate that is related to the probability of susceptible computers to establish effective communications with infected ones. Therefore, this rate is proportional to the product \(SI\), with proportion factor represented by \(\beta \). Conversion of susceptible into antidotal is proportional do the product \(SA\) and is controlled by \(\alpha _{SA}\), that is an operational parameter defined by the anti-virus distribution strategy of the network administration. Infected computers can be fixed by using anti-virus programs being converted into antidotal ones with a rate proportional to \(AI\), with a proportion factor given by \(\alpha _{IA}\), or become useless and removed with a rate controlled by \(\delta \). Removed computers can be restored and converted into susceptible with a proportion factor \(\sigma \). This model represents the dynamics of the propagation of the infection of a known virus and, consequently, the conversion of antidotal into infected is not considered. Therefore, by using this model, a vaccination strategy can be defined, providing an economical use of the anti-virus programs.

Considering these facts, the model can be described by:

$$\begin{aligned} \begin{aligned} \frac{dS}{dt}&= N-\alpha _{SA}SA-\beta SI-\mu S+\sigma R, \\ \frac{dI}{dt}&= \beta SI-\alpha _{IA}AI-\delta I-\mu I, \\ \frac{dR}{dt}&= \delta I-\sigma R-\mu R, \\ \frac{dA}{dt}&= \alpha _{SA}SA+\alpha _{IA}AI-\mu A. \end{aligned} \end{aligned}$$
(2.1)

Here the influx rate is considered to be \(N=0\), representing that there are no incorporation of new computers in the network during the propagation of the considered virus, because its action is faster than the network expansion. The same reason justifies the choice of \(\mu =0\), considering that the machines obsolescence time is larger than the time of the virus action.

Consequently, the equation system (2.1) is simplified to:

$$\begin{aligned} \begin{aligned} \frac{dS}{dt}&=-\alpha _{SA}SA-\beta SI+\sigma R, \\ \frac{dI}{dt}&=\beta SI-\alpha _{IA}AI-\delta I, \\ \frac{dR}{dt}&=\delta I-\sigma R, \\ \frac{dA}{dt}&=\alpha _{SA}SA+\alpha _{IA}AI. \end{aligned} \end{aligned}$$
(2.2)

with \(S(0)=S_{0},I(0)=I_{0},R(0)=R_{0},A(0)=A_{0}.\)

Here the total population of the network \(T=S+I+R+A\) remains constant.

3 Fractional calculus

In this section, we give some basic definitions and properties of the fractional calculus theory which are used further in this paper.

Definition 3.1

A function \(f(x)\,(x>0)\) is said to be in the space \(C_{\alpha }\) \((\alpha \in \mathbb {R})\) if it can be written as \(f(x)=x^{p}f_{1}(x)\) for some \(p>\alpha \) where \(f_{1}(x)\) is continuous in \([0,\infty )\), and it is said to be in the space \(C_{\alpha }^{m}\) if \(f^{(m)}\in C_{\alpha },\,\,m\in \mathbb {N}.\)

Definition 3.2

The Riemann–Liouville integral operator of order \(\alpha \) with \(a\ge 0\) is defined as

$$\begin{aligned} (J_{a}^{\alpha }f)(x)&= \frac{1}{\Gamma (\alpha )}\,\int \limits _{a}^{x}(x-t)^{ \alpha -1}\,f(t)\,dt,\;\quad x>a,\end{aligned}$$
(3.1)
$$\begin{aligned} (J_{a}^{0}f)(x)&= f(x). \end{aligned}$$
(3.2)

Properties of the operator can be found in [14, 16, 18, 20, 23]. We only need here the following: For \(f\in C_{\alpha },\) \(\alpha ,\beta >0,\) \(a\ge 0,\) \(c\in \mathbb {R},\) \(\gamma >-1\), we have

$$\begin{aligned} (J_{a}^{\alpha }J_{a}^{\beta }f)\,(x)&= (J_{a}^{\beta }J_{a}^{\alpha }f)\,(x)=(J_{a}^{\alpha +\beta }f)\,(x),\end{aligned}$$
(3.3)
$$\begin{aligned} J_{a}^{\alpha }\,x^{\gamma }&= \frac{\,x^{\gamma +\alpha }}{\Gamma (\alpha )} B_{\frac{x-a}{x}}(\alpha ,\gamma +1), \end{aligned}$$
(3.4)

where \(B_{\tau }(\alpha ,\gamma +1)\) is the incomplete beta function which is defined as

$$\begin{aligned} B_{\tau }(\alpha ,\gamma +1)&= \int _{\,0}^{\,\tau }t^{\alpha -1}(1-t)^{\gamma }dt,\end{aligned}$$
(3.5)
$$\begin{aligned} J_{a}^{\alpha }e^{cx}&= e^{ac}(x-a)^{\alpha }\sum \limits _{k\ =\ 0}^{\infty } \frac{[c(x-a)]^{k}}{\Gamma (\alpha +k+1)}. \end{aligned}$$
(3.6)

The Riemann–Liouville derivative has certain disadvantages when trying to model real-world phenomena with fractional differential equations. Therefore, we shall introduce a modified fractional differential operator \( D_{a}^{\alpha }\) proposed by Caputo in his work on the theory of viscoelasticity.

Definition 3.3

The Caputo fractional derivative of \(f(x)\) of order \(\alpha >0\) with \( a\ge 0\) is defined as

$$\begin{aligned} (D_{a}^{\alpha }f)(x)=(J_{a}^{m-\alpha }f^{(m)})\,(x)=\frac{1}{\Gamma (m-\alpha )}\int _{\,a}^{\,x}\frac{f^{(m)}(t)}{(x-t)^{\alpha +1-m}}dt, \end{aligned}$$
(3.7)

for \(m-1<\alpha \le m,\) \(m\in \mathbb {N},\) \(x\ge a,\) \(f\in C_{-1}^{m}.\)

The Caputo fractional derivative was investigated by many authors, for \( m-1<\alpha \le m,\) \(f(x)\in C_{\alpha }^{m}\) and \(\alpha \ge -1,\) we have

$$\begin{aligned} (J_{a}^{\alpha }D_{a}^{\alpha }\,f)\,(x)=J^{m}D^{m}f(x)=f(x)-\sum \limits _{k\ =\ 0}^{m\ -\ 1}f^{(k)}(a)\,\frac{(x-a)^{k}}{k\,!}. \end{aligned}$$
(3.8)

For mathematical properties of fractional derivatives and integrals one can consult the mentioned references.

4 Multi-step homotopy analysis method

The HAM is used to provide approximate solutions for a wide class of nonlinear problems in terms of convergent series with easily computable components, it has some drawbacks: the series solution always converges in a very small region and it has slow convergent rate in the wider region [2, 4, 13, 21, 25, 26]. To overcome the shortcoming, we present the multi-step homotopy analysis method that we have developed for the numerical solution of the system of fractional differential equations

$$\begin{aligned} D^{\alpha _{1}}S(t)&= -\alpha _{SA}~S(t)A(t)-\beta ~S(t)I(t)+\sigma R(t), \nonumber \\ D^{\alpha _{2}}I(t)&= \beta S(t)I(t)-\alpha _{IA}~A(t)I(t)-\delta I(t), \nonumber \\ D^{\alpha _{3}}R(t)&= \delta I(t)-\sigma R(t), \nonumber \\ D^{\alpha _{4}}A(t)&= \alpha _{SA}~S(t)A(t)+\alpha _{IA}~A(t)I(t). \end{aligned}$$
(4.1)

It is only a simple modification of the standard HAM and can ensure the validity of the approximate solutions for large time. Although the MHAM is used to provide approximate solutions for nonlinear problem in terms of convergent series with easily computable components, it has been shown that the approximated solution obtained are not valid for large t. To extend this solution over the interval \([0,t]\), we divide the interval \([0,t]\) into \(n\) -subintervals of equal length \(\Delta t,~[t_{0},t_{1}),~[t_{1},t_{2}),~[t_{2},t_{3}),...,[t_{n-1},t_{n}]\) with \( t_{0}=0,~t_{n}=t.\) Let \(t^{*\text { }}\)be the initial value for each subintervals and let \(S_{j},~I_{j},~R_{j}\) and \(A_{j}\) be approximate solutions in each subinterval \([t_{j-1},t_{j}],~j=1,2,...,n,~\)with initial guesses

$$\begin{aligned} \begin{aligned} S_{1}(t^{*})&=3,S_{,j}(t^{*})=s_{j}(t_{j-1})=s_{j-1}(t_{j-1}), \\ I_{1}(t^{*})&=95,I_{,j}(t^{*})=i_{j}(t_{j-1})=i_{j-1}(t_{j-1}), \\ R_{1}(t^{*})&=1,R_{,j}(t^{*})=r_{j}(t_{j-1})=r_{j-1}(t_{j-1}), \quad \quad \quad j=2,3,...,n\\ A_{1}(t^{*})&=1,A_{,j}(t^{*})=a_{j}(t_{j-1})=a_{j-1}(t_{j-1}). \end{aligned} \end{aligned}$$
(4.2)

Now, we can construct the so-called zeroth-order deformation equations of the system (4.1) by

$$\begin{aligned} (1-q)L[\phi _{1,j}(t;q)-S_{j}(t^{*})]&= qh[D^{\alpha _{1}}\phi _{1,j}(t;q)+\alpha _{SA}\phi _{1,j}(t;q)\phi _{4,j}(t;q) \nonumber \\&+\,\beta \phi _{1,j}(t;q)\phi _{2,j}(t;q)-\sigma \phi _{3,j}(t;q)], \nonumber \\ (1-q)L[\phi _{2,j}(t;q)-I_{j}(t^{*})]&= qh[D^{\alpha _{2}}\phi _{2,j}(t;q)-\beta \phi _{1,j}(t;q)\phi _{2,j}(t;q) \nonumber \\&+\,\alpha _{IA}\phi _{2,j}(t;q)\phi _{4,j}(t;q)+\delta \phi _{2,j}(t;q)], \nonumber \\ (1-q)L[\phi _{3,j}(t;q)-R_{j}(t^{*})]&= qh[D^{\alpha _{3}}\phi _{3,j}(t;q)-\delta \phi _{2,j}(t;q)+\sigma \phi _{3,j}(t;q)],\quad \quad \quad \\ (1-q)L[\phi _{4,j}(t;q)-A_{j}(t^{*})]&= qh[D^{\alpha _{4}}\phi _{4,j}(t;q)-\alpha _{SA}\phi _{1,j}(t;q)\phi _{4,j}(t;q) \nonumber \\&-\alpha _{IA}\phi _{2,j}(t;q)\phi _{4,j}(t;q)], \nonumber \\ j&= 1,2,...,n, \nonumber \end{aligned}$$
(4.3)

where \(q\in [0,1]\) is an embedding parameter, \(L\) is an auxiliary linear operator, \(h\ne 0\) is an auxiliary parameter and \(\phi _{i,j}(t;q),~i=1,2,3,4,~~\) \(j=1,2,...,n,\) are unknown functions. Obviously, when \(q=0\), we have

$$\begin{aligned} \phi _{1,1}(t;0)&= 3,~~\phi _{1,j}(t;0)=S_{j-1}(t_{j-1}), \\ \phi _{2,1}(t;0)&= 95,~~\phi _{2,j}(t;0)=I_{j-1}(t_{j-1}), \\ \phi _{3,1}(t;0)&= 1,~~\phi _{3,j}(t;0)=R_{j-1}(t_{j-1}),\quad \quad \quad j=2,3,...,n, \\ \phi _{4,1}(t;0)&= 1,~~\phi _{4,j}(t;0)=A_{j-1}(t_{j-1}), \end{aligned}$$

and when \(q=1,\) we have

$$\begin{aligned} \phi _{1,j}(t;1)&= S_{j}(t), \\ \phi _{2,j}(t;1)&= I_{j}(t), \\ \phi _{3,j}(t;1)&= R_{j}(t),\quad \quad \quad j=2,3,...,n, \\ \phi _{4,j}(t;1)&= A_{j}(t), \end{aligned}$$

Expanding \(\phi _{i,j}(t;q),\) \(i=1,2,3,4,~\) \(j=1,2,...,n,\) in Taylor series with respect to \(q,\) we get

$$\begin{aligned} \phi _{1,j}(t;q)&= S_{j}(t^{*})+\sum \limits _{m=1}^{\infty }S_{j,m}(t)q^{m}, \nonumber \\ \phi _{2,j}(t;q)&= I_{j}(t^{*})+\sum \limits _{m=1}^{\infty }I_{j,m}(t)q^{m}, \nonumber \\ \phi _{3,j}(t;q)&= R_{j}(t^{*})+\sum \limits _{m=1}^{\infty }R_{j,m}(t)q^{m}, \quad \quad \quad j=1,2,...,n, \\ \phi _{4,j}(t;q)&= A_{j}(t^{*})+\sum \limits _{m=1}^{\infty }A_{j,m}(t)q^{m},\nonumber \end{aligned}$$
(4.4)

where

$$\begin{aligned} \begin{aligned} S_{j,m}(t)&=\frac{1}{m!}\frac{\partial ^{m}\phi _{1,j}(t;q)}{\partial q^{m}}|_{q=0}, \\ I_{j,m}(t)&=\frac{1}{m!}\frac{\partial ^{m}\phi _{2,j}(t;q)}{\partial q^{m}}|_{q=0}, \\ R_{j,m}(t)&=\frac{1}{m!}\frac{\partial ^{m}\phi _{3,j}(t;q)}{\partial q^{m}}|_{q=0}, \quad \quad \quad j=1,2,...,n, \\ A_{j,m}(t)&=\frac{1}{m!}\frac{\partial ^{m}\phi _{4,j}(t;q)}{\partial q^{m}}|_{q=0}, \end{aligned} \end{aligned}$$
(4.5)

If the initial guesses \(S_{j}(t^{*}),\) \(I_{j}(t^{*}),~R_{j}(t^{*}),\) \(A_{j}(t^{*}),\) the auxiliary linear operator \(L\) and the nonzero auxiliary parameter \(h\) are properly chosen so that the power series (4.4) converges at \(q=1,\) one has

$$\begin{aligned} \begin{aligned} S_{j}(t)&=\phi _{1,j}(t;1)=S_{j}(t^{*})+\sum \limits _{m=1}^{\infty }S_{j,m}(t), \\ I_{j}(t)&=\phi _{2,j}(t;1)=I_{j}(t^{*})+\sum \limits _{m=1}^{\infty }I_{j,m}(t), \\ R_{j}(t)&=\phi _{3,j}(t;1)=R_{j}(t^{*})+\sum \limits _{m=1}^{\infty }R_{j,m}(t), \quad \quad \quad j=1,2,...,n, \\ S_{j}(t)&=\phi _{4,j}(t;1)=A_{j}(t^{*})+\sum \limits _{m=1}^{\infty }A_{j,m}(t). \end{aligned} \end{aligned}$$
(4.6)

Define the vectors

$$\begin{aligned} \overrightarrow{S}_{j,m}(t)&= \{S_{j,0}(t),S_{j,1}(t),\ldots ,S_{j,m}(t)\},\\ \overrightarrow{I}_{j,m}(t)&= \{I_{j,0}(t),I_{j,1}(t),\ldots ,I_{j,m}(t)\},\\ \overrightarrow{R}_{j,m}(t)&= \{R_{j,0}(t),R_{j,1}(t),\ldots R_{j,m}(t)\},\\ \overrightarrow{A}_{j,m}(t)&= \{A_{j,0}(t),A_{j,1}(t),\ldots ,A_{j,m}(t)\}. \end{aligned}$$

Differentiating the zero-order deformation Eq. (4.3) \(m\) times with respective to \(q,\) then setting \(q=0\) and dividing them by \(m!\), finally using (4.5), we have the so-called high-order deformation equations

$$\begin{aligned} \begin{aligned} L[S_{j,m}(t)-\chi _{m}S_{j,m-1}(t)]&=h\text { }\mathfrak {R}_{j,m}^{1}(\overrightarrow{S}_{j,m-1}(t)), \\ L[I_{j,m}(t)-\chi _{m}I_{j,m-1}(t)]&=h\text { }\mathfrak {R}_{j,m}^{2}(\overrightarrow{I}_{j,m-1}(t)), \\ L[R_{j,m}(t)-\chi _{m}R_{j,m-1}(t)]&=h\text { }\mathfrak {R}_{j,m}^{3}(\overrightarrow{R}_{j,m-1}(t)), \\ L[A_{j,m}(t)-\chi _{m}A_{j,m-1}(t)]&=h\text { }\mathfrak {R}_{j,m}^{4}(\overrightarrow{A}_{j,m-1}(t)), \end{aligned} \end{aligned}$$
(4.7)

subject to the initial conditions

$$\begin{aligned} S_{j,m}(0)=I_{j,m}(0)=R_{j,m}(0)=A_{j,m}(0)=0, \qquad j=1,2,\ldots ,n, \qquad m=1,2,... \end{aligned}$$

where

$$\begin{aligned} \mathfrak {R}_{j,m}^{1}(\overrightarrow{S}_{j,m-1}(t))&= D^{\alpha _{1}}S_{j,m-1}(t)+\alpha _{SA}\sum \limits _{i=0}^{m-1}S_{j,i}(t)A_{j,m-i-1}(t) \nonumber \\&+\,\beta \sum \limits _{i=0}^{m-1}S_{j,i}(t)I_{j,m-i-1}(t)-\sigma R_{j,m-1}(t), \nonumber \\ \mathfrak {R}_{j,m}^{2}(\overrightarrow{I}_{j,m-1}(t))&= D^{\alpha _{2}}I_{j,m-1}(t)-\beta \sum \limits _{i=0}^{m-1}S_{j,i}(t)I_{j,m-i-1}(t) \nonumber \\&+\,\alpha _{IA}\sum \limits _{i=0}^{m-1}A_{j,i}(t)I_{j,m-i-1}(t)+\delta I_{j,m-1}(t), \nonumber \\ \mathfrak {R}_{j,m}^{3}(\overrightarrow{R}_{j,m-1}(t))&= D^{\alpha _{3}}R_{j,m-1}(t)-\delta I_{j,m-1}(t)+\sigma R_{j,m-1}(t), \\ \mathfrak {R}_{j,m}^{4}(\overrightarrow{A}_{j,m-1}(t))&= D^{\alpha _{4}}A_{j,m-1}(t)-\alpha _{SA}\sum \limits _{i=0}^{m-1}S_{j,i}(t)A_{j,m-i-1}(t) \nonumber \\&-\alpha _{IA}\sum \limits _{i=0}^{m-1}A_{j,i}(t)I_{j,m-i-1}(t)\quad \quad j =1,2,\ldots ,n, \nonumber \end{aligned}$$
(4.8)

and

$$\begin{aligned} \chi _{m}=\left\{ \begin{array}{l} 0, \quad m\le 1 \\ 1, \quad m>1 \end{array} \right. \end{aligned}$$
(4.9)

Select the auxiliary linear operator \(L=D^{\alpha _{i}},i=1,2,3,4,\) then the mth-order deformation Eq. (4.7) can be written in the form

$$\begin{aligned} \begin{aligned} S_{j,m}(t)&=\chi _{m}S_{j,m-1}(t)+h\text { }J^{\alpha _{1}}[\mathfrak {R}_{j,m}^{1}(\overrightarrow{S}_{j,m-1}(t))], \\ I_{j,m}(t)&=\chi _{m}I_{j,m-1}(t)+h\text { }J^{\alpha _{2}}[\mathfrak {R}_{j,m}^{2}(\overrightarrow{I}_{j,m-1}(t))], \\ R_{j,m}(t)&=\chi _{m}R_{j,m-1}(t)+h\text { }J^{\alpha _{3}}[\mathfrak {R}_{j,m}^{3}(\overrightarrow{R}_{j,m-1}(t))], \\ A_{j,m}(t)&=\chi _{m}A_{j,m-1}(t)+h\text { }J^{\alpha _{4}}[\mathfrak {R}_{j,m}^{4}(\overrightarrow{A}_{j,m-1}(t))], \end{aligned} \end{aligned}$$
(4.10)

The solutions of system (4.1) in each subinterval \([t_{j-1},t_{j}],~j=1,2,...,n,~\)has the form

$$\begin{aligned} \begin{aligned} s_{j}(t)&=\sum \limits _{m=0}^{\infty }S_{j,m}(t-t_{j-1}),\text { } \\ \ i_{j}(t)&=\sum \limits _{m=0}^{\infty }I_{j,m}(t-t_{j-1}), \\ r_{j}(t)&=\sum \limits _{m=0}^{\infty }R_{j,m}(t-t_{j-1}), \\ a_{j}(t)&=\sum \limits _{m=0}^{\infty }A_{j,m}(t-t_{j-1}), \quad \quad \quad j=1,2,...,n, \end{aligned} \end{aligned}$$
(4.11)

and the solution of system (4.1) for \([0,T]\) is given by

$$\begin{aligned} \begin{aligned} S(t)&=\sum \limits _{j=1}^{n}\chi _{r}s_{j}(t), \\ I(t)&=\sum \limits _{j=1}^{n}\chi _{r}i_{j}(t), \\ R(t)&=\sum \limits _{j=1}^{n}\chi _{r}r_{j}(t), \\ A(t)&=\sum \limits _{j=1}^{n}\chi _{r}a_{j}(t), \quad \quad \quad i=1,2,\ldots ,m \end{aligned} \end{aligned}$$
(4.12)

where

$$\begin{aligned} \chi _{r}=\left\{ \begin{array}{c} 1, \quad t\in [t_{j-1},t_{j}] \\ 0, \quad t\notin [t_{j-1},t_{j}] \end{array} \right. \end{aligned}$$

5 Numerical results

In this work, we carefully propose the MHAM, a reliable modification of the HAM, that improves the convergence of the series solution. The method provides immediate and visible symbolic terms of analytic solutions, as well as numerical approximate solutions to both linear and nonlinear differential equations. We apply the proposed algorithm on the interval \([0,~25]\). We choose the auxiliary parameter \(h=-1\) and divide the interval \([0,~25]\) into subintervals with time step \(\Delta t=0.1,\) and we get HAM series solution of order \(k=6\) at each subinterval. So in this case we have to satisfy the initial condition at each of the subintervals.

We consider the set of parameters values as \(\alpha _{SA}=0.025\), \(\alpha _{IA}=0.25\), \(\beta =0.1\), \(\sigma =0.8\), \(\delta =9.\) From the graphical results in Fig. 1, it can be seen the results obtained using the MHAM match the results of the RK4 very well. Figure 1 shows non-infected computers, infected computers and removed ones due to infection or not are vanish, while the noninfected computers equipped with anti-virus, in the long term, is in a good operational state. Figures 2 and 3 show the phase portrait for the classical SAIR models using the MHAM and the fourth-order RK4, which implies that the MHAM can predict the behavior of these variables accurately for the region under consideration. Figures 4 and 5 show the phase portrait for the fractional SAIR models of modified epidemiological system using the MHAM. From the numerical results in Figs. 4 and 5, it is clear that the approximate solutions depend continuously on the time-fractional derivative \(\alpha _{i},i=1,2,3,4.\)The effective dimension \(\sum \) of the system (4.1) is defined as the sum of orders \(\alpha 1+\alpha 2+\alpha 3+\alpha 4=\sum .\) Also we can see that the chaos exists in the fractional-order modified SAIR models of epidemics system with order as low as \(3.8\).

Fig. 1
figure 1

The displacement for modified epidemiological model for computer viruses when \(\alpha _{1}=\alpha _{2}=\alpha _{3}= \alpha _{4}=1\) solid line RK4 method solution, dotted line MHAM solution

Fig. 2
figure 2

Phase plot of \(S(t)\), \(I(t)\) and \(R(t)\) versus time, with \(\alpha _{1}=\alpha _{2}=\alpha _{3}=\alpha _{4}=1.\) Left MHAM, right RK4

Fig. 3
figure 3

Phase plot of \(S(t)\), \(I(t)\) and \(A(t)\) versus time, with \(\alpha _{1}=\alpha _{2}=\alpha _{3}=\alpha _{4}=1.\) Left MHAM, right RK4

Fig. 4
figure 4

Left phase plot of \(S(t)\), \(I(t)\) and \(R(t)\) versus time, with \( \alpha 1=\alpha 2=\alpha 3=\alpha 4=0.97;\) right phase plot of \(S(t)\), \(I(t)\) and \(A(t)\) versus time, with \(\alpha 1=\alpha 2=\alpha 3=\alpha 4=0.97\)

Fig. 5
figure 5

Left phase plot of \(S(t)\), \(I(t)\) and \(R(t)\) versus time, with \( \alpha _{1}=0.95,\alpha _{2}=0.96,\alpha _{3}=0.95, \alpha _{4}=0.94;\) right phase plot of \(S(t)\), \(I(t)\) and \(A(t)\) versus time, with \(\alpha _{1}=0.95,\alpha _{2}=0.96,\alpha _{3}=0.95,\alpha _{4}=0.94\)

6 Conclusions

The analytical approximations to the solutions of the modified epidemiological model for computer viruses are reliable and confirm the power and ability of the MHAM as an easy device for computing the solution of nonlinear problems. In this paper, a fractional order differential SAIR model is studied and its approximate solution is presented using a MHAM. The approximate solutions obtained by MHAM are highly accurate and valid for a long time. The reliability of the method and the reduction in the size of computational domain give this method a wider applicability. Finally, the recent appearance of nonlinear fractional differential equations as models in some fields such as models in science and engineering makes it is necessary to investigate the method of solutions for such equations. and we hope that this work is a step in this direction.