3.1 Introduction

Fractional calculus is a field of applied mathematics that deals with derivatives and integrals of arbitrary orders (including complex orders). It is also known as generalized integral and differential calculus of arbitrary order [1, 2]. In the last few decades, fractional calculus has been extensively investigated due to their broad applications in mathematics, physics, and engineering such as viscoelasticity, diffusion of a biological population, signal processing, electromagnetism, fluid mechanics, electrochemistry, and so on. Fractional differential equations are extensively used in modeling of physical phenomena in various fields of science and engineering. Fractional calculus was described by Gorenflo and Mainardi [3] as the field of mathematical analysis which deals with investigation and applications of integrals and derivatives of arbitrary order.

Fractional calculus is in use for the past 300 years ago. And many great mathematicians [2] (pure and applied) such as N. H. Abel, M. Caputo, L. Euler, J. Fourier, A. K. Grünwald, J. Hadamard, G. H. Hardy, O. Heaviside, H. J. Holmgren, P. S. Laplace, G. W. Leibniz, A. V. Letnikov, J. Liouville, B. Riemann, M. Riesz, and H. Weyl made major contributions to the theory of fractional calculus.

The history of fractional calculus was started at the end of the seventeenth century, and the birth of fractional calculus was due to a letter exchange. At that time, scientific journals did not exist and scientists exchanged their information through letters. The first conference on fractional calculus and its applications was organized in June 1974 by B. Ross and held at the University of New Haven.

In recent years, fractional calculus has become the focus of interest for many researchers in different disciplines of applied science and engineering because of the fact that realistic modeling of a physical phenomenon can be successfully achieved by using fractional calculus.

The fractional derivative has been occurring in many physical problems such as frequency-dependent damping behavior of materials, motion of a large thin plate in a Newtonian fluid, creep and relaxation functions for viscoelastic materials, the \( PI^{\lambda } D^{\mu } \) controller for the control of dynamical systems, etc. Phenomena in electromagnetics, acoustics, viscoelasticity, and electrochemistry and material science are also described by differential equations of fractional order. The solution of the differential equation containing fractional derivative is much involved.

Fractional calculus has been used to model physical and engineering processes that are found to be best described by fractional differential equations. For that reason, we need a reliable and efficient technique for the solution of fractional differential equations.

Recently, orthogonal wavelet bases are becoming more popular for numerical solutions of partial differential equations due to their excellent properties such as the ability to detect singularities, orthogonality, flexibility to represent a function at a different level of resolution and compact support. In recent years, there has been a growing interest in developing wavelet-based numerical algorithms for the solution of fractional-order partial differential equations. Among them, the Haar wavelet method is the simplest and is easy to use. Haar wavelets have been successfully applied for the solutions of ordinary and partial differential equations, integral equations, and integro-differential equations.

3.2 Outline of the Present Study

In this chapter, a numerical method based on the Haar wavelet operational method is applied to solve the Bagley–Torvik equation. In the present analysis, a new numerical technique based on Haar wavelet operational matrices of the general order of integration has been employed for the solution of fractional-order Bagley–Torvik equation. In this regard, a general procedure of obtaining this Haar wavelet operational matrix of integration \( Q^{\alpha } \) of the general order \( \alpha \) is derived. To the best information of the author, such correct general order operational matrix is not reported earlier in the open literature. In the present chapter, the Haar wavelet operational method has been applied for the numerical solution of the Bagley–Torvik equation and then compared with the analytical solution obtained by Podlubny [4].

Also, in this chapter, the fractional Fisher-type equation has been solved by using two reliable techniques, viz. Haar wavelet method and optimal homotopy asymptotic method (OHAM). Haar wavelet method is an efficient numerical method for the solution of fractional-order partial differential equation like Fisher type. The obtained results of the fractional Fisher-type equation are then compared with the optimal homotopy asymptotic method as well as with the exact solutions.

3.2.1 Fractional Dynamic Model of Bagley–Torvik Equation

Torvik and Bagley [5] derived a fractional differential equation of degree \( \alpha = \frac{3}{2} \) for the description of the motion of an immersed plate in a Newtonian fluid [6]. The motion of a rigid plate of mass m and area A connected by a massless spring of stiffness k, immersed in a Newtonian fluid, was originally proposed by Bagley and Torvik.

A rigid plate of mass m immersed into an infinite Newtonian fluid as shown in Fig. 3.1. The plate is held at a fixed point by means of a spring of stiffness k. It is assumed that the motions of spring do not influence the motion of the fluid and that the area A of the plate is very large, such that the stress–velocity relationship is valid on both sides of the plate.

Fig. 3.1
figure 1

Rigid plate of mass m immersed into a Newtonian fluid [6]

Let \( \mu \) be the viscosity and \( \rho \) be the fluid density. The displacement of the plate y is described by

$$ Ay^{{\prime \prime }} (t) + BD^{3/2} y(t) + Cy(t) = g(t),\quad y(0) = y^{{\prime }} (0) = 0 $$
(3.1)

where \( A = m,B = 2A\sqrt {\mu \rho } \), and \( C = k \).

In the present analysis, the Haar wavelet method has been applied for the numerical solution of the Bagley–Torvik equation of fractional order. Then, the obtained numerical results have been also compared with the exact solutions.

3.2.2 Generalized Time Fractional Fisher-Type Equation

The generalized time fractional Fisher’s biological population diffusion equation is given by

$$ \frac{{\partial^{\alpha } u}}{{\partial t^{\alpha } }} = \frac{{\partial^{2} u}}{{\partial x^{2} }} + F(u),\quad u\left( {x,0} \right) = \varphi (x) $$
(3.2)

where \( u\left( {x,t} \right) \) denotes the population density and \( t > 0,x \in \Re ,F(u) \) is a continuous nonlinear function satisfying the following conditions \( F(0) = F(1) = 0,F^{{\prime }} (0) > 0 > F^{{\prime }} (1) \). The derivative in Eq. (3.2) is the Caputo derivative of order \( \alpha \).

The aim of the present work is to implement Haar wavelet method and optimal homotopy asymptotic method (OHAM) in order to demonstrate the capability of these methods in handling nonlinear equations of arbitrary order so that one can apply it to various types of nonlinearity.

3.3 Haar Wavelets and the Operational Matrices

In this section, a brief survey is introduced for the Haar wavelet operational matrix method which is used to solve the fractional-order Bagley–Torvik equation and fractional Fisher-type equation. In this context, a short review of Haar wavelets and operational matrices has been discussed here.

3.3.1 Haar Wavelets

Haar functions have been used from 1910 when they were introduced by the Hungarian mathematician Alfred Haar. Haar wavelets are the simplest wavelets among various types of wavelets. They are step functions (piecewise constant functions) on the real line that can take only three values, i.e., 0, 1, and −1. We use the Haar wavelet method due to the following features, simpler and fast, flexible, convenient, small computational costs, and computationally attractive.

The Haar functions are a family of switched rectangular waveforms where amplitudes can differ from one function to another. The orthogonal set of Haar functions are defined in the interval \( [0,1) \) by

