Wavelet Theory: Applications of the Wavelet

*Mohammed S. Mechee, Zahir M. Hussain and Zahrah Ismael Salman*

#### **Abstract**

In this Chapter, continuous Haar wavelet functions base and spline base have been discussed. Haar wavelet approximations are used for solving of differential equations (DEs). The numerical solutions of ordinary differential equations (ODEs) and fractional differential equations (FrDEs) using Haar wavelet base and spline base have been discussed. Also, Haar wavelet base and collocation techniques are used to approximate the solution of Lane-Emden equation of fractional-order showing that the applicability and efficacy of Haar wavelet method. The numerical results have clearly shown the advantage and the efficiency of the techniques in terms of accuracy and computational time. Wavelet transform studied as a mathematical approach and the applications of wavelet transform in signal processing field have been discussed. The frequency content extracted by wavelet transform (WT) has been effectively used in revealing important features of 1D and 2D signals. This property proved very useful in speech and image recognition. Wavelet transform has been used for signal and image compression.

**Keywords:** Haar wavelet, continuous wavelet function, wavelet transform, B-cubic spline base

#### **1. Introduction**

Wavelets are special mathematical functions which have advantages over traditional Fourier methods in analyzing physical situations where the signal contains discontinuities and sharp spikes. The fields of applied mathematics such as quantum physics, seismic geology and electrical engineering have used and developed independently wavelets during last twenty years ago which leads to new wavelet applications such as image compression, radar, and earthquake prediction. Haar wavelet was initiated and independently developed by some authors. Wavelets can be summarized as a family of functions constructed from transformation and dilation of a single function called mother wavelet. From various types of continuous and discrete wavelets, Haar wavelet is the discrete type of wavelet which was first proposed and the first orthonormal wavelet basis is the Haar basis. Differential equations (DEs) are most important tools in mathematical models for physical phenomena. Many basis used to approximate the solutions of DEs. Haar wavelet is simple basis used to approximate the solution of DEs. [1] established a simple numerical method based on Haar wavelet operational matrix of integration for solving two dimensional elliptic partial differential equations (PDEs) of the form ∇<sup>2</sup> *u x*ð Þþ , *y ku x*ð Þ¼ , *y f x*ð Þ , *y* , [2]

used Haar wavelet operational matrix for the numerical solutions of FrDEs, [3] used Haar wavelet-quasi linearization technique for FrDEs, [4] used Haar wavelet method for solving FrPDEs numerically, [5] applied Haar wavelet transform to solve integral equations (IEs) and DEs, [6] solved 2D and 3D Poisson equations and biharmonic equations by the Haar wavelet method while [7] presented a numerical method for inversion of Laplace transform using the method of Haar wavelet operational matrix. The implementations of FrDEs which are used as mathematical models in many physically significant fields and applied science. Recently, the approximated solutions of the FrDEs have been studied using Haar wavelet method which shows to be more suitable to approximate the solutions of them. Nowadays, Haar wavelets are most widely and simplest due to their simplicity, the Haar wavelets are effective tools for approximating solutions of DEs. When this type of problem arises, mainly approximated solutions come to be available. From the many approximated methods, Haar wavelet approach is one to find the solutions of DEs. If the approximated solution gives less error than other methods, then, the method be an efficient method. However, one of interesting applications of wavelets bases is the approximation of DEs. Also, Haar wavelet technique is used to approximate the solutions of DEs of fractional-order. Wavelet transform is a mathematical approach widely used for signal processing applications. It can decompose special patterns hidden in mass of data. Wavelet transform has the advantage to simultaneously display functions and manifest their local characteristics in time-frequency domain. Wavelet transforms have had tremendous impact on the fields of signal processing, signal coding, estimation, pattern recognition, applied sciences, process systems engineering, econometrics, and medicine. Wavelet transforms are mainly divided into two groups; continuous wavelet transform (CWT) and discrete wavelet transform (DWT). The discretization of a voice transform generated by a representation of the Blaschke group on the Hardy space of the unit disk leads to the construction of analytic rational orthogonal wavelets. In this chapter, we introduce the concept of continuous wavelet functions together to the approximations solutions of DEs with ordinary- or fractional-order using Haar wavelet functions. Also, a comparison between Haar wavelet base with cubic spline base has been introduced. Wavelet transform as a mathematical approach has been discussed together to the applications of wavelet transform in signal.

**1.2 Scope of study**

**2. Preliminary**

This chapter entailed the studying of continuous wavelet functions and Haar

In this section, we introduce the definitions of two types of continues Haar

Haar functions have been introduced by Hungarian mathematician. The orthog-

1 0≤*x*<

*X*

0 *o:w:*

*<sup>k</sup>* � <sup>1</sup> 2 <sup>2</sup> *<sup>j</sup> <sup>X</sup>* <sup>≤</sup>*x*<sup>&</sup>lt;

<sup>2</sup> <sup>≤</sup>*x*<*<sup>X</sup>*

<sup>2</sup> *<sup>j</sup> <sup>X</sup>* <sup>≤</sup>*x*<sup>&</sup>lt;

�1

p 0≤*x*<*X*, (1)

*<sup>k</sup>* � <sup>1</sup> 2 <sup>2</sup> *<sup>j</sup> <sup>X</sup>*

*k* 2 *j X*

*m δpq:*

*f x*ð Þ*h jdx*

*<sup>x</sup>* � *<sup>k</sup>* � � for *<sup>i</sup>* <sup>¼</sup> 2, 3, … , *<sup>m</sup>* � <sup>1</sup>*:* In general, we have the

*hp*ð Þ *<sup>x</sup> hq*ð Þ *<sup>x</sup> dx* <sup>¼</sup> *<sup>X</sup>*

*X* ð*x* 0 (2)

(3)

*:* Note that:

*<sup>i</sup>*¼<sup>0</sup> *aihi*ð Þ *<sup>x</sup> :*.

*X* 1

onal set of Haar functions is defined as a square waves with magnitude of �1 in some interval and zero elsewhere. The first curve is that *h*0ð Þ¼ *x* 1 during the whole interval 0 ≤*x*≤1. The second curve *h*1ð Þ *x* is the fundamental square wave, or mother wavelet which also spans the whole interval 0, 1 ½ �. All the other subsequent curve are generated from *h*1ð Þ *x* with two operation translation and dilation. Haar

> 1 ffiffiffiffiffi *M*

> > 8 >>>><

> > >>>>:

1 ffiffiffiffiffi *M* p

ffiffiffiffi <sup>2</sup> *<sup>j</sup>* <sup>p</sup> , *<sup>k</sup>* � <sup>1</sup>

� ffiffiffiffi <sup>2</sup> *<sup>j</sup>* <sup>p</sup> ,

0, *o:w:*

ð*x* 0

To approximate *f x*ð Þ using Haar functions consider *f x*ð Þ¼ <sup>P</sup>*<sup>m</sup>*�<sup>1</sup>

<sup>0</sup> *hi*ð Þ *x h <sup>j</sup>*ð Þ *x dx*

ð Þ *<sup>x</sup> dx* <sup>¼</sup> *<sup>m</sup>*

for *<sup>i</sup>* <sup>¼</sup> 1, 2, 3, … , *<sup>m</sup>* � 1, *<sup>M</sup>* <sup>¼</sup> <sup>2</sup> *<sup>j</sup>* and *<sup>i</sup>* <sup>¼</sup> <sup>2</sup> *<sup>j</sup>* <sup>þ</sup> *<sup>k</sup>* � <sup>1</sup>*:* We say that *<sup>h</sup>*1ð Þ *<sup>x</sup>* is mother

� �, where *<sup>n</sup>* <sup>¼</sup> <sup>2</sup> *<sup>j</sup>* <sup>þ</sup> *<sup>k</sup>*, *<sup>j</sup>*≥0, 0<sup>&</sup>lt; *<sup>k</sup>*≤<sup>2</sup> *<sup>j</sup>*

wavelet functions and linear, quadratic and cubic spline functions base.

wavelet approximations. Wavelet transform introduced as a mathematical approach with some of applications of wavelet transform which is widely used in signal processing field. The approximation of DEs using Haar wavelet base was

implemented with comparing to B-cubic spline base.

**2.1 Continues Haar wavelet functions**

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

wavelet functions defined as follows on 0, ð � *X* [8].

*hi*ð Þ¼ *x*

<sup>2</sup> *h*<sup>1</sup> 2 *<sup>j</sup>*

*<sup>x</sup>* � *<sup>k</sup>* 2 *j*

*a <sup>j</sup>* ¼

*hp*ð Þ *<sup>x</sup>* , *hq*ð Þ *<sup>x</sup>* � � <sup>¼</sup>

Ð *x*

Ð *x o h*2 *j*

function and *hi*ð Þ¼ *<sup>x</sup>* <sup>2</sup> *<sup>j</sup>*

following: *<sup>h</sup>*0ð Þ¼ *<sup>x</sup> <sup>h</sup>*<sup>1</sup> <sup>2</sup> *<sup>j</sup>*

Then,

**23**

*h*0ð Þ¼ *x*

*h*1ð Þ¼ *x*

8 >>>>>>><

>>>>>>>:

1 ffiffiffiffiffi *M* p

#### **1.1 Objectives of chapter**

This chapter aims at achieving the following objectives:


#### **1.2 Scope of study**

This chapter entailed the studying of continuous wavelet functions and Haar wavelet approximations. Wavelet transform introduced as a mathematical approach with some of applications of wavelet transform which is widely used in signal processing field. The approximation of DEs using Haar wavelet base was implemented with comparing to B-cubic spline base.

#### **2. Preliminary**

In this section, we introduce the definitions of two types of continues Haar wavelet functions and linear, quadratic and cubic spline functions base.

#### **2.1 Continues Haar wavelet functions**

Haar functions have been introduced by Hungarian mathematician. The orthogonal set of Haar functions is defined as a square waves with magnitude of �1 in some interval and zero elsewhere. The first curve is that *h*0ð Þ¼ *x* 1 during the whole interval 0 ≤*x*≤1. The second curve *h*1ð Þ *x* is the fundamental square wave, or mother wavelet which also spans the whole interval 0, 1 ½ �. All the other subsequent curve are generated from *h*1ð Þ *x* with two operation translation and dilation. Haar wavelet functions defined as follows on 0, ð � *X* [8].

$$h\_0(\mathbf{x}) = \frac{1}{\sqrt{M}} \qquad 0 \le \mathbf{x} < X,\tag{1}$$

$$h\_1(\mathbf{x}) = \frac{1}{\sqrt{M}} \begin{cases} 1 & 0 \le \mathbf{x} < \frac{X}{1} \\ -1 & \frac{X}{2} \le \mathbf{x} < X \\ 0 & \sigma.w. \end{cases} \tag{2}$$

$$h\_i(\mathbf{x}) = \frac{1}{\sqrt{M}} \begin{cases} \sqrt{2^j}, & \frac{k-1}{2^j} X \le \mathbf{x} < \frac{k-\frac{1}{2}}{2^j} X \\\\ -\sqrt{2^j}, & \frac{k-\frac{1}{2}}{2^j} X \le \mathbf{x} < \frac{k}{2^j} X \\\ 0, & \text{o.w.} \end{cases} \tag{3}$$

for *<sup>i</sup>* <sup>¼</sup> 1, 2, 3, … , *<sup>m</sup>* � 1, *<sup>M</sup>* <sup>¼</sup> <sup>2</sup> *<sup>j</sup>* and *<sup>i</sup>* <sup>¼</sup> <sup>2</sup> *<sup>j</sup>* <sup>þ</sup> *<sup>k</sup>* � <sup>1</sup>*:* We say that *<sup>h</sup>*1ð Þ *<sup>x</sup>* is mother function and *hi*ð Þ¼ *<sup>x</sup>* <sup>2</sup> *<sup>j</sup>* <sup>2</sup> *h*<sup>1</sup> 2 *<sup>j</sup> <sup>x</sup>* � *<sup>k</sup>* � � for *<sup>i</sup>* <sup>¼</sup> 2, 3, … , *<sup>m</sup>* � <sup>1</sup>*:* In general, we have the following: *<sup>h</sup>*0ð Þ¼ *<sup>x</sup> <sup>h</sup>*<sup>1</sup> <sup>2</sup> *<sup>j</sup> <sup>x</sup>* � *<sup>k</sup>* 2 *j* � �, where *<sup>n</sup>* <sup>¼</sup> <sup>2</sup> *<sup>j</sup>* <sup>þ</sup> *<sup>k</sup>*, *<sup>j</sup>*≥0, 0<sup>&</sup>lt; *<sup>k</sup>*≤<sup>2</sup> *<sup>j</sup> :* Note that:

$$\left(h\_p(\infty), h\_q(\infty)\right) = \int\_0^\infty h\_p(\infty) h\_q(\infty) d\infty = \frac{X}{m} \delta\_{pq} \dots$$

To approximate *f x*ð Þ using Haar functions consider *f x*ð Þ¼ <sup>P</sup>*<sup>m</sup>*�<sup>1</sup> *<sup>i</sup>*¼<sup>0</sup> *aihi*ð Þ *<sup>x</sup> :*. Then,

$$a\_j = \frac{\int\_0^\infty h\_i(\varkappa) h\_j(\varkappa) d\varkappa}{\int\_o^\varkappa h\_j^2(\varkappa) d\varkappa} = \frac{m}{X} \int\_0^\varkappa f(\varkappa) h\_j d\varkappa$$

for

$$j = \mathbf{0}, \mathbf{1}, \mathbf{2}, \dots m - \mathbf{1}.$$

All Haar wavelets are orthogonal to each other:

$$\int\_0^1 h\_i(\mathbf{x}) h\_j d\mathbf{x} = \mathbf{2}^{-j} \delta\_{ij} = \begin{cases} \mathbf{2}^{-j}, & i = j = \mathbf{2}^{j+k} \\ \mathbf{0}, & i \neq j \end{cases}$$

#### **2.2 Spline functions**

The spline is used to refer to a wide class of smooth functions that are used in applications requiring data interpolation [9, 10]. The data may be either onedimensional or multi-dimensional. Spline functions for interpolation are normally determined as the minimizers of suitable measures of roughness (for example integral squared curvature) subject to the interpolation constraints. Smoothing splines may be viewed as generalizations of interpolation splines where the functions are determined to minimize a weighted combination of the average squared approximation error over observed data and the roughness measure. For a number of meaningful definitions of the roughness measure, the spline functions are found to be finite dimensional in nature, which is the primary reason for their utility in computations and representation. For the rest of this section, the focus is entirely on one-dimensional, polynomial splines and the use of the term spline in this restricted sense. The base Φð Þ¼ *x* f g Φ1ð Þ *x* , Φ2ð Þ *x* , … , Φ*n*ð Þ *x* is called spline base of order *n* if the basis functions satisfy <sup>Φ</sup>*i*ð Þ *<sup>x</sup>* <sup>∈</sup>*C<sup>n</sup>*�<sup>1</sup> ð Þ �∞, ∞ for *i* ¼ 1, 2, … , *n:* First of all, we partition 0, 1 ½ � by choosing a positive integer *<sup>n</sup>* and defining *<sup>h</sup>* <sup>¼</sup> <sup>1</sup> *<sup>n</sup>*þ<sup>1</sup> *:* This produces the equally-spaced nodes *xi* ¼ *ih*, for each *i* ¼ 0, 1, … , *n* þ 1*:* We then define the basis functions f g *<sup>ϕ</sup>*ð Þ *<sup>x</sup> <sup>n</sup>*þ<sup>1</sup> *<sup>i</sup>*¼<sup>0</sup> on the interval 0, 1 ½ �.

#### *2.2.1 Linear spline*

The simplest spline is a piecewise polynomial function, with each polynomial having a single variable. The spline S takes values from an interval ½ � *a*, *b* and maps them to ℜ where *S* : ½ �! *a*, *b* ℜ Since S is piecewise defined, choose k subintervals to partition ½ � *a*, *b* . The simplest choice of spline functions basis involves piecewiselinear polynomials. The first step is to form a partition of 0, 1 ½ � by choosing points *x*0, *x*1, … , *xn*þ1. Letting *hi* ¼ *xi*þ<sup>1</sup> � *xi*, for each *i* ¼ 0, 1, … , *n*. We have defined the basis functions Φ1ð Þ *x* , Φ2ð Þ *x* , … , Φ*n*ð Þ *x* . Linear spline is linear polynomial *S x*ð Þ which satisfies *S x*ð Þ∈*C*ð Þ �∞, ∞ . To construct linear spline base in which it can satisfy the boundary conditions *ϕi*ð Þ¼ 0 *ϕi*ð Þ1 for *i* ¼ 1, 2, … , *n*. we have constructed the following component linear spline functions:

$$\Phi\_i(\mathbf{x}) = \begin{cases} 0, & 0 \le \mathbf{x} \le \mathbf{x}\_{i-1}, \\\\ \frac{1}{h\_{i-1}}(\mathbf{x} - \mathbf{x}\_{i-1}), & \mathbf{x}\_{i-1} < \mathbf{x} \le \mathbf{x}\_i, \\\\ \frac{1}{h\_i}(\mathbf{x}\_{i+1} - \mathbf{x}), & \mathbf{x}\_i < \mathbf{x} \le \mathbf{x}\_{i+1}, \\\\ 0, & \mathbf{x}\_{i+1} < \mathbf{x} \le \mathbf{1}. \end{cases} \tag{4}$$

for each *i* ¼ 1, 2, … , *n:* (See **Figure 1(a)**, **Table 1(a)**). We can prove that the

<sup>2</sup> 2

<sup>2</sup> �2

3

*xi*�<sup>2</sup> 000

*xi* 1 0 -<sup>3</sup>

*xi*þ<sup>2</sup> 000

*Values at node points (a) linear spline, (b) quadratic B-spline, and (c) cubic B-spline.*

<sup>4</sup> -<sup>3</sup>

*(a) Linear spline and (b) quadratic spline (c) cubic spline function and (d) compound cubic spline function.*

*i*

ð Þ *x* are nonzero only on ð Þ *xi*�1, *xi*þ<sup>1</sup>

ð Þ¼ *x* 0 if *i* 6¼ *j*, *j* � 1, *j* þ 1, consequently,

*<sup>i</sup>*ð Þ *xi* **Φ**<sup>00</sup>

<sup>4</sup> -<sup>3</sup>

<sup>4</sup> -<sup>3</sup>

*<sup>i</sup>* ð Þ *xi*

2

4

2

functions are orthogonal because Φ*i*ð Þ *x* and Φ<sup>0</sup>

*xi* **Φ***i*ð Þ *xi* **Φ**<sup>0</sup>

*xi* 1 0

4

*i* ð Þ *x* Φ<sup>0</sup> *j*

such that Φ*i*ð Þ *x* Φ*j*ð Þ¼ *x* 0 and Φ<sup>0</sup>

**Figure 1.**

(a)

(b)

(c)

**Table 1.**

**25**

Φ*i*ð Þ *x* ∈*C*ð Þ �∞, ∞ for i = 1,2,3, … n.

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

*xi*�<sup>1</sup> 0 *xi* 1 *xi*þ<sup>1</sup> 0

*xi*�<sup>1</sup> <sup>1</sup>

*xi*þ<sup>1</sup> <sup>1</sup>

*xi*�<sup>1</sup> <sup>1</sup>

*xi*þ<sup>1</sup> <sup>1</sup>

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

**Figure 1.**

*(a) Linear spline and (b) quadratic spline (c) cubic spline function and (d) compound cubic spline function.*

for each *i* ¼ 1, 2, … , *n:* (See **Figure 1(a)**, **Table 1(a)**). We can prove that the functions are orthogonal because Φ*i*ð Þ *x* and Φ<sup>0</sup> *i* ð Þ *x* are nonzero only on ð Þ *xi*�1, *xi*þ<sup>1</sup> such that Φ*i*ð Þ *x* Φ*j*ð Þ¼ *x* 0 and Φ<sup>0</sup> *i* ð Þ *x* Φ<sup>0</sup> *j* ð Þ¼ *x* 0 if *i* 6¼ *j*, *j* � 1, *j* þ 1, consequently, Φ*i*ð Þ *x* ∈*C*ð Þ �∞, ∞ for i = 1,2,3, … n.


**Table 1.**

*Values at node points (a) linear spline, (b) quadratic B-spline, and (c) cubic B-spline.*

*ϕi*ð Þ¼ *x*

bases (**Table 2**).

**Table 2.**

*basis.*

**27**

and Haar wavelet bases.

*S x h*

8

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

>>>>>>>>>>>>>>>>>>>>><

>>>>>>>>>>>>>>>>>>>>>:

See **Figure 1(c)**, **(d)** and **Table 1(c)**.

*<sup>S</sup> <sup>x</sup>* � *<sup>h</sup> h* � �

*<sup>S</sup> <sup>x</sup>* � *ih h*

*<sup>S</sup> <sup>x</sup>* � *nh h* � �

*<sup>S</sup> <sup>x</sup>* � ð Þ *<sup>n</sup>* <sup>þ</sup> <sup>1</sup> *<sup>h</sup> h* � �

**3. Approximation of differential equations (DEs)**

**3.1 Approximation of ordinary differential equations (ODEs)**

� � � <sup>4</sup>*<sup>S</sup> <sup>x</sup>* <sup>þ</sup> *<sup>h</sup>*

*h*

� *<sup>S</sup> <sup>x</sup>* <sup>þ</sup> *<sup>h</sup> h*

> � *<sup>S</sup> x n*ð Þ <sup>þ</sup> <sup>2</sup> *<sup>h</sup> h*

Mathematics has several tools to describe the problems in real life, engineering and science. ODEs and PDEs are significant tools in applied mathematics. They played significant rule in describing the mathematical models in applications of engineering, science and economics. High-order DE arises in some fields of engineering and science such as nonlinear optics and quantum mechanics. The approximated solutions of DEs should be studied when the ODEs and PDEs have no analytical solutions or it is very difficult to find the analytical solutions. The numerical or approximated solutions of DEs are very important in scientific computation, as they are widely used to model real life problems. In this section, we have studied the approximation solutions of DEs using spline and Haar wavelet

In this section, we have studied approximation solutions of ODEs using spline

0 1.311e-3 0.0005 5.0683e-3 3.6229e-3

0 1.3211e-5 2.1212e-5 1.2341e-6 4.0101e-5

0 2.1414e-7 1.2211e-7 5.2233e-7 2.1266e-7

0 4.9121e-8 3.4564e-8 5.0111e-8 6.4222e-7

*n*n*t* **0 0.25 0.5 0.75 1** 5 0 1.3345e-3 0.0015 5.0673e-3 3.6339e-3

10 0 1.3232e-5 2.6342e-5 1.5634e-6 4.1443e-5

50 0 2.3416e-7 1.6611e-7 5.1126e-7 2.1233e-7

100 0 4.9383e-8 3.4453e-8 5.0347e-8 6.4332e-7

*Absolute errors of example 3.1 using numerical collection method with (a) polynomial basis (b) Haar wavelet*

� �, *<sup>i</sup>* <sup>¼</sup> <sup>0</sup>

� �, *<sup>i</sup>* <sup>¼</sup> <sup>1</sup>

� �, *<sup>i</sup>* <sup>¼</sup> *<sup>n</sup>*

� �, *<sup>i</sup>* <sup>¼</sup> *<sup>n</sup>* <sup>þ</sup> <sup>1</sup>*:*

(7)

� �, 2<sup>≤</sup> *<sup>i</sup>*≤*<sup>n</sup>*

� <sup>4</sup>*<sup>S</sup> <sup>x</sup>* � ð Þ *<sup>n</sup>* <sup>þ</sup> <sup>2</sup> *<sup>h</sup> h*