$$ \begin{aligned} h_{0} (t) & = 1 \\ h_{i} (t) & = \left\{ {\begin{array}{*{20}l} {1,} \hfill & {\frac{k - 1}{{2^{j} }} \le t < \frac{{k - \frac{1}{2}}}{{2^{j} }}} \hfill \\ { - 1,} \hfill & {\frac{{k - \frac{1}{2}}}{{2^{j} }} \le t < \frac{k}{{2^{j} }}} \hfill \\ {0,} \hfill & {\text{otherwise}} \hfill \\ \end{array} } \right. \\ \end{aligned} $$
(3.3)

where \( i = 1,2, \ldots ,m - 1 \), \( m = 2^{J} \), and J is a positive integer. j and k represent the integer decomposition of the index i, i.e., \( i = k + 2^{j} - 1 \), \( 0 \le j < i \), and \( 1 \le k < 2^{j} + 1 \).

Theoretically, this set of functions is complete. The first curve of Fig. 3.2 is that \( h_{0} (t) = 1 \) during the whole interval \( [0,1) \). It is called the scaling function. The second curve \( h_{1} (t) \) is the fundamental square wave or the mother wavelet which also spans the whole interval \( [0,1) \). All the other subsequent curves are generated from \( h_{1} (t) \) with two operations: translation and dilation. \( h_{2} (t) \) is obtained from \( h_{1} (t) \) with dilation, i.e., \( h_{1} (t) \) is compressed from the whole interval \( [0,1) \) to the half interval \( [0,1/2] \) to generate \( h_{2} (t) \) is the same as \( h_{2} (t) \) but shifted(translated) to the right by 1/2. Similarly, \( h_{2} (t) \) is compressed form a half interval to a quarter interval to generate \( h_{4} (t) \). The function \( h_{4} (t) \) s translated to the right by \( 1/4,2/4,3/4 \) to generate \( h_{5} (t) \), \( h_{6} (t) \), \( h_{7} (t) \), respectively.

Fig. 3.2
figure 2figure 2

Haar wavelet functions with \( m = 8 \)

In the construction, \( h_{0} (t) \) is called the scaling function and \( h_{1} (t) \) is the mother wavelet.

Usually, the Haar wavelets are defined for the interval \( t \in [0,1] \). In general case \( t \in [A,B] \), we divide the interval \( [A,B] \) into m equal subintervals; each of width \( \Delta t = (B - A)/m \). In this case, the orthogonal set of Haar functions are defined in the interval \( [A,\;B] \) by Saha Ray [7]

$$ \begin{aligned} h_{0} (t) & = \left\{ {\begin{array}{*{20}l} {1,} \hfill & {t \in [A,B]} \hfill \\ {0,} \hfill & {\text{elsewhere}} \hfill \\ \end{array} } \right., \\ h_{i} (t) & = \left\{ {\begin{array}{*{20}l} {1,} \hfill & {\xi_{1} (i) \le t < \xi_{2} (i)} \hfill \\ { - 1,} \hfill & {\xi_{2} (i) \le t < \xi_{3} (i)} \hfill \\ {0,} \hfill & {\text{otherwise}} \hfill \\ \end{array} } \right. \\ \end{aligned} $$
(3.4)

where

$$ \begin{aligned} \xi_{1} (i) & = A + \left( {\frac{k - 1}{{2^{j} }}} \right)(B - A) = A + \left( {\frac{k - 1}{{2^{j} }}} \right)m\Delta t, \\ \xi_{2} (i) & = A + \left( {\frac{{k - \frac{1}{2}}}{{2^{j} }}} \right)(B - A) = A + \left( {\frac{{k - \frac{1}{2}}}{{2^{j} }}} \right)m\Delta t, \\ \xi_{3} (i) & = A + \left( {\frac{k}{{2^{j} }}} \right)(B - A) = A + \left( {\frac{k}{{2^{j} }}} \right)m\Delta t, \\ \end{aligned} $$

for \( i = 1,2, \ldots ,m \), \( m = 2^{J} \), and J is a positive integer which is called the maximum level of resolution. Here, j and k represent the integer decomposition of the index i, i.e., \( i = k + 2^{j} - 1 \), \( 0 \le j < i \), and \( 1 \le k < 2^{j} + 1. \)

In the following analysis, integrals of the wavelets are defined as

$$ p_{i} (x) = \int\limits_{0}^{x} {h_{i} (x){\text{d}}x} ,\quad q_{i} (x) = \int\limits_{0}^{x} {p_{i} (x){\text{d}}x} ,\quad r_{i} (x) = \int\limits_{0}^{x} {q_{i} (x){\text{d}}x} . $$

This can be done with the aid of (3.4)

$$ p_{i} (x) = \left\{ {\begin{array}{*{20}c} {x - \xi_{1} } & {\quad \,\,{\text{for }}x \in \left[ {\xi_{1} ,\xi_{2} } \right)} \\ {\xi_{3} - x} & {\quad \,\,{\text{for }}x \in \left[ {\xi_{2} ,\xi_{3} } \right)} \\ 0 & {\text{elsewhere}} \\ \end{array} } \right. $$
(3.5)
$$ q_{i} \left( x \right) = \left\{ {\begin{array}{*{20}c} 0 & {{\text{for }}x \in \left[ {0,\xi_{1} } \right)} \\ {\frac{1}{2}\left( {x - \xi_{1} } \right)^{2} } & {\,{\text{for }}x \in \left[ {\xi_{1} ,\xi_{2} } \right)} \\ {\frac{1}{{4m^{2} }} - \frac{1}{2}\left( {\xi_{3} - x} \right)^{2} } & {\,{\text{for }}x \in \left[ {\xi_{2} ,\xi_{3} } \right)} \\ {\frac{1}{{4m^{2} }}} & {{\text{for }}x \in \left[ {\xi_{3} ,1} \right]} \\ \end{array} } \right. $$
(3.6)
$$ r_{i} \left( x \right) = \left\{ {\begin{array}{*{20}c} {\frac{1}{6}\left( {x - \xi_{1} } \right)^{3} } & {\quad {\text{for }}x \in \left[ {\xi_{1} , \, \xi_{2} } \right)} \\ {\frac{1}{{4m^{2} }}\left( {x - \xi_{2} } \right) + \frac{1}{6}\left( {\xi_{3} - x} \right)^{3} } & {\quad {\text{for }}x \in \left[ {\xi_{2} ,\xi_{3} } \right)} \\ {\frac{1}{{4m^{2} }}\left( {x - \xi_{2} } \right)} & {\quad {\text{for }}x \in \left[ {\xi_{3} ,1} \right)} \\ 0 & {\text{elsewhere}} \\ \end{array} } \right. $$
(3.7)

The collocation points are defined as

$$ x_{l} = \frac{l - 0.5}{2M},\quad l = 1,2, \ldots ,2M. $$
(3.8)

It is expedient to introduce the \( 2M \times 2M \) matrices H, P, Q, and R with the elements \( H(i,l) = h_{i} (x_{l} ) \), \( P(i,l) = p_{i} (x_{l} ) \), \( Q(i,l) = q_{i} (x_{l} ) \) and \( R(i,l) = r_{i} (x_{l} ) \), respectively.

3.3.2 Operational Matrix of the General Order Integration

In 2012, the generalized Haar wavelet operational matrix of integration has been devised first time ever by Saha Ray [7].

The integration of the \( {\mathbf{H}}_{m} (t) = [h_{0} (t),h_{1} (t), \ldots ,h_{m - 1} (t)]^{\text{T}} \) can be approximated by Chen and Hsiao [8]

$$ \int\limits_{0}^{t} {{\mathbf{H}}_{m} (\tau ){\text{d}}\tau \cong {\mathbf{QH}}_{m} (t),} $$
(3.9)

where Q is called the Haar wavelet operational matrix of integration which is a square matrix of dimension \( m \times m \).

Now, we shall derive the Haar wavelet operational matrix of the general order of integration. In this purpose, we first introduce the fractional integral of order α (>0) which is defined as Podlubny [4]

$$ J^{\alpha } f(t) = \frac{1}{{\Gamma (\alpha )}}\int\limits_{0}^{t} {(t - \tau )^{\alpha - 1} f(\tau ){\text{d}}\tau } ,\quad t > 0,\quad \alpha \in {\mathsf{R}}^{ + } $$
(3.10)

where \( {\mathsf{R}}^{ + } \) is the set of positive real numbers.

The Haar wavelet operational matrix \( Q^{\alpha } \) of integration of the general order \( \alpha \) is given by

$$ \begin{aligned} {\mathbf{Q}}^{\alpha } {\mathbf{H}}{}_{m}(t) & = J^{\alpha } {\mathbf{H}}_{m} (t) \\ & = [J^{\alpha } h_{0} (t),J^{\alpha } h_{1} (t), \ldots ,J^{\alpha } h_{m - 1} (t)]^{\text{T}} \\ & = [Qh_{0} (t),Qh_{1} (t), \ldots ,Qh_{m - 1} (t)]^{\text{T}} , \\ \end{aligned} $$

where

$$ \begin{aligned} Qh_{0} (t) & = \left\{ {\begin{array}{*{20}l} {\frac{{t^{\alpha } }}{{\Gamma (\alpha + 1)}},} \hfill & {t \in [A,B]} \hfill \\ {0,} \hfill & {\text{elsewhere}} \hfill \\ \end{array} } \right., \\ Qh_{i} (t) & = \left\{ {\begin{array}{*{20}l} {0,} \hfill & {A \le t < \xi_{1} (i)} \hfill \\ {f_{1} ,} \hfill & {\xi_{1} (i) \le t < \xi_{2} (i)} \hfill \\ {f_{2} ,} \hfill & {\xi_{2} (i) \le t < \xi_{3} (i)} \hfill \\ {f_{3} ,} \hfill & {\xi_{3} (i) \le t < B} \hfill \\ \end{array} } \right. \\ \end{aligned} $$
(3.11)

where

$$ \begin{aligned} f_{1} & = \frac{{\left( {t - \xi_{1} (i)} \right)^{\alpha } }}{{\Gamma (\alpha + 1)}}, \\ f_{2} & = \frac{{\left( {t - \xi_{1} (i)} \right)^{\alpha } }}{{\Gamma (\alpha + 1)}} - 2\frac{{\left( {t - \xi_{2} (i)} \right)^{\alpha } }}{{\Gamma (\alpha + 1)}}, \\ f_{3} & = \frac{{\left( {t - \xi_{1} (i)} \right)^{\alpha } }}{{\Gamma (\alpha + 1)}} - 2\frac{{\left( {t - \xi_{2} (i)} \right)^{\alpha } }}{{\Gamma (\alpha + 1)}} + \frac{{\left( {t - \xi_{3} (i)} \right)^{\alpha } }}{{\Gamma (\alpha + 1)}}, \\ \end{aligned} $$

for \( i = 1,2, \ldots ,m \), \( m = 2^{J} \), and J is a positive integer. Here, j and k represent the integer decomposition of the index i, i.e., \( i = k + 2^{j} - 1 \), \( 0 \le j < i \), and \( 1 \le k < 2^{j} + 1 \).

For instance, if \( m = 4 \), we have

$$ {\mathbf{Q}}^{1/2} {\mathbf{H}}_{4} = \left( {\begin{array}{*{20}c} {0.398942} & {0.690988} & {0.892062} & {1.0555} \\ {0.398942} & {0.690988} & {0.0941775} & { - 0.326475} \\ {0.398942} & { - 0.106896} & { - 0.0909723} & { - 0.0376338} \\ 0 & 0 & {0.398942} & { - 0.106896} \\ \end{array} } \right) $$
$$ {\mathbf{QH}}_{{\mathbf{4}}} = \left( {\begin{array}{*{20}c} {\frac{1}{8}} & {\frac{3}{8}} & {\frac{5}{8}} & {\frac{7}{8}} \\ {\frac{1}{8}} & {\frac{3}{8}} & {\frac{3}{8}} & {\frac{1}{8}} \\ {\frac{1}{8}} & {\frac{1}{8}} & 0 & 0 \\ 0 & 0 & {\frac{1}{8}} & {\frac{1}{8}} \\ \end{array} } \right) $$
$$ {\mathbf{Q}}^{2} {\mathbf{H}}_{4} = \left( {\begin{array}{*{20}c} {\frac{1}{128}} & {\frac{9}{128}} & {\frac{25}{128}} & {\frac{49}{128}} \\ {\frac{1}{128}} & {\frac{9}{128}} & {\frac{23}{128}} & {\frac{31}{128}} \\ {\frac{1}{128}} & {\frac{7}{128}} & {\frac{1}{16}} & {\frac{1}{16}} \\ 0 & 0 & {\frac{1}{128}} & {\frac{7}{128}} \\ \end{array} } \right) $$

Although, the learned researchers Chen and Hsiao [8], Kilicman and Zhour [9], Li and Zhao [10] and Bouafoura and Braiek [11] proposed the generalized operational matrix of integration which is an approximate matrix in nature. It is not the exact generalized operational matrix. Moreover, it has a drawback for obtaining the correct integer-order operational matrices from the generalized operational matrix.

In the present analysis, the derived Haar wavelet operational matrix of integration \( {\mathbf{Q}}^{\alpha } = ({\mathbf{Q}}^{\alpha } {\mathbf{H}})H^{ - 1} \) of the general order \( \alpha \) is the correct operational matrix. The above examples justify its correctness.

3.3.3 Function Approximation by Haar Wavelets

Any function \( f(t) \in L^{2} ([0,1)) \) can be expanded into Haar wavelets by

$$ y(t) = c_{0} h_{0} (t) + c_{1} h_{1} (t) + c_{2} h_{2} (t) + \cdots $$
(3.12)

where \( c_{j} = \int_{0}^{1} {y(t)h_{j} (t){\text{d}}t} \).

If \( y(t) \) is approximated as a piecewise constant in each subinterval, the sum in Eq. (3.12) may be terminated after m terms and consequently, we can write a discrete version in the matrix form as

$$ {\mathbf{Y}} \approx \left( {\sum\limits_{i = 0}^{m - 1} {c_{i} } h_{i} (t_{l} )} \right)_{1 \times m} = {\mathbf{C}}^{{\mathbf{T}}} {\mathbf{H}}_{m} , $$
(3.13)

where Y is the discrete form of the continuous function \( y(t) \), and \( {\mathbf{C}}^{{\mathbf{T}}} = [c_{0} ,c_{1} , \ldots ,c_{m - 1} ] \) is called the coefficient vector of Y which can be calculated from \( {\mathbf{C}}^{{\mathbf{T}}} = {\mathbf{Y}}.{\mathbf{H}}_{m}^{ - 1} \). Y and \( {\mathbf{C}}^{{\mathbf{T}}} \) are both row vectors, and \( {\mathbf{H}}_{m} \) is the Haar wavelet matrix of order \( m = 2^{J} \), J is a positive integer and is defined by \( {\mathbf{H}}_{m} = [\varvec{h}_{0} ,\varvec{h}_{1} , \ldots ,\varvec{h}_{m - 1} ]^{\text{T}} \)

i.e.,

$$ H_{m} = \left[ {\begin{array}{*{20}l} {\varvec{h}_{0} } \hfill \\ {\varvec{h}_{1} } \hfill \\ \ldots \hfill \\ {\varvec{h}_{m - 1} } \hfill \\ \end{array} } \right] = \left[ {\begin{array}{*{20}l} {h_{0,0} } \hfill & {h_{0,1} } \hfill & \ldots \hfill & {h_{0,m - 1} } \hfill \\ {h_{1,0} } \hfill & {h_{1,1} } \hfill & \ldots \hfill & {h_{1,m - 1} } \hfill \\ { \ldots .} \hfill & {} \hfill & {} \hfill & {} \hfill \\ {h_{m - 1,0} } \hfill & {h_{m - 1,1} } \hfill & \ldots \hfill & {h_{m - 1,m - 1} } \hfill \\ \end{array} } \right] $$
(3.14)

where \( \varvec{h}_{0} ,\varvec{h}_{1} , \ldots ,\varvec{h}_{m - 1} \) are the discrete form of the Haar wavelet bases; the discrete values are taken from the continuous curves \( h_{0} (t),h_{1} (t), \ldots ,h_{m - 1} (t) \), respectively.

The expansion of a given function \( f(t) \) into the Haar wavelet series is

$$ f(t) = \sum\limits_{i = 0}^{m - 1} {c_{i} h_{i} (t)} ,\quad t \in [A,B] $$
(3.15)

where \( c_{i} \) are the wavelet coefficients.

In the present paper, we apply wavelet collocation method to determine the coefficients \( c_{i} \). These collocation points are given by

$$ t_{l} = A + (l - 0.5)\Delta t,\quad l = 1,2, \ldots ,m. $$
(3.16)

The discrete version of (3.15) is

$$ f(t_{l} ) = \sum\limits_{i = 0}^{m - 1} {c_{i} h_{i} (t_{l} )} . $$
(3.17)

Equation (3.17) can be written in the matrix form as

$$ {\hat{f}}= {\mathbf{C}}^{T} {\mathbf{H}}_{m} . $$
(3.18)

where \( {\hat{f}} \) and \( C^{T} \) are m-dimensional row vectors, and \( {\mathbf{H}}_{m} \) is the Haar wavelet matrix of order m.

3.3.4 Convergence of Haar Wavelet Approximation

In this subsection, the convergence analysis for the Haar wavelet method has been employed.

Theorem 3.1

Let, \( f(x) \in L^{2} (R) \) be a continuous function defined in [0, 1). Then, the error at Jth level may be defined as

$$ E_{J} (x) = \left| {f(x) - f_{J} (x)} \right| \, = \left| {f(x) - \sum\limits_{i = 1}^{2M} {a_{i} h_{i} (x)} } \right| = \left| {\sum\limits_{i = 2M}^{\infty } {a_{i} h_{i} (x)} } \right|. $$
(3.19)

Then, the error norm at Jth level satisfies the following inequalities

$$ \left\| {E_{J} } \right\| \le \frac{{K^{2} }}{12}2^{ - 2J} , $$
(3.20)

where \( \left| {f^{{\prime }} (x)} \right| \le K \), for all \( x \in (0,\,\;1) \) and \( K > 0 \) and M is a positive number related to the Jth level resolution of the wavelet given by \( M = 2^{J} \).

Proof

The error at the Jth level of resolution is defined as

$$ \begin{aligned} \left| {E_{J} } \right| & = \left| {f(x) - f_{J} (x)} \right| \\ & = \left| {\sum\limits_{i = 2M}^{\infty } {a_{i} h_{i} (x)} } \right|, \\ \end{aligned} $$

where

$$ f_{J} (x) = \sum\limits_{i = 0}^{2M - 1} {a_{i} h_{i} (x)} ,\quad M = 2^{J} . $$
$$ \begin{aligned} \left\| {E_{J} } \right\|^{2} & = \int\limits_{ - \infty }^{\infty } {\left( {\sum\limits_{i = 2M}^{\infty } {a_{i} h_{i} (x),} \sum\limits_{l = 2M}^{\infty } {a_{l} h_{l} (x)} } \right)} {\text{d}}x \\ & = \sum\limits_{i = 2M}^{\infty } {\sum\limits_{l = 2M}^{\infty } {a_{i} a_{l} \int\limits_{ - \infty }^{\infty } {h_{i} (x)} h_{l} (x)} } {\text{d}}x \\ & \quad \le \sum\limits_{i = 2M}^{\infty } {\left| {a_{i} } \right|^{2} } . \\ \end{aligned} $$

Now, \( a_{i} = \int_{0}^{1} {2^{j/2} f(x)h(2^{j} x - k){\text{d}}x} \),

where \( h_{i} (x) = 2^{j/2} h(2^{j} x - k) \), \( k = 0,1,2, \ldots ,{\kern 1pt} 2^{j} - 1 \), \( j = 0,1, \ldots ,J \)

and

$$ h\left( {2^{j} x - k} \right) = \left\{ {\begin{array}{*{20}l} {1,} \hfill & {k2^{ - j} \le x < \left( {k + \frac{1}{2}} \right)2^{ - j} } \hfill \\ { - 1,} \hfill & {\left( {k + \frac{1}{2}} \right)2^{ - j} \le x < (k + 1)2^{ - j} } \hfill \\ {0,} \hfill & {\text{elsewhere}} \hfill \\ \end{array} } \right.. $$

Therefore, applying integral mean value theorem, we obtain

$$ \begin{aligned} a_{i} & = 2^{j/2} \left[ {\int\limits_{{k2^{ - j} }}^{{(k + \frac{1}{2})2^{ - j} }} {f(x){\text{d}}x} - \int\limits_{{(k + \frac{1}{2})2^{ - j} }}^{{(k + 1)2^{ - j} }} {f(x){\text{d}}x} } \right] \\ & = 2^{j/2} \left[ {\left( {\left( {k + \frac{1}{2}} \right)2^{ - j} - k2^{ - j} } \right)f(\xi_{1} )} \right. \\ & \quad \left. { - \left( {\left( {k + 1} \right)2^{ - j} - \left( {k + \frac{1}{2}} \right)2^{ - j} } \right)f(\xi_{2} )} \right], \\ & \quad \quad \quad \quad \quad {\text{where}}\quad \xi_{1} \in \left( {k2^{ - j} ,\left( {k + \frac{1}{2}} \right)2^{ - j} } \right){\text{ and }} \\ & \quad \quad \quad \quad \quad \quad \xi_{2} \in \left( {\left( {k + \frac{1}{2}} \right)2^{ - j} ,\left( {k + 1} \right)2^{ - j} } \right) \\ \end{aligned} $$

Consequently, applying Lagrange’s mean value theorem, we have

$$ a_{i} = 2^{{ - \frac{j}{2} - 1}} (\xi_{1} - \xi_{2} )(f^{{\prime }} (\xi )),\quad {\text{where }}\xi \in (\xi_{1} ,\xi_{2} ). $$

This implies that

$$ \begin{aligned} a_{i}^{2} & = 2^{ - j - 2} (\xi_{2} - \xi_{1} )^{2} f^{{\prime }} (\xi )^{2} \\ & \quad \le 2^{ - j - 2} 2^{ - 2j} K^{2} ,\quad {\text{since }}\left| {f^{{\prime }} (x)} \right| \le K \\ & = 2^{ - 3j - 2} K^{2} . \\ \end{aligned} $$

Therefore,

$$ \begin{aligned} \left\| {E_{J} } \right\|^{2} & \le \sum\limits_{i = 2M}^{\infty } {a_{i}^{2} \le \sum\limits_{i = 2M}^{\infty } {2^{ - 3j - 2} K^{2} } } \\ & = K^{2} \sum\limits_{j = J + 1}^{\infty } {\sum\limits_{{i = 2^{j} }}^{{2^{j + 1} - 1}} {2^{ - 3j - 2} } } \\ & = K^{2} \sum\limits_{j = J + 1}^{\infty } {2^{ - 3j - 2} \left( {2^{j + 1} - 1 - 2^{j} + 1} \right)} \\ & = K^{2} \sum\limits_{j = J + 1}^{\infty } {(2^{ - 2j - 1} - 2^{ - 2j - 2} )} \\ & = K^{2} \sum\limits_{j = J + 1}^{\infty } {2^{ - 2j} (2^{ - 1} - 2^{ - 2} )} \\ & = \frac{{K^{2} }}{4}\sum\limits_{j = J + 1}^{\infty } {2^{ - 2j} } \\ & = \frac{{K^{2} }}{4}\frac{{2^{ - 2(J + 1)} }}{{\left( {1 - \frac{1}{4}} \right)}} \\ & = \frac{{K^{2} }}{12}2^{ - 2J} . \\ \end{aligned} $$
(3.21)

From the above Eq. (3.21), it is obvious that the error bound is inversely proportional to the level of resolution J of Haar wavelet. Hence, the accuracy in the wavelet method improves as we increase the level of resolution J.

3.4 Basic Idea of Optimal Homotopy Asymptotic Method

To illustrate the basic ideas of optimal homotopy asymptotic method, we consider the following nonlinear differential equation

$$ A\left( {u\left( {x,t} \right)} \right) + g\left( {x,t} \right) = 0,x \in\Omega $$
(3.22)

with the boundary conditions

$$ B\left( {u,\frac{\partial u}{\partial t}} \right) = 0,x \in\Gamma $$
(3.23)

where A is a differential operator, B is a boundary operator, \( u\left( {x,t} \right) \) is an unknown function, Γ is the boundary of the domain Ω, and \( g\left( {x,t} \right) \) is a known analytic function.

The operator A can be decomposed as

$$ A = L + N, $$
(3.24)

where L is a linear operator, and N is a nonlinear operator.

We construct a homotopy \( \varphi \left( {x,t;p} \right) :\,\Omega \times \left[ {0,1} \right] \to \Re \) which satisfies

$$ \begin{aligned} H\left( {\varphi \left( {x,t;p} \right),p} \right) & = \left( {1 - p} \right)\left[ {L\left( {\varphi \left( {x,t;p} \right)} \right) + g\left( {x,t} \right)} \right] \\ & \quad - H(p)\left[ {A\left( {\varphi \left( {x,t;p} \right)} \right) + g\left( {x,t} \right)} \right] = 0, \\ \end{aligned} $$
(3.25)

where \( p \in \left[ {0,1} \right] \) is an embedding parameter, and \( H(p) \) is a nonzero auxiliary function for \( p \ne 0 \) and \( H(0) = 0 \). When \( p = 0 \) and \( p = 1 \), we have \( \varphi \left( {x,t;0} \right) = u_{0} \left( {x,t} \right) \) and \( \varphi \left( {x,t;1} \right) = u\left( {x,t} \right) \), respectively.

Thus as p varies from 0 to 1, the solution \( \varphi \left( {x,t;p} \right) \) approaches from \( u_{0} \left( {x,t} \right) \) to \( u\left( {x,t} \right) \).

Here \( u_{0} \left( {x,t} \right) \) is obtained from Eqs. (3.25) and (3.23) with \( p = 0 \) yields

$$ L\left( {\varphi \left( {x,t;0} \right)} \right) + g\left( {x,t} \right) = 0,\quad B\left( {u_{0} ,\frac{{\partial u_{0} }}{\partial t}} \right) = 0. $$
(3.26)

The auxiliary function \( H(p) \) is chosen in the form

$$ H(p) = pC_{1} + p^{2} C_{2} + p^{3} C_{3} + \cdots , $$
(3.27)

where \( C_{1} ,C_{2} ,C_{3} , \ldots \) are constants to be determined. To get an approximate solution, \( \tilde{\varphi }\left( {x,t;p,C_{1} ,C_{2} ,C_{3} , \ldots } \right) \) is expanded in a series about p as

$$ \tilde{\varphi }\left( {x,t;p,C_{1} ,C_{2} ,C_{3} , \ldots } \right) = u_{0} \left( {x,t} \right) + \sum\limits_{i = 1}^{\infty } {u_{i} \left( {x,t,C_{1} ,C_{2} ,C_{3} , \ldots } \right)p^{i} } . $$
(3.28)

Substituting Eq. (3.28) in Eq. (3.25) and equating the coefficients of like powers of p, we will have the following equations

$$ L\left( {u_{1} \left( {x,t} \right) + g\left( {x,t} \right)} \right) = C_{1} N_{0} \left( {u_{0} \left( {x,t} \right)} \right),\quad B\left( {u_{1} ,\frac{{\partial u_{1} }}{\partial t}} \right) = 0. $$
(3.29)
$$ \begin{aligned} & L\left( {u_{2} \left( {x,t} \right)} \right) - L\left( {u_{1} \left( {x,t} \right)} \right) = C_{2} N_{0} \left( {u_{0} \left( {x,t} \right)} \right) \\ & \quad + C_{1} \left( {L\left( {u_{1} \left( {x,t} \right)} \right) + N_{1} \left( {u_{0} \left( {x,t} \right),u_{1} \left( {x,t} \right)} \right)} \right),B\left( {u_{2} ,\frac{{\partial u_{2} }}{\partial t}} \right) = 0. \\ \end{aligned} $$
(3.30)

and hence, the general governing equations for \( u_{j} \left( {x,t} \right) \) is given by

$$ \begin{aligned} L\left( {u_{j} \left( {x,t} \right)} \right) & = L\left( {u_{j - 1} \left( {x,t} \right)} \right) + C_{j} N_{0} \left( {u_{0} \left( {x,t} \right)} \right) \\ & \quad + \sum\limits_{i = 1}^{j - 1} {C_{i} \left[ {L\left( {u_{j - 1} \left( {x,t} \right)} \right) + N_{j - 1} \left( {u_{0} \left( {x,t} \right), \ldots , { }u_{j - 1} \left( {x,t} \right)} \right)} \right]} ; \\ j & = 2, 3 ,\ldots \\ \end{aligned} $$
(3.31)

where \( N_{j} \left( {u_{0} \left( {x,t} \right), \ldots ,u_{j} \left( {x,t} \right)} \right) \) is the coefficient of \( p^{j} \) in the expansion of \( N\left( {\varphi \left( {x,t;p} \right)} \right) \) about the embedding parameter p and

$$ N\left( {\varphi \left( {x,t;p,C_{1} ,C_{2} ,C_{3} , \ldots } \right)} \right) = N_{0} \left( {u_{0} \left( {x,t} \right)} \right) + \sum\limits_{j = 1}^{\infty } {N_{j} \left( {u_{0} ,u_{1} , \ldots ,u_{j} } \right)} p^{j} . $$
(3.32)

It is observed that the convergence of the series (3.28) depends upon the auxiliary constants \( C_{1} ,C_{2} ,C_{3} , \ldots \).

The approximate solution of Eq. (3.22) can be written in the following form

$$ \tilde{u}\left( {x,t;C_{1} ,C_{2} ,C_{3} , \ldots } \right) = u_{0} \left( {x,t} \right) + \sum\limits_{j = 1}^{n - 1} {u_{j} \left( {x,t,C_{1} ,C_{2} ,C_{3} , \ldots } \right)} . $$
(3.33)

Substituting Eq. (3.33) in Eq. (3.22), we get the following expression for the residual

$$ \begin{aligned} R_{n} \left( {x,t;C_{1} ,C_{2} ,C_{3} , \ldots } \right) & = L\left( {\tilde{u}\left( {x,t;C_{1} ,C_{2} ,C_{3} , \ldots } \right)} \right) \\ & \quad + N\left( {\tilde{u}\left( {x,t;C_{1} ,C_{2} ,C_{3} , \ldots } \right)} \right) + g\left( {x,t} \right). \\ \end{aligned} $$
(3.34)

If \( R_{n} \left( {x,t;C_{1} ,C_{2} ,C_{3} , \ldots } \right) = 0 \), then \( \tilde{u}\left( {x,t;C_{1} ,C_{2} ,C_{3} , \ldots } \right) \) is the exact solution. Generally, such case does not arise for nonlinear problems. The nth-order approximate solution given by Eq. (3.33) depends on the auxiliary constants \( C_{1} ,C_{2} ,C_{3} , \ldots \), and these constants can be optimally determined by various methods. Here, we apply the collocation method.

According to the collocation method, the optimal values of the constants \( C_{1} ,C_{2} ,C_{3} , \ldots \) can be obtained by solving the following system of equations:

$$ R_{n} \left( {x_{i} ,t_{j} ;C_{1} ,C_{2} ,C_{3} , \ldots ,C_{{k^{2} }} } \right) = 0,\quad {\text{for }}i = 1,2, \ldots ,k{\text{ and }}j = 1,2, \ldots ,k $$
(3.35)

After obtaining the optimal values of the convergence control constants \( C_{1} ,C_{2} ,C_{3} , \ldots \) by the above-mentioned method, the approximate solution of Eq. (3.22) is well determined.

3.5 Application of Haar Wavelet Method for the Numerical Solution of Bagley–Torvik Equation

In the present analysis, we are using the operational matrix of Haar wavelet for finding the numerical solution of Bagley–Torvik Equation, which arises, for instance, in modeling the motion of a rigid plate immersed in a Newtonian fluid.

Let us consider the Bagley–Torvik equation [4]

$$ Ay^{{\prime \prime }} (t) + BD^{3/2} y(t) + Cy(t) = f(t),t > 0 $$
(3.36)

where

$$ f(t) = \left\{ {\begin{array}{*{20}l} {8,} \hfill & {0 \le t \le 1} \hfill \\ {0,} \hfill & {t > 1} \hfill \\ \end{array} } \right. $$

subject to initial conditions

$$ y(0) = y^{{\prime }} (0) = 0. $$

The Haar wavelet solution is sought in the form

$$ y(t) = \sum\limits_{i = 0}^{m - 1} {c_{i} h_{i} (t)} , $$
(3.37)

which can be written in the matrix form as

$$ y(t_{l} ) = C^{T} H_{m} (t_{l} ), $$
(3.38)

where \( t_{l} \) is the collocation points in Eq. (2.7), \( C^{T} \) is the m-dimensional row vector, and \( H_{m} (t_{l} ) \) is the Haar wavelet square matrix of order m.

Integrating Eq. (3.36), we get

$$ A\int\limits_{0}^{t} {\int\limits_{0}^{t} {D^{2} } y(t){\text{d}}t\,{\text{d}}t} + B\int\limits_{0}^{t} {\int\limits_{0}^{t} {D^{3/2} y(t){\text{d}}t\,{\text{d}}t + C} } \int\limits_{0}^{t} {\int\limits_{0}^{t} {y(t)} } {\text{d}}t\,{\text{d}}t = \int\limits_{0}^{t} {\int\limits_{0}^{t} {f(t)} {\text{d}}t\,{\text{d}}t} . $$

This implies

$$ A\left[ {y(t) - y(0) - t\,y^{{\prime }} (0)} \right] + BJ^{1/2} y(t) + C\int\limits_{0}^{t} {\int\limits_{0}^{t} {y(t)} } {\text{d}}t\,{\text{d}}t = \int\limits_{0}^{t} {\int\limits_{0}^{t} {f(t)} {\text{d}}t\,{\text{d}}t} . $$

Substituting the initial conditions, we obtain

$$ Ay(t) + BJ^{1/2} y(t) + C\int\limits_{0}^{t} {\int\limits_{0}^{t} {y(t)} } {\text{d}}t\,{\text{d}}t = \int\limits_{0}^{t} {\int\limits_{0}^{t} {f(t)} {\text{d}}t\,{\text{d}}t} . $$
(3.39)

Now, expressing Eq. (3.38) into the discrete matrix form, we obtain

$$ AC^{T} H_{m} (t_{l} ) + BC^{T} Q^{1/2} H_{m} (t_{l} ) + CC^{T} Q^{2} H_{m} (t_{l} ) = EH_{m}^{ - 1} (t_{l} )Q^{2} H_{m} (t_{l} ). $$
(3.40)

Since, \( \int_{0}^{t} {\int_{0}^{t} {f ( {\text{t)d}}t\,{\text{d}}t \cong c^{T} Q^{2} H_{m} (t)} } \), where \( c^{T} = EH_{m}^{ - 1} (t) \) and E is the discrete form of the function \( f(t_{l} ) = 8\left( {u(t_{l} ) - u\left( {t_{l} - 1} \right)} \right) \), where \( u(t) \) is the Heaviside step function, for Eq. (3.36).

From Eq. (3.40), we have

$$ C^{T} \left( {AH_{m} (t_{l} ) + BQ^{1/2} H_{m} (t_{l} ) + CQ^{2} H_{m} (t_{l} )} \right) = EH_{m}^{ - 1} (t_{l} )Q^{2} H_{m} (t_{l} ). $$
(3.41)

Solving Eq. (3.41) for the coefficient row vector \( C^{T} \), we get

$$ C^{T} = EH_{m}^{ - 1} (t_{l} )Q^{2} H_{m} (t_{l} )\left( {AH_{m} (t_{l} ) + BQ^{1/2} H_{m} (t_{l} ) + CQ^{2} H_{m} (t_{l} )} \right)^{ - 1} . $$
(3.42)

Using Eq. (3.38), the Haar wavelet numerical solution is obtained as

$$ y(t_{l} ) = EH_{m}^{ - 1} (t_{l} )Q^{2} H_{m} (t_{l} )\left( {AH_{m} (t_{l} ) + BQ^{1/2} H_{m} (t_{l} ) + CQ^{2} H_{m} (t_{l} )} \right)^{ - 1} H_{m} (t_{l} ). $$
(3.43)

Now, the analytical solution of Eq. (3.36) is [4]

$$ y(t) = \int\limits_{0}^{t} {G_{3} } (t - \tau )f(\tau ){\text{d}}\tau , $$
(3.44)

where \( G_{3} \left( t \right) = \frac{1}{A}\sum\nolimits_{r = 0}^{\infty } {\frac{{\left( { - 1} \right)^{r} }}{r!}\left( {\frac{C}{A}} \right)^{r} t^{2r + 1} E_{{\frac{1}{2},\frac{3}{2}r + 2}}^{\left( r \right)} \left( {\frac{ - B}{A}t^{1/2} } \right)} \), \( E_{\lambda ,\mu } (z) \) is called the Mittag–Leffler function in two parameters \( \lambda ,\mu \) (>0) [4] and

$$ E_{\lambda ,\mu }^{(r)} (y) \equiv \frac{{{\text{d}}^{r} }}{{{\text{d}}y^{r} }}E_{\lambda ,\mu } (y) = \sum\limits_{j = 0}^{\infty } {\frac{{\left( {j + r} \right)!y^{j} }}{{j!\Gamma \left( {\lambda j + \lambda r + \mu } \right)}}} ,\quad \left( {r = 0,1,2, \ldots } \right) $$

Then, Eq. (3.44) is reduced to

$$ y(t) = 8\left[ {y_{U} (t) - y_{U} (t - 1)} \right],\quad {\text{if }}f(t) = 8\left( {u(t) - u\left( {t - 1} \right)} \right) $$
(3.45)

where

$$ y_{U} (t) = u(t)\left[ {\frac{1}{A}\sum\limits_{r = 0}^{\infty } {\frac{{\left( { - 1} \right)^{r} }}{r!}\left( {\frac{C}{A}} \right)^{r} t^{{2\left( {r + 1} \right)}} E_{{\frac{1}{2},\frac{3}{2}r + 3}}^{(r)} \left( {\frac{ - B}{A}t^{1/2} } \right)} } \right]. $$

The solution (3.45) is the analytical solution of Eq. (3.36).

3.5.1 Numerical Results and Discussions

In the present numerical computation, we have assumed \( A = 1 \), \( B = 0.5 \), and \( C = 0.5 \), as is taken in [4]. It is interesting to note that the graph obtained by Haar wavelet operation method almost coincides with that of [4] cited in Fig. 3.3.

Fig. 3.3
figure 3

Numerical solution yapp(t) and analytical exact solution yext(t) of Bagley–Torvik equation (black line for yapp(t) and dash line for yext(t))

Equations (3.43) and (3.45) have been used to draw the graphs as shown in Fig. 3.3. In Fig. 3.3, yapp(t) and yext(t) specify Haar wavelet numerical solution and analytical exact solution of Bagley–Torvik equation, respectively.

To have a comparison of the present analysis through Haar wavelet operational method with that of another available method [4], Table 3.1 creates to cite the absolute errors at the collocation points given by Eq. (3.16).

Table 3.1 Absolute error between numerical solution and analytical exact solution

The R.M.S. error between the numerical solution and the exact solution is 0.204029. The above numerical experiments presented in this section were computed using Mathematica 7 [12].

3.5.2 Error Estimate

The following table demonstrates the comparison between the numerical solution obtained by Haar wavelet and the analytical solution. The corresponding absolute errors are presented in Table 3.2.

Table 3.2 Comparison of error between the numerical solution and analytical exact solution for \( t = 0,1,2, \ldots ,10 \)

3.6 Solution of Fractional Fisher-Type Equation

In this section, the time fractional Fisher-type equation has been solved by reliable methods, namely the Haar wavelet method and OHAM, respectively.

3.6.1 Application of Haar Wavelet to Fractional Fisher-Type Equation

Consider the nonlinear diffusion equation of the Fisher type [13, 14]

$$ \frac{{\partial^{\alpha } u}}{{\partial t^{\alpha } }} = \frac{{\partial^{2} u}}{{\partial x^{2} }} + u\left( {1 - u} \right)\left( {u - a} \right), $$
(3.46)

where \( 0 < \alpha \le 1 \), \( 0 \le x \le 1 \), and \( 0 < a < 1 \)

with the initial condition

$$ u\left( {x,0} \right) = \frac{1}{{1 + {\text{Exp}}\left[ { - \left( {\frac{1}{\sqrt 2 }} \right)x} \right]}}. $$
(3.47)

When \( \alpha = 1 \), the exact solution of Eq. (3.46) is given by Wazwaz and Gorguis [15], Liu [16]

$$ u\left( {x,t} \right) = \frac{1}{{1 + {\text{Exp}}\left[ { - \left( {\frac{x + ct}{\sqrt 2 }} \right)} \right]}}, $$
(3.48)

where \( c = \sqrt 2 \left( {\frac{1}{2} - a} \right) \).

Let us divide both space and time interval [0, 1] into m equal subintervals; each of width \( \Delta = \frac{1}{m} \).

Haar wavelet solution of \( u\left( {x,t} \right) \) is sought by assuming that \( \frac{{\partial^{2} u\left( {x,t} \right)}}{{\partial x^{2} }} \) can be expanded in terms of Haar wavelets as

$$ \frac{{\partial^{2} u\left( {x,t} \right)}}{{\partial x^{2} }} = \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} h_{i} (x)} h_{j} (t)} . $$
(3.49)

Integrating Eq. (3.49) twice w.r.t. x from 0 to x, we get

$$ u\left( {x,t} \right) = \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} Q^{2} h_{i} (x)} h_{j} (t)} + q(t) + xp(t). $$
(3.50)

Putting \( x = 0, \) in Eq. (3.50), we get

$$ q(t) = u\left( {0,t} \right). $$
(3.51)

Putting \( x = 1 \), in Eq. (3.50) we get

$$ p(t) = u\left( {1,t} \right) - u\left( {0,t} \right) - \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} \left[ {Q^{2} h_{i} (x)} \right]_{x = 1} } h_{j} (t)} . $$
(3.52)

Again \( q(t) + xp(t) \) can be approximated using Haar wavelet function as

$$ q(t) + xp(t) = \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {r_{ij} h_{i} (x)} h_{j} (t)} . $$
(3.53)

This implies

$$ \begin{aligned} u\left( {0,t} \right) & + x\left[ {u\left( {1,t} \right) - u\left( {0,t} \right) - \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} \left[ {Q^{2} h_{i} (x)} \right]_{x = 1} } h_{j} (t)} } \right] \\ & \quad = \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {r_{ij} h_{i} (x)} h_{j} (t)} . \\ \end{aligned} $$
(3.54)

Substituting Eq. (3.53) in Eq. (3.50), we get

$$ u\left( {x,t} \right) = \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} Q^{2} h_{i} (x)} h_{j} (t)} + \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {r_{ij} h_{i} (x)} h_{j} (t)} . $$
(3.55)

The nonlinear term presented in Eq. (3.46) can be approximated using Haar wavelet function as

$$ u\left( {1 - u} \right)\left( {u - a} \right) = \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {d_{ij} h_{i} (x)} h_{j} (t)} . $$
(3.56)

Therefore,

$$ \begin{aligned} & \left( {\sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} Q^{2} h_{i} (x)} h_{j} (t)} + \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {r_{ij} h_{i} (x)} h_{j} (t)} } \right) \\ & \left( {1 - \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} Q^{2} h_{i} (x)} h_{j} (t)} + \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {r_{ij} h_{i} (x)} h_{j} (t)} } \right) \\ & \left( {\sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} Q^{2} h_{i} (x)} h_{j} (t)} + \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {r_{ij} h_{i} (x)} h_{j} (t)} - a} \right) = \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {d_{ij} h_{i} (x)} h_{j} (t)} \\ \end{aligned} $$
(3.57)