**Figure 2.** *Comparison of Haar wavelet and Spline Base with exact solutions for examples (a) 3.5 (b) 3.6 (c) 3.7.*

#### *2.2.2 Quadratic B-spline*

Quadratic B-spline is quadratic B-Spline polynomial *S x*ð Þ which satisfy *S x*ð Þ∈*C*<sup>2</sup> ð Þ �∞, ∞ . To construct quadratic spline base in which satisfy the boundary conditions *ϕi*ð Þ¼ 0 *ϕi*ð Þ1 for *i* ¼ 1, 2, … , *n* we have constructed the following component quadratic spline functions (**Figure 2**):

$$\phi\_i(\mathbf{x}) = \frac{1}{h^2} \begin{cases} \left(\mathbf{x}\_{i+2} - \mathbf{x}\right)^2 - \mathbf{3}\left(\mathbf{x}\_{i+1} - \mathbf{x}\right)^2 + \mathbf{3}\left(\mathbf{x}\_i - \mathbf{x}\right)^2; & [\mathbf{x}\_{i-1}; \mathbf{x}\_i]; \\\\ \left(\mathbf{x}\_{i+2} - \mathbf{x}\right)^2 - \mathbf{3}\left(\mathbf{x}\_{i+1} - \mathbf{x}\right)^2; & [\mathbf{x}\_i; \mathbf{x}\_{i+1}]; \\\\ \left(\mathbf{x}\_{i+2} - \mathbf{x}\right)^2; & [\mathbf{x}\_{i+1}; \mathbf{x}\_{i+2}]; \\\\ \mathbf{0}; & \sigma\text{-}\boldsymbol{w}. \end{cases} \tag{5}$$

See **Figure 1(b)** and **Table 1(b)**.

#### *2.2.3 Cubic B-spline*

Many researchers used B-cubic spline base which defined as follows:

$$S(\mathbf{x}) = \frac{1}{4} \begin{cases} 0, & \mathbf{x} < -2 \\\\ (2+\mathbf{x})^3, & -2 \le \mathbf{x} \le -1 \\\\ (2+\mathbf{x})^3 - 4(\mathbf{1}+\mathbf{x})^3, & -1 < \mathbf{x} \le \mathbf{0} \\\\ (2-\mathbf{x})^3 - 4(\mathbf{1}-\mathbf{x})^3, & 0 < \mathbf{x} \le \mathbf{1} \\\\ (2-\mathbf{x})^3, & \mathbf{1} < \mathbf{x} \le 2 \\\\ \mathbf{0}, \mathbf{x} > 2. \end{cases} \tag{6}$$

Consequently, *S x*ð Þ∈*C*<sup>2</sup> <sup>0</sup>ð Þ �∞, ∞ .

To construct cubic spline base in which satisfy the boundary conditions *ϕi*ð Þ¼ 0 *ϕi*ð Þ1 for *i* ¼ 1, 2, … , *n* we have constructed the following component cubic spline functions:

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

$$\phi\_i(\mathbf{x}) = \begin{cases} S\left(\frac{\mathbf{x}}{h}\right) - 4S\left(\frac{\mathbf{x} + h}{h}\right), & i = \mathbf{0} \\\\ S\left(\frac{\mathbf{x} - h}{h}\right) - S\left(\frac{\mathbf{x} + h}{h}\right), & i = 1 \\\\ S\left(\frac{\mathbf{x} - ih}{h}\right), & 2 \le i \le n \\\\ S\left(\frac{\mathbf{x} - nh}{h}\right) - S\left(\frac{\mathbf{x}(n + 2)h}{h}\right), & i = n \end{cases} \tag{7}$$

$$\begin{cases} \frac{\infty}{h} \int\_0^\infty \left( \frac{\infty}{h} \right)^2 - S \left( \frac{\infty (n+2)h}{h} \right), & i = n \\\\ S \left( \frac{\infty - (n+1)h}{h} \right) - 4S \left( \frac{\infty - (n+2)h}{h} \right), & i = n+1. \end{cases}$$

See **Figure 1(c)**, **(d)** and **Table 1(c)**.

#### **3. Approximation of differential equations (DEs)**

Mathematics has several tools to describe the problems in real life, engineering and science. ODEs and PDEs are significant tools in applied mathematics. They played significant rule in describing the mathematical models in applications of engineering, science and economics. High-order DE arises in some fields of engineering and science such as nonlinear optics and quantum mechanics. The approximated solutions of DEs should be studied when the ODEs and PDEs have no analytical solutions or it is very difficult to find the analytical solutions. The numerical or approximated solutions of DEs are very important in scientific computation, as they are widely used to model real life problems. In this section, we have studied the approximation solutions of DEs using spline and Haar wavelet bases (**Table 2**).

#### **3.1 Approximation of ordinary differential equations (ODEs)**


In this section, we have studied approximation solutions of ODEs using spline and Haar wavelet bases.

#### **Table 2.**

*Absolute errors of example 3.1 using numerical collection method with (a) polynomial basis (b) Haar wavelet basis.*

#### *3.1.1 Approximation of DEs using spline functions*

In this section, we have introduced the linear, quadratic and cubic B-spline base and their applications in solving ODEs. The operational matrices of the fractionalorder integration of the B-spline base has been studied.

#### *3.1.2 Rayleigh-Ritz Metod*

Rayleigh-Ritz metod is variational technique for solving boundary value problems (BVPs) which is the first reformulated as a problem of choosing, from set of all sufficiently differentiable functions satisfying the boundary conditions, the function to minimize a certain integral. To describe the Rayleigh-Ritz method, we consider the approximation of the solution to a linear of two-boundary value problem from beam-stress analysis. This BVP is described by the following DE:

$$-\frac{d}{d\mathbf{x}}\left(p(\mathbf{x})\frac{dy}{d\mathbf{x}}\right) + q(\mathbf{x})y(\mathbf{x}) = f(\mathbf{x}), \quad \mathbf{0} \le \mathbf{x} \le \mathbf{1}.\tag{8}$$

for *i*, *j* ¼ 1, 2, … *n* [10]. To impalement the Ritz method we consider the

*y*ð Þ¼ 0 *y*ð Þ¼ 1 0,

ð Þþ *x hi*ð Þ *x h <sup>j</sup>*ð Þ *x* � �*dx* <sup>¼</sup> *<sup>m</sup>*

*<sup>x</sup>*<sup>2</sup> � *<sup>x</sup>* <sup>þ</sup> <sup>2</sup> � �*hi*ð Þ *<sup>x</sup> dx*,

� �*:*

*y*ð Þ¼ 0 *y*ð Þ¼ 1 0,

*bi* ¼ 0,

Let the differential operator *L* defined on the interval *I* ¼ ½ � *a*, *b :* Define the

*hi*ð Þ *x h <sup>j</sup>*ð Þ *x* � �*dx* <sup>¼</sup> *<sup>π</sup>*<sup>2</sup> *<sup>m</sup>*

*:*0234375 2

*y t*ðÞ¼ 0, 0 ≤*t*≤ 1, (12)

*<sup>X</sup> <sup>δ</sup>ij*,

*<sup>n</sup>* and n is the number

<sup>2</sup> � *<sup>t</sup>*

1 4 ffiffi 2 <sup>p</sup> , � <sup>1</sup> 4 ffiffi 2 p ,

<sup>2</sup> � *<sup>t</sup>* <sup>þ</sup> 2, 0 <sup>≤</sup>*t*<sup>≤</sup> 1, (11)

*<sup>X</sup> <sup>δ</sup>ij*,

*y*00ð Þþ*t y t*ðÞ¼ *t*

*bi* ¼ ð1 0

*<sup>c</sup>* ¼ � <sup>1</sup> 3 , 0,

*<sup>y</sup>*00ðÞþ*<sup>t</sup> <sup>π</sup>*<sup>2</sup>

for *i*, *j* ¼ 1, 2, … *n:* However, c = [1,1,2,3,1,1,1,1,1,1].

collocation points *xi* <sup>¼</sup> *<sup>a</sup>* <sup>þ</sup> *ih* for *<sup>i</sup>* <sup>¼</sup> 0, 1, … , *<sup>n</sup>*; where *<sup>h</sup>* <sup>¼</sup> *<sup>b</sup>*�*<sup>a</sup>*

subject to the initial condition is

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

with the exact solution *y t*ðÞ¼ *t*

for *i*, *j* ¼ 1, 2, … *n:* However,

subject to the initial condition is

with the exact solution *y t*ðÞ¼ sin *πt*

*aij* ¼ ð1 0 �*h*<sup>0</sup> *i* ð Þ *x h*<sup>0</sup> *j* ð Þþ *<sup>x</sup> <sup>π</sup>*<sup>2</sup>

*3.1.3 Analysis of collection method*

of partitions on I. Discretize the functions

**Example 3.2** [8].

Let n = 10, then,

and

**29**

Consider

*aij* ¼ ð1 0 �*h*<sup>0</sup> *i* ð Þ *x h*<sup>0</sup> *j*

following problems. **Example 3.1** [8] Consider

Let n = 5, then,

and

with boundary conditions

$$\boldsymbol{\gamma}(\mathbf{0}) = \boldsymbol{\gamma}(\mathbf{1}) = \mathbf{0}.$$

The DE describes the deflection *y x*ð Þ of a beam of length 1 with variable cross section represented by *q x*ð Þ*:* The deflection is due to the added stresses *p x*ð Þ and *f x*ð Þ*:* We have the following functional that is equivalent to Eq. (8).