Substituting Eqs. (3.49) and (3.56) in Eq. (3.46), we will have

$$ \frac{{\partial^{\alpha } u}}{{\partial t^{\alpha } }} = \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} h_{i} (x)} h_{j} (t)} + \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {d_{ij} h_{i} (x)} h_{j} (t)} \, . $$
(3.58)

Now applying \( J^{\alpha } \) to both sides of Eq. (3.58) yields

$$ u\left( {x,t} \right) - u\left( {x,0} \right) = J_{t}^{\alpha } \left( {\sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} h_{i} (x)} h_{j} (t)} } \right) + J_{t}^{\alpha } \left( {\sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {d_{ij} h_{i} (x)} h_{j} (t)} } \right). $$
(3.59)

Substituting Eq. (8.44) and Eq. (3.55) in Eq. (3.59), we get

$$ \begin{aligned} \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} Q^{2} h_{i} (x)} h_{j} (t)} & + \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {r_{ij} h_{i} (x)} h_{j} (t)} \\ & - \frac{1}{{1 + {\text{e}}^{{ - \left( {\frac{1}{\sqrt 2 }} \right)x}} }} = \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {c_{ij} h_{i} (x)} Q_{t}^{\alpha } h_{j} (t)} \\ & \quad + \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{m} {d_{ij} h_{i} (x)} Q_{t}^{\alpha } h_{j} (t)} . \\ \end{aligned} $$
(3.60)

Now substituting the collocation points \( x_{l} = \frac{l - 0.5}{m} \) and \( t_{k} = \frac{k - 0.5}{m} \) for \( l,k = 1,2, \ldots ,m \) in Eqs. (3.54), (3.57), and (3.60), we have \( 3m^{2} \) equations in \( 3m^{2} \) unknowns in \( c_{ij} \), \( r_{ij} \), and \( d_{ij} \). By solving this system of equations using mathematical software, the Haar wavelet coefficients \( c_{ij} \), \( r_{ij} \), and \( d_{ij} \) can be obtained.

3.6.2 Application of OHAM to Fractional Fisher-Type Equation

Using the optimal homotopy asymptotic method, the homotopy for Eq. (3.46) can be written as

$$ \begin{aligned} \left( {1 - p} \right)\frac{{\partial^{\alpha } \varphi \left( {x,t;p} \right)}}{{\partial t^{\alpha } }} & = H(p)\left[ {\frac{{\partial^{\alpha } \varphi \left( {x,t;p} \right)}}{{\partial t^{\alpha } }} - \frac{{\partial^{2} \varphi \left( {x,t;p} \right)}}{{\partial x^{2} }}} \right. \\ & \quad \left. { - \varphi \left( {x,t;p} \right)\left[ {1 - \varphi \left( {x,t;p} \right)} \right]\left[ {\varphi \left( {x,t;p} \right) - a} \right]} \right] \\ \end{aligned} $$
(3.61)