$$I(u(\varkappa)) = \int\_0^1 \left( p(\varkappa)(u'(\varkappa))^2 + q(\varkappa)(u(\varkappa))^2 - 2f(\varkappa)u(\varkappa) \right) d\varkappa. \tag{9}$$

An approximation

$$u(\mathbf{x}) = \sum\_{i=0}^{n} \Phi\_i(\mathbf{x}). \tag{10}$$

to the solution *y x*ð Þ of Eq. (9) can be obtained by finding the constants *c*1,*c*2,*c*3, … *cn* to minimize the integral Eq. (9): When considering *I c*ð Þ 1,*c*2,*c*3, … *cn* as a function of *c*1,*c*2,*c*3, … *cn* to have

$$\frac{\partial I}{\partial c\_j} = 0$$

for i = 1,2,3, … ,n.

Lastly, we have obtained the linear system of equations *Ac* ¼ *b*, where,

$$a\_{\vec{\eta}} = \int\_0^1 \left( p(\boldsymbol{\varkappa}) \Phi\_i'(\boldsymbol{\varkappa}) \Phi\_j'(\boldsymbol{\varkappa}) + q(\boldsymbol{\varkappa}) \Phi\_i(\boldsymbol{\varkappa}) \Phi\_j(\boldsymbol{\varkappa}) \right) d\boldsymbol{\varkappa}$$

and

$$b\_i = \int\_0^1 f(\mathfrak{x}) \Phi\_i(\mathfrak{x}) d\mathfrak{x},$$

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

for *i*, *j* ¼ 1, 2, … *n* [10]. To impalement the Ritz method we consider the following problems.

**Example 3.1** [8]

Consider

$$y''(t) + y(t) = t^2 - t + 2, \qquad 0 \le t \le 1,\tag{11}$$

subject to the initial condition is

$$\mathcal{Y}(\mathbf{0}) = \mathcal{Y}(\mathbf{1}) = \mathbf{0},$$

with the exact solution *y t*ðÞ¼ *t* <sup>2</sup> � *<sup>t</sup>* Let n = 5, then,

$$a\_{\vec{\eta}} = \int\_0^1 \left( -h\_i'(\boldsymbol{\omega})h\_j'(\boldsymbol{\omega}) + h\_i(\boldsymbol{\omega})h\_j(\boldsymbol{\omega}) \right) d\boldsymbol{\omega} = \frac{m}{X}\delta\_{\vec{\eta}},$$

and

$$b\_i = \int\_0^1 (\mathbf{x}^2 - \mathbf{x} + \mathbf{2}) h\_i(\mathbf{x}) d\mathbf{x},$$

for *i*, *j* ¼ 1, 2, … *n:* However,

$$\mathcal{c} = \left[ -\frac{1}{3}, 0, \frac{1}{4\sqrt{2}}, -\frac{1}{4\sqrt{2}}, \frac{.0234375}{2} \right].$$

**Example 3.2** [8]. Consider

$$y''(t) + \pi^2 y(t) = 0, \qquad 0 \le t \le 1,\tag{12}$$

subject to the initial condition is

$$\mathcal{Y}(\mathbf{0}) = \mathcal{Y}(\mathbf{1}) = \mathbf{0},$$

with the exact solution *y t*ðÞ¼ sin *πt* Let n = 10, then,

$$a\_{\vec{\eta}} = \int\_0^1 \left( -h\_i'(\infty)h\_j'(\infty) + \pi^2 h\_i(\infty)h\_j(\infty) \right) d\infty = \pi^2 \frac{m}{X} \delta\_{\vec{\eta}},$$

and

*bi* ¼ 0,

for *i*, *j* ¼ 1, 2, … *n:* However, c = [1,1,2,3,1,1,1,1,1,1].

#### *3.1.3 Analysis of collection method*

Let the differential operator *L* defined on the interval *I* ¼ ½ � *a*, *b :* Define the collocation points *xi* <sup>¼</sup> *<sup>a</sup>* <sup>þ</sup> *ih* for *<sup>i</sup>* <sup>¼</sup> 0, 1, … , *<sup>n</sup>*; where *<sup>h</sup>* <sup>¼</sup> *<sup>b</sup>*�*<sup>a</sup> <sup>n</sup>* and n is the number of partitions on I. Discretize the functions

$$\Phi(\boldsymbol{x}) = \{\Phi\_1(\boldsymbol{x}), \Phi\_2(\boldsymbol{x}), \Phi\_3(\boldsymbol{x}), \dots, \Phi\_n(\boldsymbol{x})\}.$$

*3.3.1 First-order linear ODEs*

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

We assume that

where *c*<sup>0</sup> *i*

equation:

and

wavelet bases.

**31**

Consider the following general linear first-order ODE:

*y*0

ð Þ¼ *<sup>x</sup>* <sup>X</sup> *k*

*y x*ð Þ¼ *<sup>β</sup>* <sup>þ</sup><sup>X</sup>

*cihi*ð Þþ *<sup>x</sup> af x*ð Þ<sup>X</sup>

*i*¼1

*k*

*i*¼1

*k*

*i*¼1

Put *x* ¼ *tj* for *j* ¼ 1, 2, … , *n:* in Eq. (21), we get linear system in which the matrix

� �

*Aij* ¼ ð Þ 1 þ *af t*ð Þ*<sup>i</sup> hi tj*

*bi* ¼ *ag tj* � �,

for *i*, *j* ¼ 1, 2, … , *n:* By solving the linear system of coefficients *Ac* ¼ *b*, we

In this section, we have studied approximation of DEs using spline and Haar

In this section, we have evaluated the operational matrices of the fractional-

*3.4.1 Operational matrix of the fractional order integration of the B-Spline Base*

**3.4 Approximation of fractional differential equations (FrDEs)**

order integration of the linear, quadratic and cubic B-spline Base.

Substituting Eqs. (19) and (20) in Eq. (17), we get the following system of

*s* for i = 1,2, … ,k are Haar coefficients to be determined. Integrating

Substituting *t* ¼ *ax* in Eq. (15) which reduces to

ðÞþ*t f t*ð Þ*y t*ðÞ¼ *g t*ð Þ; 0 ≤*t* ≤*a*; *f t*ð Þ 6¼ 0, (15)

ð Þþ *x af x*ð Þ*y x*ð Þ¼ *ag x*ð Þ; 0 ≤*t*≤ 1; *f t*ð Þ 6¼ 0, (17)

*y*ð Þ¼ 0 *β:* (16)

*y*ð Þ¼ 0 *β:* (18)

*cihi*ð Þ *x* , (19)

*ciP*1,*<sup>i</sup>*ð Þ *x :* (20)

*cihi*ð Þ¼ *x ag x*ð Þ*:* (21)

*y*0

*y*0

Eq. (19) with respect to *x*, we get the following

X *k*

*i*¼1

obtain the coefficients of approximated solution.

of coefficients has the following formula:

Suppose

$$y(\mathbf{x}) = \sum\_{i=1}^{n} c\_i \Phi\_i(\mathbf{x}).$$

Put the approximation of *y x*ð Þ at the point *x <sup>j</sup>* in the DE, we get the function coefficient matrix Φ*<sup>i</sup>*,*<sup>j</sup>* ¼ Φ*<sup>i</sup> x <sup>j</sup>* � � and Φ<sup>0</sup> *<sup>i</sup>*,*<sup>j</sup>* ¼ Φ<sup>0</sup> *<sup>i</sup> x <sup>j</sup>* � �*:* The matrix of coefficients has the dimension *n* � *n*. Any function *y x*ð Þ which is square integrable in the interval 0, 1 ð Þ can be expressed as an infinite sum of Haar wavelet. The above series terminates at finite terms if *y x*ð Þ is piecewise constant or can be approximated as piecewise constant during each subinterval.

#### **3.2 The quadratic B-Spline Base**

Consider the quadratic B-spline Base

$$\mathcal{S}(\mathfrak{x}) = \{ \mathcal{S}\_1(\mathfrak{x}), \mathcal{S}\_2(\mathfrak{x}), \mathcal{S}\_3(\mathfrak{x}), \dots, \mathcal{S}\_n(\mathfrak{x}) \}.$$

Suppose *y x*ð Þ¼ <sup>P</sup>*<sup>n</sup> <sup>i</sup>*¼<sup>1</sup>*ciSi*ð Þ *<sup>x</sup> :* The general ODE of first-order has the following form

$$a\_0(t)y'(t) + a\_1(t)y(t) = f(t), \qquad 0 \le t \le 1,\tag{13}$$

subject to the initial condition is *y*ð Þ¼ 0 *α:*. **Example 3.3** [8].

$$y'(t) + y(t) = \sin\left(t\right) + \cos\left(t\right), \qquad 0 \le t \le 1,\tag{14}$$

subject to the initial condition is

$$\mathcal{y}(\mathbf{0}) = \mathbf{0},$$

The coefficients are *a*0ðÞ¼ *t a*1ðÞ¼ *t* 1 and *f t*ðÞ¼ sin ðÞþ*t* cosð Þ*t :*.

Consider the quadratic B-spline base, then, the matrix of coefficients has the following formula:

$$\mathcal{A}\_{\vec{\eta}} = \mathsf{S}'\_i(t\_j) + \mathsf{S}\_i(t\_j),$$

and

$$b\_i = \sin\left(t\_i\right) + \cos\left(t\_i\right)$$

for *i*, *j* ¼ 1, 2, … , *n:* By solving the system of coefficients *Ac* ¼ *b* we will obtain the coefficients of approximation.

#### **3.3 Approximation of DEs using Haar wavelet Functions Base**

We introduce the Haar wavelet technique for solving general linear first-order ODEs [11].

#### *3.3.1 First-order linear ODEs*

Consider the following general linear first-order ODE:

$$y'(t) + f(t)y(t) = g(t); 0 \le t \le a; f(t) \ne 0,\tag{15}$$

$$
\mathfrak{y}(\mathbf{0}) = \beta. \tag{16}
$$

Substituting *t* ¼ *ax* in Eq. (15) which reduces to

$$g'(\mathbf{x}) + \mathfrak{q}f(\mathbf{x})g(\mathbf{x}) = \mathfrak{q}g(\mathbf{x}); \mathbf{0} \le t \le \mathbf{1}; f(t) \ne \mathbf{0},\tag{17}$$

$$
\mathfrak{z}(\mathbf{0}) = \beta. \tag{18}
$$

We assume that

$$y'(\mathbf{x}) = \sum\_{i=1}^{k} c\_i h\_i(\mathbf{x}),\tag{19}$$

where *c*<sup>0</sup> *i s* for i = 1,2, … ,k are Haar coefficients to be determined. Integrating Eq. (19) with respect to *x*, we get the following

$$y(\mathbf{x}) = \beta + \sum\_{i=1}^{k} c\_i P\_{1,i}(\mathbf{x}). \tag{20}$$

Substituting Eqs. (19) and (20) in Eq. (17), we get the following system of equation:

$$\sum\_{i=1}^{k} c\_i h\_i(\mathbf{x}) + a f(\mathbf{x}) \sum\_{i=1}^{k} c\_i h\_i(\mathbf{x}) = a \mathbf{g}(\mathbf{x}).\tag{21}$$

Put *x* ¼ *tj* for *j* ¼ 1, 2, … , *n:* in Eq. (21), we get linear system in which the matrix of coefficients has the following formula:

$$A\_{\vec{\eta}} = (\mathbf{1} + a\mathbf{f}(t\_i))h\_i(t\_j).$$

and

$$b\_i = \arg(t\_j),$$

for *i*, *j* ¼ 1, 2, … , *n:* By solving the linear system of coefficients *Ac* ¼ *b*, we obtain the coefficients of approximated solution.

#### **3.4 Approximation of fractional differential equations (FrDEs)**

In this section, we have studied approximation of DEs using spline and Haar wavelet bases.

#### *3.4.1 Operational matrix of the fractional order integration of the B-Spline Base*

In this section, we have evaluated the operational matrices of the fractionalorder integration of the linear, quadratic and cubic B-spline Base.

#### *3.4.2 Linear spline*

This subsection examines the cubic linear spline operational matrix *FSα* of integration of the fractional order as follows:

$$f\_{\mathbf{x}\_i}^a(\mathbf{x}) = \frac{1}{\Gamma(a+2)} \begin{cases} 0, & 0 \le \mathbf{x} \le \mathbf{x}\_{i-1}, \\ \frac{1}{h\_{i-1}} \mathbf{x}\_{i-1}^{a+1}, & \mathbf{x}\_{i-1} < \mathbf{x} \le \mathbf{x}\_i, \\ \frac{1}{h\_{i-1}} \mathbf{x}\_{i-1}^{a+1} + \frac{1}{h\_i} \left( a h\_i \mathbf{x}\_i^a - \mathbf{x}\_i^{a+1} \right), & \mathbf{x}\_i < \mathbf{x} \le \mathbf{x}\_{i+1}, \\ 0, & \mathbf{x}\_{i+1} < \mathbf{x} \le \mathbf{1}. \end{cases} \tag{22}$$

**3.5 Numerical Solutions of fractional differential equations**

Consider the general fractional-order linear DE

Substituting *t* ¼ *ax* in Eq. (25) which reduces to

*y j*

<sup>2</sup> , integrating Eq. (28) once, we get

Substituting Eqs. (28) and (29) in Eq. (26), we get

<sup>2</sup>, integrating Eq. (26) twice, we get

*y* 1

Substituting Eqs. (28) and (37) in Eq. (26), we get

*cihi*ð Þ� *<sup>x</sup> aA x*ð Þ� *aB x*ð Þ *<sup>a</sup>*<sup>0</sup> <sup>þ</sup><sup>X</sup>

Put *<sup>x</sup>* <sup>¼</sup> *tj* for *<sup>j</sup>* <sup>¼</sup> 1, 2, … , *<sup>n</sup>:* in Eq. (30) in case *<sup>α</sup>* <sup>¼</sup> <sup>1</sup>

*cihi*ð Þ� *<sup>x</sup> aA x*ð Þ� *aB x*ð Þ *<sup>a</sup>*<sup>0</sup> <sup>þ</sup><sup>X</sup>

**Example 3.4** [8].

obtain various responses.

We assume that

X *k*

*i*¼1

X *k*

*i*¼1

If *<sup>α</sup>* <sup>¼</sup> <sup>3</sup>

and

**33**

If *<sup>α</sup>* <sup>¼</sup> <sup>1</sup>

subject to initial conditions *y <sup>j</sup>*

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

*3.5.1 Numerical solutions of fractional differential equations using Haar base*

We will introduce the Haar wavelet technique for solving FrDEs.

*<sup>y</sup><sup>α</sup>*ðÞ¼ *<sup>t</sup> A t*ð Þþ *B t*ð Þ*y t*ðÞ¼ *C t*ð Þ; 0≤*<sup>t</sup>* <sup>≤</sup>*a*; *<sup>n</sup>* � <sup>1</sup><*α*<sup>&</sup>lt; *<sup>n</sup>*, (25)

*C t*ð Þ are given functions, are arbitrary constants and *α* is a parameter describing the order of the fractional derivative. The general response expression contains a parameter describing the order of the fractional derivative that can be varied to

*<sup>y</sup><sup>α</sup>*ð Þ¼ *<sup>x</sup> aA x*ð Þþ *aB x*ð Þ*y x*ð Þ¼ *C t*ð Þ; 0<sup>≤</sup> *<sup>x</sup>*<sup>≤</sup> 1; *<sup>n</sup>* � <sup>1</sup><*<sup>α</sup>* <sup>&</sup>lt;*n*, (26)

*k*

*i*¼1

*k*

*ciFH*<sup>1</sup>

*i*¼1

*k*

!

*ciFH*<sup>1</sup> 2

*k*

*ciFH*<sup>3</sup>

*ciFH*<sup>3</sup> 2,*<sup>i</sup>*ð Þ *x*

*i*¼1

*k*

!

*i*¼1

we get the linear system in which the matrix of coefficients has the following formula:

*ciFH*<sup>1</sup> 2 ,*<sup>i</sup>*ð Þ *x*

*i*¼1

*k*

*i*¼1

*<sup>y</sup><sup>α</sup>*ð Þ¼ *<sup>x</sup>* <sup>X</sup>

*y x*ð Þ¼ *<sup>a</sup>*<sup>0</sup> <sup>þ</sup><sup>X</sup>

<sup>2</sup>ð Þ¼ *<sup>x</sup> <sup>a</sup>*<sup>1</sup> <sup>þ</sup><sup>X</sup>

*y x*ð Þ¼ *<sup>a</sup>*<sup>0</sup> <sup>þ</sup> *<sup>a</sup>*1*<sup>x</sup>* <sup>þ</sup><sup>X</sup>

ð Þ¼ 0 *a <sup>j</sup>* for *j* ¼ 0, 1, … , *n* � 1*:* where *A t*ð Þ, *B t*ð Þ and

ð Þ¼ 0 *a <sup>j</sup>*; *g* ¼ 0, 1, … , *n* � 1*:* (27)

*cihi*ð Þ *x :* (28)

2,*<sup>i</sup>*ð Þ *x :* (29)

,*<sup>i</sup>*ð Þ *x* , (31)

2,*<sup>i</sup>*ð Þ *x :* (32)

¼ *C x*ð Þ*:* (33)

2 ,

<sup>2</sup> , or in Eq. (33) in case *<sup>α</sup>* <sup>¼</sup> <sup>3</sup>

¼ *C x*ð Þ, (30)

where *xi*�<sup>1</sup> ¼ *x* � *xi*�1, *xi* ¼ *x* � *xi*.

#### *3.4.3 Quadratic B-spline*

This subsection introduced the quadratic B-spline operational matrix *FSα* of integration of the fractional order as follows:

$$J\_x^a(\mathbf{x}) = \mathcal{J} \* \frac{1}{\Gamma(a+3)},$$

where

$$J = \begin{cases} 2(\mathbf{x} - \mathbf{1})^{a+2}; & \mathbf{x} \in [1, 2]; \\ 2(\mathbf{x} - \mathbf{1})^{a+2} - 6(\mathbf{x} - \mathbf{2})^{a+2}; & \mathbf{x} \in [2, 3]; \\ 2(\mathbf{x} - \mathbf{1})^{a+2} - 6(\mathbf{x} - \mathbf{2})^{a+2} + 6(\mathbf{x} - \mathbf{3})^{a+2}; & \mathbf{x} \in [3, 4]; \\ 0; & o.w. \end{cases} \tag{23}$$

#### *3.4.4 Cubic B-spline*

This subsection introduced the cubic B-spline operational matrix FS*α* of integration of the fractional order as follows:

$$J\_\mathbf{x}^a(\mathbf{x}) = \mathcal{J} \* \frac{1}{\Gamma(a+4)},$$

where

$$J = \begin{cases} 0, & \text{x < -2} \\ \frac{3}{2} \mathbf{x}^{a+3}, & -2 \le \mathbf{x} \le -1 \\ \frac{3}{2} \mathbf{x}^{a+3} - 6 \mathbf{x}\_1^{a+3}, & -1 < \mathbf{x} \le 0 \\ \frac{3}{2} \mathbf{x}^{a+3} - 6 \mathbf{x}\_1^{a+3} + 9 \mathbf{x}\_2^{a+3}; & 0 < \mathbf{x} \le 1 \\ \frac{3}{2} \mathbf{x}^{a+3} - 6 \mathbf{x}\_1^{a+3} + 9 \mathbf{x}\_2^{a+3} - 6 \mathbf{x}\_3^{a+3}; & 1 < \mathbf{x} \le 2 \\ 0, & \text{x > 2}, \end{cases} \tag{24}$$

where *xi* = *x*�*i*; *i* = 1,2,3.

#### **3.5 Numerical Solutions of fractional differential equations**

*3.5.1 Numerical solutions of fractional differential equations using Haar base*

We will introduce the Haar wavelet technique for solving FrDEs. **Example 3.4** [8]. Consider the general fractional-order linear DE

$$y^a(t) = A(t) + B(t)\\y(t) = C(t); \mathbf{0} \le t \le a; n - 1 < a < n,\tag{25}$$

subject to initial conditions *y <sup>j</sup>* ð Þ¼ 0 *a <sup>j</sup>* for *j* ¼ 0, 1, … , *n* � 1*:* where *A t*ð Þ, *B t*ð Þ and *C t*ð Þ are given functions, are arbitrary constants and *α* is a parameter describing the order of the fractional derivative. The general response expression contains a parameter describing the order of the fractional derivative that can be varied to obtain various responses.

Substituting *t* ¼ *ax* in Eq. (25) which reduces to

$$y^a(\mathbf{x}) = aA(\mathbf{x}) + aB(\mathbf{x}) \\ y(\mathbf{x}) = \mathbf{C}(t); \quad 0 \le \mathbf{x} \le \mathbf{1}; \qquad n-1 < a < n,\tag{26}$$

$$\mathbf{y}\_j(\mathbf{0}) = \mathbf{a}\_j; \mathbf{g} = \mathbf{0}, \mathbf{1}, \dots, n-1. \tag{27}$$

We assume that

$$\mathbf{y}^a(\mathbf{x}) = \sum\_{i=1}^k c\_i h\_i(\mathbf{x}). \tag{28}$$

If *<sup>α</sup>* <sup>¼</sup> <sup>1</sup> <sup>2</sup> , integrating Eq. (28) once, we get

$$y(\mathbf{x}) = a\_0 + \sum\_{i=1}^{k} c\_i F H\_{\frac{1}{2}i}(\mathbf{x}). \tag{29}$$

Substituting Eqs. (28) and (29) in Eq. (26), we get

$$\sum\_{i=1}^{k} c\_i h\_i(\mathbf{x}) - aA(\mathbf{x}) - aB(\mathbf{x}) \left( a\_0 + \sum\_{i=1}^{k} c\_i F H\_{\frac{1}{2}i}(\mathbf{x}) \right) = C(\mathbf{x}),\tag{30}$$

If *<sup>α</sup>* <sup>¼</sup> <sup>3</sup> <sup>2</sup>, integrating Eq. (26) twice, we get

$$y^\ddagger(\infty) = a\_1 + \sum\_{i=1}^k c\_i F H\_{\grațd}(\infty),\tag{31}$$

and

$$y(\mathbf{x}) = a\_0 + a\_1 \mathbf{x} + \sum\_{i=1}^k c\_i F H\_{\frac{3}{2}i}(\mathbf{x}). \tag{32}$$

Substituting Eqs. (28) and (37) in Eq. (26), we get

$$\sum\_{i=1}^{k} c\_i h\_i(\mathbf{x}) - aA(\mathbf{x}) - aB(\mathbf{x}) \left( a\_0 + \sum\_{i=1}^{k} c\_i F H\_{\frac{k}{2}i}(\mathbf{x}) \right) = C(\mathbf{x}).\tag{33}$$

Put *<sup>x</sup>* <sup>¼</sup> *tj* for *<sup>j</sup>* <sup>¼</sup> 1, 2, … , *<sup>n</sup>:* in Eq. (30) in case *<sup>α</sup>* <sup>¼</sup> <sup>1</sup> <sup>2</sup> , or in Eq. (33) in case *<sup>α</sup>* <sup>¼</sup> <sup>3</sup> 2 , we get the linear system in which the matrix of coefficients has the following formula:

$$A\_{ij} = h\_i(\boldsymbol{\kappa}) \left( t\_j \right) + aB \left( t\_j \right) F H\_{a,i} \left( t\_j \right).$$

and

$$b\_i = \mathcal{C}(t\_j) + a\mathcal{A}(t\_j) - a a\_0 \mathcal{B}(t\_j),$$

for *i*, *j* ¼ 1, 2, … , *n:* By solving the linear system of coefficients *Ac* ¼ *b* we obtain the coefficients of approximated solution *y t*ð Þ of Eq. (26).

*3.5.2 Numerical solutions of fractional differential equations using B-spline base*

We will introduce the B-spline technique for solving FrDE (26). Consider the quadratic B-spline base

$$\mathcal{S}(\mathfrak{x}) = \{ \mathcal{S}\_1(\mathfrak{x}), \mathcal{S}\_2(\mathfrak{x}), \mathcal{S}\_3(\mathfrak{x}), \dots, \mathcal{S}\_n(\mathfrak{x}) \},$$

Suppose

$$y(\mathbf{x}) = \sum\_{i=1}^{n} c\_i \mathbf{S}\_i(\mathbf{x}).$$

We assume that

$$\mathcal{Y}^a(\mathbf{x}) = \sum\_{i=1}^k c\_i \mathbb{S}\_i(\mathbf{x}). \tag{34}$$

X *k*

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

*ciSi*ð Þ� *<sup>x</sup> aA x*ð Þ� *aB x*ð Þ *<sup>a</sup>*<sup>0</sup> <sup>þ</sup><sup>X</sup>

Put *<sup>x</sup>* <sup>¼</sup> *tj* for *<sup>j</sup>* <sup>¼</sup> 1, 2, … , *<sup>n</sup>:* in Eq. (36) in case *<sup>α</sup>* <sup>¼</sup> <sup>1</sup>

*Aij* ¼ *hi*ð Þ *x tj*

*bi* ¼ *C tj*

*3.5.3 Numerical solution of fractional Lane differential equation*

coefficients of approximated solution *y t*ð Þ of Eq. (26).

*<sup>D</sup><sup>α</sup>y t*ðÞþ *<sup>k</sup>*

with the initial condition *y*ð Þ¼ 0 *A*; *y*<sup>0</sup>

In Eq. (41), consider *<sup>α</sup>*<sup>&</sup>gt; *<sup>β</sup>*, *f t*ð Þ¼ , *<sup>y</sup>* <sup>1</sup>

*k*

!

*ciFS*<sup>3</sup> 2,*<sup>i</sup>*ð Þ *x*

� �*FHα*, *i tj*

� � � *aa*0*B tj*

� �<sup>Þ</sup>

� �,

*<sup>t</sup><sup>α</sup>*�*<sup>β</sup> <sup>D</sup><sup>β</sup>y t*ðÞþ *f t*ð Þ¼ , *<sup>y</sup> g t*ð Þ; 0<sup>&</sup>lt; *<sup>t</sup>*≤1, *<sup>k</sup>*<sup>&</sup>gt; 0, (41)

ð Þ¼ 0 *B* where 1<*α* ≤2, 0< *β* ≤ 1 and *A*, *B*

¼ *C x*ð Þ*:* (40)

2 , ,

<sup>2</sup> , or Eq. (40) in case *<sup>α</sup>* <sup>¼</sup> <sup>3</sup>

*i*¼1

we get the linear system in which the matrix of coefficients has the following

� � � � <sup>þ</sup> *aB tj*

� � <sup>þ</sup> *aA tj*

for *i*, *j* ¼ 1, 2, … , *n:* By solving the linear system of coefficients, we obtain the

We generalize the definition of Lane-Emden equations up to fractional order as

are constants and *f t*ð Þ , *y* is a continuous real-valued function and *g t*ð Þ , *y* ∈½ � 0, 1 *:* The theory of singular boundary value problems has become an important area of investigation in the past three decades. One of the equations describing this type is the Lane-Emden equation. Lane-Emden type equations, first published by [12], and further explored in detail by [13], represents such phenomena and having significant applications, is a second-order ODE with an arbitrary index, known as the polytropic index, involved in one of its terms. The Lane-Emden equation describes a variety of phenomena in physics and astrophysics. [14] imposed the Lane-Emden DE of fractional order and the approximate solution is obtained by employing the method of power series and a numerical solution is established by the least squares method for these Eqs. [14] approximate the solution of DE by employing the method of power series and the numerical solution is established by collection

*3.5.3.1 Analysis of numerical method of fractional Lane differential equation*

the solution of DEs using Haar wavelet collocation method, [17] studied the

[15] studied the solution of DEs based on Haar operational matrix, [16] studied

*<sup>t</sup>α*þ<sup>2</sup> *y t*ð Þ and *g t*ðÞ¼ 0, .

numerical solution of DEs by using Haar wavelets, [18] used Haar wavelet approach to ODEs, [19] solved the fractional Riccati DEs using Haar wavelet while [14] studied the fractional DEs of Lane-Emden type numerically by method of collocation. [20] introduced an operational Haar wavelet method for solving fractional Volterra integral equations, [21] solved fractional integral equations by the Haar wavelet method, [22] used Haar wavelet-quasi linearization technique for fractional nonlinear DEs, [21] solved the fractional integral equations by the Haar wavelet method, [4] used Haar wavelet method for solving fractional PDEs numerically.

*i*¼1

formula:

and

following:

method.

**35**

If *<sup>α</sup>* <sup>¼</sup> <sup>1</sup> 2 , integrating Eq. (34) once, we get

$$y(\mathbf{x}) = a\_0 + \sum\_{i=1}^{k} c\_i F \mathbf{S}\_{\frac{1}{2}, i}(\mathbf{x}). \tag{35}$$

Substituting Eqs. (34) and (35) in Eq. (26), we get

$$\sum\_{i=1}^{k} c\_i \mathbb{S}\_i(\mathbf{x}) - aA(\mathbf{x}) - aB(\mathbf{x}) \left( a\_0 + \sum\_{i=1}^{k} c\_i F \mathbb{S}\_{\frac{1}{2}i}(\mathbf{x}) \right) = \mathcal{C}(\mathbf{x}).\tag{36}$$

If *<sup>α</sup>* <sup>¼</sup> <sup>3</sup> <sup>2</sup>, integrating Eq. (34) once, we get

$$y(\mathbf{x}) = a\_0 + a\_1 \mathbf{x} + \sum\_{i=1}^k c\_i F H\_{\frac{3}{2}i}(\mathbf{x}). \tag{37}$$

Substituting Eqs. (28) and (29) in Eq. (26), we get

$$y^\ddagger(\infty) = a\_1 + \sum\_{i=1}^k c\_i F H\_{\frac{1}{2}i}(\infty),\tag{38}$$

and

$$y(\mathbf{x}) = a\_0 + a\_1 \mathbf{x} + \sum\_{i=1}^k c\_i F H\_{\frac{3}{2}i}(\mathbf{x}),\tag{39}$$

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

$$\sum\_{i=1}^{k} c\_i \mathbf{S}\_i(\mathbf{x}) - a\mathbf{A}(\mathbf{x}) - a\mathbf{B}(\mathbf{x}) \left(a\_0 + \sum\_{i=1}^{k} c\_i \mathbf{F} \mathbf{S}\_{\frac{\mathbf{x}}{2}i}(\mathbf{x})\right) = \mathbf{C}(\mathbf{x}).\tag{40}$$

Put *<sup>x</sup>* <sup>¼</sup> *tj* for *<sup>j</sup>* <sup>¼</sup> 1, 2, … , *<sup>n</sup>:* in Eq. (36) in case *<sup>α</sup>* <sup>¼</sup> <sup>1</sup> <sup>2</sup> , or Eq. (40) in case *<sup>α</sup>* <sup>¼</sup> <sup>3</sup> 2 , , we get the linear system in which the matrix of coefficients has the following formula:

$$A\_{ij} = \left( h\_i(\boldsymbol{\omega}) \left( t\_j \right) \right) + aB \left( t\_j \right) FH\_a, i \left( t\_j \right) \left( \right)$$

and

$$b\_i = C(t\_j) + aA\left(t\_j\right) - aa\_0B\left(t\_j\right),$$

for *i*, *j* ¼ 1, 2, … , *n:* By solving the linear system of coefficients, we obtain the coefficients of approximated solution *y t*ð Þ of Eq. (26).

#### *3.5.3 Numerical solution of fractional Lane differential equation*

We generalize the definition of Lane-Emden equations up to fractional order as following:

$$D^a \mathbf{y}(t) + \frac{k}{t^{a-\beta}} D^\beta \mathbf{y}(t) + f(t, \mathbf{y}) = \mathbf{g}(t); \mathbf{0} < t \le \mathbf{1}, k > \mathbf{0}, \tag{41}$$

with the initial condition *y*ð Þ¼ 0 *A*; *y*<sup>0</sup> ð Þ¼ 0 *B* where 1<*α* ≤2, 0< *β* ≤ 1 and *A*, *B* are constants and *f t*ð Þ , *y* is a continuous real-valued function and *g t*ð Þ , *y* ∈½ � 0, 1 *:* The theory of singular boundary value problems has become an important area of investigation in the past three decades. One of the equations describing this type is the Lane-Emden equation. Lane-Emden type equations, first published by [12], and further explored in detail by [13], represents such phenomena and having significant applications, is a second-order ODE with an arbitrary index, known as the polytropic index, involved in one of its terms. The Lane-Emden equation describes a variety of phenomena in physics and astrophysics. [14] imposed the Lane-Emden DE of fractional order and the approximate solution is obtained by employing the method of power series and a numerical solution is established by the least squares method for these Eqs. [14] approximate the solution of DE by employing the method of power series and the numerical solution is established by collection method.

#### *3.5.3.1 Analysis of numerical method of fractional Lane differential equation*

[15] studied the solution of DEs based on Haar operational matrix, [16] studied the solution of DEs using Haar wavelet collocation method, [17] studied the numerical solution of DEs by using Haar wavelets, [18] used Haar wavelet approach to ODEs, [19] solved the fractional Riccati DEs using Haar wavelet while [14] studied the fractional DEs of Lane-Emden type numerically by method of collocation. [20] introduced an operational Haar wavelet method for solving fractional Volterra integral equations, [21] solved fractional integral equations by the Haar wavelet method, [22] used Haar wavelet-quasi linearization technique for fractional nonlinear DEs, [21] solved the fractional integral equations by the Haar wavelet method, [4] used Haar wavelet method for solving fractional PDEs numerically. In Eq. (41), consider *<sup>α</sup>*<sup>&</sup>gt; *<sup>β</sup>*, *f t*ð Þ¼ , *<sup>y</sup>* <sup>1</sup> *<sup>t</sup>α*þ<sup>2</sup> *y t*ð Þ and *g t*ðÞ¼ 0, .

However, *<sup>D</sup><sup>α</sup>W t*ðÞ¼ *ah t*ðÞ¼ <sup>P</sup>*<sup>m</sup> <sup>i</sup>*¼<sup>0</sup>*cihi*ð Þ*<sup>t</sup>* and

$$D^{\beta}W(t) = \left(I^{a-\beta}D^{a}\right)W(t) + W^{\beta}(\mathbf{0})$$

$$= ap^{a-\beta}h(t) + W^{\beta}(\mathbf{0})$$

$$W(t) = (I^{a}D^{a})W(t) + W(\mathbf{0})$$

$$= ap^{a}h(t) + A.$$

Hence,

$$ch\_t h(t) + \frac{k}{t^{\alpha-\beta}} ap^{\alpha-\beta} h(t) + \mathcal{W}^{\beta}(0) + ap^a h(t) + A = Ch(t).$$

If we consider *<sup>α</sup>* <sup>¼</sup> <sup>3</sup> <sup>2</sup> and *<sup>β</sup>* <sup>¼</sup> <sup>1</sup> <sup>2</sup> we solve the system of equations to obtain the coefficients ð Þ *c*0,*c*1,*c*2, … ,*cm* .

#### **3.6 Comparison study using numerical collection method**

Collocation method for solving DEs is one of the most powerful approximated methods. This method has its basis upon approximate the solution of FrDEs by a series of complete sequence of functions, a sequence of linearly independent functions which has no non-zero function perpendicular to this sequence of functions. In general, *y t*ð Þ is approximated by [14].

$$y(t) = \sum\_{i=1}^{n} a\_i \Theta\_i(t),\tag{42}$$

The exact solution is *w t*ðÞ¼ *t*

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

with the boundary conditions

**4. Wavelet transform (WT)**

The exact solution is *w t*ðÞ¼ *t t*ð Þ � <sup>1</sup> *<sup>e</sup><sup>t</sup>*

**Example 3.7** [8] Consider

<sup>2</sup>ð Þ *<sup>t</sup>* � <sup>1</sup> *:*.

*<sup>w</sup>*00ðÞ¼ *<sup>t</sup> w t*ð Þþ <sup>4</sup>*tet*

*w*ð Þ¼ 0 *w*ð Þ¼ 1 0*:*

Fourier transform (FT) of a time signal *x t*ð Þ reveals the frequency content of the

ð<sup>∞</sup> �∞ *x t*ð Þ*e*

However, FT cannot reveal the time information associated with a specific frequency. This drawback enhanced research in the time-frequency domain [23]. One of the most important time-frequency distributions (TFD's) is the wavelet transform (WT), which is a time-frequency representation of signals. While not all TFD's are invertible, a big advantage of WT over many other TFD's is invertibility. WT proved to be successful in revealing spectral features of signals. Instead of sustainable waves

decomposing signals using decaying waves (small waves, or wavelets), all are shifted and dilated versions of a specific wavelet called mother wavelet. The continuous wavelet transform (CWT) of a signal *x t*ð Þ using a mother wavelet *ψ*ð Þ*t* is given by:

where *λ* is a representation of time inside the convolution integral, *ψ* <sup>∗</sup> is the complex conjugate of the wavelet *ψ*, and *s* ∈ ℜ<sup>þ</sup> ¼ ℜ � f g0 is called the "scale", which we expect to be inversely related to the radian frequency *ω* ¼ 2*πf* for the above structure to be comparable to the structure of the sinusoidal waves sin *ω*ð Þ*t* used in the Fourier transform; the actual scale-frequency relationship is given by:

> *<sup>s</sup>*<sup>≈</sup> *<sup>K</sup> f*

frequency used to discretize *ψ*ð Þ*t* while computing *ψ*ð Þ*f* via DFT. It is apparent that,

*<sup>x</sup>* ð Þ¼ *t*, *s x t*ð Þ ⊙ *h t*ð Þ

ffiffi *<sup>s</sup>* <sup>p</sup> *<sup>ψ</sup>* <sup>∗</sup> �*<sup>t</sup> s* � � � �

*<sup>x</sup>*ð Þ*<sup>λ</sup> :<sup>ψ</sup>* <sup>∗</sup> *<sup>λ</sup>* � *<sup>t</sup>*

*s* � �*dλ*,

; *f <sup>m</sup>* ¼ *arg max* ð Þ f g *ψ*ð Þ*f* ; *ψ*ð Þ¼ *f F*f g *ψ*ð Þ*t* ; *fs* is the sampling

*<sup>x</sup>* ð Þ *t*, *s* is given by the convolution

�*j*2*<sup>π</sup>ftdt:*

signal by decomposing the signal using complex sinusoids as follows:

*X f* ð Þ¼ *F xt* f g ð Þ ¼

like sinusoidal waves as in the case of Fourier transform, WT is based on

1 ffiffi *s* p ð<sup>∞</sup> �∞

*W<sup>ψ</sup>*

for a fixed scale s, the wavelet transform *W<sup>ψ</sup>*

between the signal and the time-reversed wavelet as follows:

*W<sup>ψ</sup>*

*h t*ðÞ¼ <sup>1</sup>

where *K* ¼ *f <sup>m</sup>:fs*

where

**37**

*<sup>x</sup>* ð Þ¼ *t*, *s*

*:*

, (45)

where *ai* for *i* ¼ 1, 2, … , *n* are an arbitrary constants to be evaluated and Θ*<sup>i</sup>* for *i* ¼ 1, 2, … , *n* are given set of functions. Therefore, the problem in Eq. (41) of evaluating *y t*ð Þ is approximated by (42) then, is reduced to the problem of evaluating the coefficients for *i* ¼ 0, 1, 2, … , *n:*

Let f g *<sup>t</sup>*1, *<sup>t</sup>*2, … , *tn* is a partition to interval 0, 1 ½ � and *tj* <sup>¼</sup> *jh* and *<sup>h</sup>* <sup>¼</sup> <sup>1</sup> *<sup>n</sup>* and *j* ¼ 0, 1, 2, … , *n:* See the comparison of absolute errors of the problem using numerical collection method with polynomial basis and Haar wavelet basis.

**Example 3.5** [8]

Consider

$$
\omega''(t) + \pi^2 \omega(t) = \mathbf{0},\tag{43}
$$

with the boundary conditions

$$w(\mathbf{0}) = w(\mathbf{1}) = \mathbf{0}.$$

The exact solution is *w t*ðÞ¼ *sinπt:* **Example 3.6** [8] Consider

$$t^2 w''(t) - \mathfrak{G}w(t) = 4t^2,\tag{44}$$

with the boundary conditions

$$w(\mathbf{0}) = w(\mathbf{1}) = \mathbf{0}.$$

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

The exact solution is *w t*ðÞ¼ *t* <sup>2</sup>ð Þ *<sup>t</sup>* � <sup>1</sup> *:*. **Example 3.7** [8] Consider

$$
\omega''(t) = \omega(t) + 4te^t,\tag{45}
$$

with the boundary conditions

$$w(\mathbf{0}) = w(\mathbf{1}) = \mathbf{0}.$$

The exact solution is *w t*ðÞ¼ *t t*ð Þ � <sup>1</sup> *<sup>e</sup><sup>t</sup> :*

#### **4. Wavelet transform (WT)**

Fourier transform (FT) of a time signal *x t*ð Þ reveals the frequency content of the signal by decomposing the signal using complex sinusoids as follows:

$$X(f) = F\{\varkappa(t)\} = \int\_{-\infty}^{\infty} \varkappa(t)e^{-j2\pi ft}dt.$$

However, FT cannot reveal the time information associated with a specific frequency. This drawback enhanced research in the time-frequency domain [23]. One of the most important time-frequency distributions (TFD's) is the wavelet transform (WT), which is a time-frequency representation of signals. While not all TFD's are invertible, a big advantage of WT over many other TFD's is invertibility. WT proved to be successful in revealing spectral features of signals. Instead of sustainable waves like sinusoidal waves as in the case of Fourier transform, WT is based on decomposing signals using decaying waves (small waves, or wavelets), all are shifted and dilated versions of a specific wavelet called mother wavelet. The continuous wavelet transform (CWT) of a signal *x t*ð Þ using a mother wavelet *ψ*ð Þ*t* is given by:

$$\mathcal{W}\_{\varkappa}^{\psi}(t,s) = \frac{1}{\sqrt{s}} \int\_{-\infty}^{\infty} \varkappa(\lambda) . \psi^\* \left( \frac{\lambda - t}{s} \right) d\lambda\_\* $$

where *λ* is a representation of time inside the convolution integral, *ψ* <sup>∗</sup> is the complex conjugate of the wavelet *ψ*, and *s* ∈ ℜ<sup>þ</sup> ¼ ℜ � f g0 is called the "scale", which we expect to be inversely related to the radian frequency *ω* ¼ 2*πf* for the above structure to be comparable to the structure of the sinusoidal waves sin *ω*ð Þ*t* used in the Fourier transform; the actual scale-frequency relationship is given by:

$$s \approx \frac{K}{f}$$

where *K* ¼ *f <sup>m</sup>:fs* ; *f <sup>m</sup>* ¼ *arg max* ð Þ f g *ψ*ð Þ*f* ; *ψ*ð Þ¼ *f F*f g *ψ*ð Þ*t* ; *fs* is the sampling frequency used to discretize *ψ*ð Þ*t* while computing *ψ*ð Þ*f* via DFT. It is apparent that, for a fixed scale s, the wavelet transform *W<sup>ψ</sup> <sup>x</sup>* ð Þ *t*, *s* is given by the convolution between the signal and the time-reversed wavelet as follows:

$$\mathcal{W}\_{\mathfrak{x}}^{\psi}(t,s) = \mathfrak{x}(t) \oplus h(t)$$

where

$$h(t) = \left[\frac{1}{\sqrt{s}} \boldsymbol{\psi}^\* \left(\frac{-t}{s}\right)\right]$$

and ⊙ refers to the 1D convolution process:

$$\varkappa(t) \odot h(t) = \int\_{-\infty}^{\infty} \varkappa(\lambda)(h)(t-\lambda)d\lambda$$

where *t x*ð Þ is the new WT coefficient value to replace the original coefficient x, and T is the threshold. Better compression results (in terms of signal size) can be obtained by increasing the threshold, however, larger deviation from the original signal (i.e., larger error) is obtained. Hence, choice of the threshold involves a tradeoff between size and error. Original signal can be obtained from the compressed one

An important application of the Wavelet Transform is noise removal from signals and images. As most of the information content of real-life signals is in the low-frequency regions, removal of high frequency regions in the WT of signals can help in removing the majority of noise. This can be done via thresholding WT coefficients or by removing the details coefficients of WT and considering only the approximation coefficients of WT. This property of separating low-frequency content from high-frequency content in the WT is mainly due to the filtering involved in the structure of WT as explained above. Noise removal using WT is more efficient for 1D signals corrupted by 1D noise process, where the 2D structure of WT in joint time-frequency domain can spread the 1D noise effect into a 2D plane, hence the noise power is greatly reduced. For noise removal, a soft-threshold can be

*t x*ð Þ¼ *sign x*ð Þjð Þ *<sup>x</sup>*j�*<sup>T</sup>* <sup>∣</sup>*x*∣ ≥*<sup>T</sup>*

8 ><

>:

**Figure 3** shows the use of WT to denoise an image, while **Figure 4** shows the denoising of 1D signal using WT, where WT is performed on MATLAB via the

where *t x*ð Þ is the new WT coefficient value to replace the original coefficient *x*, *T*

0 ∣*x*∣<*T*

þ1 *x*> 0 0 *x* ¼ 0 �1 *x*< 0

(47)

(48)

via inverting the thresholded WT.

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

used to cut out high-frequency coefficients as follows:

�

is the threshold, and *sign x*ð Þ is the signum function defined as follows:

*sign x*ð Þ¼

**4.2 Noise removal using WT**

wavelet Daubechies 3,

**Figure 3.**

**39**

*Image denoising using WT with soft threshold.*

This fact gives another equivalent expression for *W<sup>ψ</sup> <sup>x</sup>* ð Þ *t*, *s* using Fourier transforms of the signal and the wavelet as follows:

$$\mathcal{W}\_{\ge}^{\nu}(t,s) = F^{-1}\{X(f).H(f)\} = \int\_{-\infty}^{\infty} X(f).H(f)e^{+j2\pi ft}df$$

where *H f* ð Þ¼ *F ht* f g ð Þ . Hence, *<sup>W</sup><sup>ψ</sup> <sup>x</sup>* ð Þ *t*, *s* can be implemented via filtering the signal *x t*ð Þ by a filter whose impulse response is *h t*ð Þ. This will be the basis for implementing the discrete 1D and 2D wavelet transforms as explained below.

Generally speaking, Fourier transform *X f* ð Þ¼ *F xt* f g ð Þ decomposes the signal *x t*ð Þ using the same sinusoidal wave *<sup>e</sup>*�*j*2*πft* at different values of frequency *<sup>f</sup>*, while the wavelet transform *W<sup>ψ</sup> <sup>x</sup>* ð Þ *t*, *s* decomposes the signal *x t*ð Þ using the same mother wavelet *ψ*ð Þ*t* at different values of scale s (hence, frequency, f) and time t; where both time and frequency information are revealed.

The WT is invertible, giving it a great advantage in applications:

$$\boldsymbol{\omega}(t) = \frac{1}{c\_{\psi}} \int\_{-\infty}^{\infty} \int\_{-\infty}^{\infty} \mathcal{W}\_{\boldsymbol{\chi}}^{\psi}(\boldsymbol{\lambda}, \boldsymbol{s}) \frac{1}{s^{2}} \boldsymbol{\varphi}\left(\frac{t - \boldsymbol{\lambda}}{s}\right) d\boldsymbol{\lambda} \, d\boldsymbol{s}$$

where *<sup>c</sup><sup>ψ</sup>* <sup>¼</sup> <sup>Ð</sup> <sup>∞</sup> �∞ ∣*ψ*ð Þ*f* ∣ <sup>∣</sup>*f*<sup>∣</sup> *df*, which implies that *<sup>ψ</sup>*ð Þ¼ <sup>0</sup> <sup>0</sup> ! <sup>Ð</sup> <sup>∞</sup> �<sup>∞</sup>*ψ*ð Þ*<sup>t</sup> dt* <sup>¼</sup> 0, hence, *ψ*ð Þ*t* must be oscillating. Also, to satisfy Parseval's Theorem we should have Ð <sup>∞</sup> �<sup>∞</sup>*ψ*ð Þ*<sup>t</sup> dt* <sup>¼</sup> <sup>1</sup>*:* The above continuous wavelet transform can be discretized to give the discrete wavelet transform (DWT), which can be implemented (as 1D DWT) by passing the signal *x t*ð Þ through a low-pass filter followed by down-sampling with a factor of 2 (giving approximation coefficients), and a high-pass filter then downsampling by a factor of 2 (giving detail coefficients). These filters differ according to the analyzing wavelet [24]. The 2D DWT (for images) can be designed based on 1D DWT via tensor products, and it results into a decomposition of approximation coefficients at level k into four components: low-pass component that contains the approximation coefficients at level k + 1, and three high-pass components that contain the detail coefficients in three directions (horizontal, vertical, and diagonal). Note that approximation at level k = 0 is equivalent to the original 2D signal [24].

#### **4.1 Some applications of the wavelet transform**

The frequency content extracted by wavelet transform (WT) has been effectively used in revealing important features of 1D and 2D signals. This property proved very useful in speech and image recognition [25]. Also, the orthogonality of WT paved the way for using WT in orthogonal frequency division multiplexing (OFDM), a pivotal technique for 4th and 5th generations of digital communication [26]. In addition to that, WT proved to put high focus on the low-frequency part of the signal, in which most of the information resides, hence, WT has been used for signal and image compression [27]. The compression process can be performed using hard-thresholding of the WT as follows:

$$t(\mathbf{x}) = \begin{cases} \mathbf{x} & |\mathbf{x}| \ge T \\ \mathbf{0} & |\mathbf{x}| < T \end{cases} \tag{46}$$

#### *Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

where *t x*ð Þ is the new WT coefficient value to replace the original coefficient x, and T is the threshold. Better compression results (in terms of signal size) can be obtained by increasing the threshold, however, larger deviation from the original signal (i.e., larger error) is obtained. Hence, choice of the threshold involves a tradeoff between size and error. Original signal can be obtained from the compressed one via inverting the thresholded WT.

#### **4.2 Noise removal using WT**

An important application of the Wavelet Transform is noise removal from signals and images. As most of the information content of real-life signals is in the low-frequency regions, removal of high frequency regions in the WT of signals can help in removing the majority of noise. This can be done via thresholding WT coefficients or by removing the details coefficients of WT and considering only the approximation coefficients of WT. This property of separating low-frequency content from high-frequency content in the WT is mainly due to the filtering involved in the structure of WT as explained above. Noise removal using WT is more efficient for 1D signals corrupted by 1D noise process, where the 2D structure of WT in joint time-frequency domain can spread the 1D noise effect into a 2D plane, hence the noise power is greatly reduced. For noise removal, a soft-threshold can be used to cut out high-frequency coefficients as follows:

$$t(\mathbf{x}) = \begin{cases} \text{sign}(\mathbf{x})(|\mathbf{x}| - T) & |\mathbf{x}| \ge T \\ \mathbf{0} & |\mathbf{x}| < T \end{cases} \tag{47}$$

where *t x*ð Þ is the new WT coefficient value to replace the original coefficient *x*, *T* is the threshold, and *sign x*ð Þ is the signum function defined as follows:

$$\text{sign}(\mathbf{x}) = \begin{cases} +1 & \mathbf{x} > \mathbf{0} \\ \mathbf{0} & \mathbf{x} = \mathbf{0} \\ -\mathbf{1} & \mathbf{x} < \mathbf{0} \end{cases} \tag{48}$$

**Figure 3** shows the use of WT to denoise an image, while **Figure 4** shows the denoising of 1D signal using WT, where WT is performed on MATLAB via the wavelet Daubechies 3,

**Figure 3.** *Image denoising using WT with soft threshold.*

**References**

2012.

2015.

2013.

no. 1, 2007.

2012.

2012.

**41**

[1] N. A. Ghani, "Numerical solution of eliiptic partial differential equations by haar wavelet operational matrix method," *Thesis, university Malaya*,

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

> [9] M. S. Mechee, "Numerical and approxmited solutions of partial

*of Bagdad,* 1991.

differential equations," *Thesis, university*

[10] D. Faires and Burden, *Numerical Methods.* Thomson Learning, 2003.

[11] M. S. Mechee, O. I. Al-Shaher, and

[12] J. Homer Lane, "On the theoretical temperature of the sun under the hypothesis of a gaseous mass

maintaining its volume by internal heat and depending on the laws of gases known to terrestrial experiment," *Am. J. Sci., 2d Ser,* vol. 50, pp. 57–74, 1870.

[13] R. Emden, "Gaskugeln, bg teubner, leipzig and berlin," *Google Scholar,*

[14] M. Mechee and N. Senu, "Numerical study of fractional differential equations of lane-emden type by method of collocation," *Applied Mathematics,* vol.

3, no. 08, pp. 851–856, 2012.

[15] N. Berwal, D. Panchal, and C. Parihar, "Solution of differential equations based on haar operational matrix," *Palestine journal of mathematics,*

vol. 3, no. 2, pp. 281–288, 2014.

dissertation, 2012.

[16] B. Sahoo, "A study on solution of differential equations using haar wavelet collocation method," Ph.D.

[17] Z. Shi, L.-Y. Deng, and Q.-J. Chen, "Numerical solution of differential equations by using haar wavelets," in *Wavelet Analysis and Pattern Recognition,*

*2007. ICWAPR'07. International*

p. 448, 1907.

G. A. Al-Juaifri, "Haar wavelet technique for solving fractional differential equations with an application," in *AIP Conference Proceedings*, vol. 2086, no. 1. AIP Publishing LLC, 2019, p. 030025.

[2] F. A. Shah and R. Abbas, "Haar wavelet operational matrix method for the numerical solution of fractional order differential equations," *Nonlinear Engineering*, vol. 4, no. 4, pp. 203–213,

[3] U. Saeed and M. ur Rehman, "Haar wavelet–quasilinearization technique for fractional nonlinear differential equations," *Applied Mathematics and Computation,* vol. 220, pp. 630–648,

[4] L. Wang, Y. Ma, and Z. Meng, "Haar wavelet method for solving fractional

numerically," *Applied Mathematics and Computation,* vol. 227, pp. 66–76, 2014.

[5] Ü. Lepik, "Application of the haar wavelet transform to solving integral and differential equations," in *Proceedings of the Estonian Academy of Sciences, Physics, Mathematics,* vol. 56,

[6] Z. Shi and Y. Cao, "Application of haar wavelet method to eigenvalue problems of high order differential equations," *Applied Mathematical Modelling,* vol. 36, no. 9, pp. 4020–4026,

[7] S. M. Aznam, "A study of the hyperbolic heat conduction problem and laplace inversion using generalized haar wavelet operational matrix method," *Thesis, university Malaya,*

[8] O. I. A.-S. . M. S. Mechee, "A study of haar wallet for solving differential equations with some applications," *Thesis, university of Kufa,* 2018.

partial differential equations

**Figure 4.** *1D signal denoising using WT with a hard threshold.*

#### **5. Discussion and conclusion**

The numerical solutions of differential equations using Haar wavelet technique have been studied. Haar wavelet technique is used to approximate the solutions of DEs. The results which obtained form numerical solutions of ordinary differential equations as well as fractional differential equations by Haar collection method are compared with spline base. The numerical results have clearly shown the advantage and the efficiency of the techniques in terms of accuracy and computational time. Special initial value problem of Lane-Emden equation has been solved to show the applicability and efficacy of the Haar wavelet method. Wavelet transform as a mathematical approach has been studied and the applications of wavelet transform in signal processing field have been introduced. The wavelet transform has been effectively used to reveal on the features signals and the compression of signal and image.

## **Author details**

Mohammed S. Mechee<sup>1</sup> \*, Zahir M. Hussain<sup>1</sup> and Zahrah Ismael Salman<sup>2</sup>

1 University of Kufa, Najaf, Iraq

2 Department of Mathematics, Faculty of Basic Education, Misan University, Amarah, Iraq

\*Address all correspondence to: mohammeds.abed@uokufa.edu.iq

© 2020 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

*Wavelet Theory: Applications of the Wavelet DOI: http://dx.doi.org/10.5772/intechopen.94911*

#### **References**

[1] N. A. Ghani, "Numerical solution of eliiptic partial differential equations by haar wavelet operational matrix method," *Thesis, university Malaya*, 2012.

[2] F. A. Shah and R. Abbas, "Haar wavelet operational matrix method for the numerical solution of fractional order differential equations," *Nonlinear Engineering*, vol. 4, no. 4, pp. 203–213, 2015.

[3] U. Saeed and M. ur Rehman, "Haar wavelet–quasilinearization technique for fractional nonlinear differential equations," *Applied Mathematics and Computation,* vol. 220, pp. 630–648, 2013.

[4] L. Wang, Y. Ma, and Z. Meng, "Haar wavelet method for solving fractional partial differential equations numerically," *Applied Mathematics and Computation,* vol. 227, pp. 66–76, 2014.

[5] Ü. Lepik, "Application of the haar wavelet transform to solving integral and differential equations," in *Proceedings of the Estonian Academy of Sciences, Physics, Mathematics,* vol. 56, no. 1, 2007.

[6] Z. Shi and Y. Cao, "Application of haar wavelet method to eigenvalue problems of high order differential equations," *Applied Mathematical Modelling,* vol. 36, no. 9, pp. 4020–4026, 2012.

[7] S. M. Aznam, "A study of the hyperbolic heat conduction problem and laplace inversion using generalized haar wavelet operational matrix method," *Thesis, university Malaya,* 2012.

[8] O. I. A.-S. . M. S. Mechee, "A study of haar wallet for solving differential equations with some applications," *Thesis, university of Kufa,* 2018.

[9] M. S. Mechee, "Numerical and approxmited solutions of partial differential equations," *Thesis, university of Bagdad,* 1991.

[10] D. Faires and Burden, *Numerical Methods.* Thomson Learning, 2003.

[11] M. S. Mechee, O. I. Al-Shaher, and G. A. Al-Juaifri, "Haar wavelet technique for solving fractional differential equations with an application," in *AIP Conference Proceedings*, vol. 2086, no. 1. AIP Publishing LLC, 2019, p. 030025.

[12] J. Homer Lane, "On the theoretical temperature of the sun under the hypothesis of a gaseous mass maintaining its volume by internal heat and depending on the laws of gases known to terrestrial experiment," *Am. J. Sci., 2d Ser,* vol. 50, pp. 57–74, 1870.

[13] R. Emden, "Gaskugeln, bg teubner, leipzig and berlin," *Google Scholar,* p. 448, 1907.

[14] M. Mechee and N. Senu, "Numerical study of fractional differential equations of lane-emden type by method of collocation," *Applied Mathematics,* vol. 3, no. 08, pp. 851–856, 2012.

[15] N. Berwal, D. Panchal, and C. Parihar, "Solution of differential equations based on haar operational matrix," *Palestine journal of mathematics,* vol. 3, no. 2, pp. 281–288, 2014.

[16] B. Sahoo, "A study on solution of differential equations using haar wavelet collocation method," Ph.D. dissertation, 2012.

[17] Z. Shi, L.-Y. Deng, and Q.-J. Chen, "Numerical solution of differential equations by using haar wavelets," in *Wavelet Analysis and Pattern Recognition, 2007. ICWAPR'07. International*

*Conference on,* vol. 3. IEEE, 2007, pp. 1039–1044.

[18] R. Chen, "Haar wavelet approach to ordinary differential equation," Ph.D. dissertation, California State Polytechnic University, Pomona, 2016.

[19] Y.-l. Li and L. Hu, "Solving fractional riccati differential equations using haar wavelet," in *Information and Computing (ICIC), 2010 Third International Conference on,* vol. 1. IEEE, 2010, pp. 314–317.

[20] H. Saeedi, N. Mollahasani, M. M. Moghadam, and G. N. Chuev, "An operational haar wavelet method for solving fractional volterra integral equations," *International Journal of Applied Mathematics and Computer Science,* vol. 21, no. 3, pp. 535–547, 2011.

[21] Ü. Lepik, "Solving fractional integral equations by the haar wavelet method," *Applied Mathematics and Computation,* vol. 214, no. 2, pp. 468– 478, 2009.

[22] U. Saeed and M. Rehman, "Haar wavelet picard method for fractional nonlinear partial differential equations," *Applied Mathematics and Computation,* vol. 264, pp. 310–322, 2015.

[23] Z. M. Hussain and B. Boashash, "Design of time-frequency distributions for amplitude and if estimation of multicomponent signals," in *Proceedings of the Sixth International Symposium on Signal Processing and its Applications (Cat. No. 01EX467),* vol. 1. IEEE, 2001, pp. 339–342.

[24] Y. Meyer and D. H. Salinger, "Wavelets and operators," 1995.

[25] M. P. Sampat, Z. Wang, S. Gupta, A. C. Bovik, and M. K. Markey, "Complex wavelet structural similarity: A new image similarity index," *IEEE transactions on image processing,* vol. 18, no. 11, pp. 2385–2401, 2009.

[26] K. Abdullah, A. Z. Sadik, and Z. M. Hussain, "On the dwt-and wpt-ofdm versus fft-ofdm," in *2009 5th IEEE GCC Conference & Exhibition.* IEEE, 2009, pp. 1–5.

[27] N. Al-Hinai, K. Neville, A. Z. Sadik, and Z. M. Hussain, "Compressed image transmission over fft-ofdm: A comparative study," in *2007 Australasian Telecommunication Networks and Applications Conference.* IEEE, 2007, pp. 465–469.

Section 2

Wavelet Theory and

Communication Systems

**43**

## Section 2