Here,

$$ \varphi \left( {x,t;p} \right) = u_{0} \left( {x,t} \right) + \sum\limits_{i = 1}^{\infty } {u_{i} \left( {x,t} \right)p^{i} } , $$
(3.62)
$$ H(p) = pC_{1} + p^{2} C_{2} + p^{3} C_{3} + \cdots , $$
(3.63)
$$ N\left( {\varphi \left( {x,t;p} \right)} \right) = N_{0} \left( {u_{0} \left( {x,t} \right)} \right) + \sum\limits_{k = 1}^{\infty } {N_{k} \left( {u_{0} ,u_{1} , \ldots ,u_{k} } \right)} p^{k} . $$
(3.64)

Substituting Eqs. (3.62)–(3.64) in Eq. (3.61) and equating the coefficients of like powers of p, we have the following system of partial differential equations.

Coefficients of \( p^{0} \):

$$ \frac{{\partial^{\alpha } u_{0} \left( {x,t} \right)}}{{\partial t^{\alpha } }} = 0. $$
(3.65)

Coefficients of \( p^{1} \):

$$ \begin{aligned} \frac{{\partial^{\alpha } u_{1} \left( {x,t} \right)}}{{\partial t^{\alpha } }} - \frac{{\partial^{\alpha } u_{0} \left( {x,t} \right)}}{{\partial t^{\alpha } }} & = C_{1} \left[ {\frac{{\partial^{\alpha } u_{0} \left( {x,t} \right)}}{{\partial t^{\alpha } }} - \frac{{\partial^{2} u_{0} \left( {x,t} \right)}}{{\partial x^{2} }}} \right. \\ & \left. {\quad + au_{0} \left( {x,t} \right) - \left( {u_{0} \left( {x,t} \right)} \right)^{2} \left( {1 + a} \right) + \left( {u_{0} \left( {x,t} \right)} \right)^{3} } \right] \\ \end{aligned} $$
(3.66)

Coefficients of \( p^{2} \):

$$ \begin{aligned} \frac{{\partial^{\alpha } u_{2} \left( {x,t} \right)}}{{\partial t^{\alpha } }} - \frac{{\partial^{\alpha } u_{1} \left( {x,t} \right)}}{{\partial t^{\alpha } }} & = C_{1} \left[ {\frac{{\partial^{\alpha } u_{1} \left( {x,t} \right)}}{{\partial t^{\alpha } }} - \frac{{\partial^{2} u_{1} \left( {x,t} \right)}}{{\partial x^{2} }} + au_{1} \left( {x,t} \right)} \right. \\ & \quad \left. { - 2u_{0} \left( {x,t} \right)u_{1} \left( {x,t} \right)\left( {1 + a} \right) + 3\left( {u_{0} \left( {x,t} \right)} \right)^{2} u_{1} \left( {x,t} \right)} \right] \\ & \quad + C_{2} \left[ {\frac{{\partial^{\alpha } u_{0} \left( {x,t} \right)}}{{\partial t^{\alpha } }} - \frac{{\partial^{2} u_{0} \left( {x,t} \right)}}{{\partial x^{2} }}} \right. \\ & \quad \left. { + au_{0} \left( {x,t} \right) - \left( {u_{0} \left( {x,t} \right)} \right)^{2} \left( {1 + a} \right) + \left( {u_{0} \left( {x,t} \right)} \right)^{3} } \right] \\ \end{aligned} $$
(3.67)

and so on.

For solving fractional Fisher-type equation using OHAM, we consider the initial condition Eq. (3.47) and solving Eqs. (3.65)–(3.67), we obtain

$$ u_{0} \left( {x,t} \right) = \frac{1}{{1 + {\text{Exp}}\left[ { - \left( {\frac{1}{\sqrt 2 }} \right)x} \right]}}, $$
(3.68)
$$ u_{1} \left( {x,t} \right) = \, \frac{{C_{1} \left( {2a - 1} \right){\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]t^{\alpha } }}{{2\left( {1 + {\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]} \right)^{2}\Gamma \left( {1 + \alpha } \right)}}{ ,} $$
(3.69)
$$ \begin{aligned} u_{2} \left( {x,t} \right) & = u_{1} \left( {x,t} \right) + \, C_{1} \left[ {u_{1} \left( {x,t} \right) - \frac{{C_{1} \left( {2a - 1} \right){\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]\left( {1 - 4{\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right] + {\text{Exp}}\left[ {\sqrt 2 x} \right]} \right)t^{2\alpha } }}{{4\left( {1 + {\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]} \right)^{4}\Gamma \left( {1 + 2\alpha } \right)}}} \right. \\ & \quad + \frac{{aC_{1} \left( {2a - 1} \right){\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]t^{2\alpha } }}{{2\left( {1 + {\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]} \right)^{2}\Gamma \left( {1 + 2\alpha } \right)}} - \frac{{\left( {1 + a} \right)C_{1} \left( {2a - 1} \right){\text{Exp}}\left[ {\sqrt 2 x} \right]t^{2\alpha } }}{{\left( {1 + {\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]} \right)^{3}\Gamma \left( {1 + 2\alpha } \right)}} \\ & \quad \left. { + \frac{{3C_{1} \left( {2a - 1} \right){\text{Exp}}\left[ {\frac{3x}{\sqrt 2 }} \right]t^{2\alpha } }}{{2\left( {1 + {\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]} \right)^{4}\Gamma \left( {1 + 2\alpha } \right)}}} \right] \\ & \quad + C_{2} \left[ { - \frac{{\partial^{2} u_{0} \left( {x,t} \right)}}{{\partial x^{2} }} + au_{0} \left( {x,t} \right) - \left( {u_{0} \left( {x,t} \right)} \right)^{2} \left( {1 + a} \right) + \left( {u_{0} \left( {x,t} \right)} \right)^{3} } \right]\frac{{t^{\alpha } }}{{\Gamma \left( {1 + \alpha } \right)}} \\ \end{aligned} $$
(3.70)

Using Eqs. (3.68)–(3.70) and consequently substituting in Eq. (3.33), the second-order approximate solution is obtained as follows

$$ \begin{aligned} u\left( {x,t} \right) & = \frac{1}{{1 + {\text{Exp}}\left[ { - \left( {\frac{1}{\sqrt 2 }} \right)x} \right]}} + \frac{{C_{1} \left( {2a - 1} \right){\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]t^{\alpha } }}{{2\left( {1 + {\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]} \right)^{2}\Gamma \left( {1 + \alpha } \right)}} + u_{1} \left( {x,t} \right) \\ & \quad + \, C_{1} \left[ {u_{1} \left( {x,t} \right) - \frac{{C_{1} \left( {2a - 1} \right){\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]\left( {1 - 4{\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right] + {\text{Exp}}\left[ {\sqrt 2 x} \right]} \right)t^{2\alpha } }}{{4\left( {1 + {\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]} \right)^{4}\Gamma \left( {1 + 2\alpha } \right)}}} \right. \\ & \quad + \frac{{aC_{1} \left( {2a - 1} \right){\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]t^{2\alpha } }}{{2\left( {1 + {\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]} \right)^{2}\Gamma \left( {1 + 2\alpha } \right)}} \\ & \quad \left. { - \frac{{\left( {1 + a} \right)C_{1} \left( {2a - 1} \right){\text{Exp}}\left[ {\sqrt 2 x} \right]t^{2\alpha } }}{{\left( {1 + {\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]} \right)^{3}\Gamma \left( {1 + 2\alpha } \right)}} + \frac{{3C_{1} \left( {2a - 1} \right){\text{Exp}}\left[ {\frac{3x}{\sqrt 2 }} \right]t^{2\alpha } }}{{2\left( {1 + {\text{Exp}}\left[ {\frac{x}{\sqrt 2 }} \right]} \right)^{4}\Gamma \left( {1 + 2\alpha } \right)}}} \right] + C_{2} \frac{{t^{\alpha } }}{{\Gamma \left( {1 + \alpha } \right)}} \\ & \quad \left[ { - \frac{{\partial^{2} u_{0} \left( {x,t} \right)}}{{\partial x^{2} }} + au_{0} \left( {x,t} \right) - \left( {u_{0} \left( {x,t} \right)} \right)^{2} \left( {1 + a} \right) + \left( {u_{0} \left( {x,t} \right)} \right)^{3} } \right] \\ \end{aligned} $$
(3.71)

The optimal values of the convergence control constants \( C_{1} {\text{ and }}C_{2} \) can be obtained using the collocation method from Eq. (3.35).

3.6.3 Numerical Results and Discussion

Table 3.3 shows the comparison of the approximate solutions of fractional Fisher-type Eq. (3.46) obtained by using the Haar wavelet method and OHAM at different values of x and t. Tables 3.4, 3.5, and 3.6 exhibit the comparison of approximate solutions obtained by Haar wavelet method and OHAM for fractional Fisher-type Eq. (3.46). The obtained results in Tables 3.3, 3.4, 3.5, and 3.6 demonstrate that these methods are well suited for solving fractional Fisher-type equation. Table 3.7 exhibits the \( L_{2} {\text{ and }}L_{\infty } \) error norm for fractional Fisher-type equation at different values of t and \( \alpha = 1 \). It can be easily observed from Table 3.7 that the solutions obtained by OHAM are more accurate than that of the Haar wavelet method.

Table 3.3 Absolute errors in the solution of fractional Fisher-type Eq. (3.46) using the Haar wavelet method and second-order OHAM at various points of x and t for \( \alpha = 1 \)
Table 3.4 Approximate solutions of fractional Fisher-type Eq. (3.46) using the Haar wavelet method and second-order OHAM at various points of x and t for \( \alpha = 0.75 \)
Table 3.5 Approximate solutions of fractional Fisher-type Eq. (3.46) using the Haar wavelet method and three terms for second-order OHAM at various points of x and t for \( \alpha = 0.5 \)
Table 3.6 Approximate solutions of fractional Fisher-type Eq. (8.1) using the Haar wavelet method and three terms for second-order OHAM at various points of x and t for \( \alpha = 0.25 \)
Table 3.7 \( L_{2} {\text{ and }}L_{\infty } \) error norm for Fisher-type equation at different values of t

In the case of fractional Fisher-type Eq. (3.46), Figs. 3.4, 3.5, 3.6, and 3.7 show the graphical comparison between the numerical solutions obtained by Haar wavelet method and exact solutions for different values of x and t for \( \alpha = 1 \).

Fig. 3.4
figure 4

Comparison of the numerical solution and exact solution of fractional Fisher-type equation when \( t = 0.2 \) and \( \alpha = 1 \)

Fig. 3.5
figure 5

Comparison of the numerical solution and exact solution of fractional Fisher-type equation when \( t = 0.4 \) and \( \alpha = 1 \)

Fig. 3.6
figure 6

Comparison of the numerical solution and exact solution of fractional Fisher-type equation when \( t = 0.6 \) and \( \alpha = 1 \)

Fig. 3.7
figure 7

Comparison of the numerical solution and exact solution of fractional Fisher-type equation when \( t = 0.8 \) and \( \alpha = 1 \)

3.7 Conclusion

In the present chapter, a numerical method based on the Haar wavelet operational method is applied to solve the Bagley–Torvik equation. An attempt has been made to apply the Haar wavelet operational method for the numerical solution of the Bagley–Torvik equation.

We exhibit a numerical method for the fractional-order Bagley–Torvik equation based on Haar wavelet operational matrices of the general order of integration. In this regard, a general procedure of obtaining the Haar wavelet operational matrix \( Q^{\alpha } \) of integration of the general order \( \alpha \) is derived first time in this work. This operational matrix is the correct general order operational matrix confirmed after examined by the author.

The numerical solution is compared with the exact solution and the R.M.S. error is 0.204029. The error may be reduced if we take more number of collocation points. The advantage of this method is that it transforms the problem into algebraic matrix equation so that the computation is simple, and it is a computer-oriented method. It shows the simplicity and effectiveness of this method. It is based on the operational matrices of Haar wavelet functions. Moreover, wavelet operational method is much simpler than the conventional numerical method for fractional differential equations, and the result obtained is quite satisfactory. The admissible comparison of the results obtained by the present method justifies the applicability, accuracy, and efficiency of the proposed method.

Also, in this chapter, the fractional Fisher-type equation has been solved by using the Haar wavelet method. The obtained results are then compared with exact solutions as well as the optimal homotopy asymptotic method. These results have been presented in the tables and also graphically demonstrated in order to justify the accuracy and efficiency of the proposed schemes. The Haar wavelet technique provides quite satisfactory results for the fractional Fisher-type Eq. (3.46). The main advantages of this Haar wavelet method are it transfers the whole scheme into a system of algebraic equations for which the computation is easy and simple. OHAM allows fine-tuning of the convergence region and the rate of convergence by suitably identifying convergence control parameters \( C_{1} ,C_{2} ,C_{3} , \ldots \). The results obtained by OHAM are more accurate as its convergence region can be easily adjusted and controlled. The main advantages of these schemes are their simplicity, applicability, and less computational errors. Although the obtained results indicate that the optimal homotopy asymptotic method provides more accurate value than Haar wavelet method, and however, the accuracy of the wavelet method may be improved with the increase in level of resolution.