0% found this document useful (0 votes)
43 views17 pages

2D-BP Paper

This document presents a numerical method to solve time-dependent Emden-Fowler type equations based on two-dimensional Bernstein polynomials. The method converts the problem into a system of algebraic equations that can be linear or nonlinear. Several examples are provided to demonstrate the effectiveness and accuracy of the proposed method.

Uploaded by

Habib Rahman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views17 pages

2D-BP Paper

This document presents a numerical method to solve time-dependent Emden-Fowler type equations based on two-dimensional Bernstein polynomials. The method converts the problem into a system of algebraic equations that can be linear or nonlinear. Several examples are provided to demonstrate the effectiveness and accuracy of the proposed method.

Uploaded by

Habib Rahman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

mathematics

Article
An Efficient Scheme for Time-Dependent
Emden-Fowler Type Equations Based on
Two-Dimensional Bernstein Polynomials
Ahmad Sami Bataineh 1,2 , Osman Rasit Isik 3 , Abedel-Karrem Alomari 4 ,
Mohammad Shatnawi 5 and Ishak Hashim 2, *
1 Department of Mathematics, Faculty of Science, Al-Balqa’ Applied University, Al Salt 19117, Jordan;
[email protected]
2 Department of Mathematical Sciences, Faculty of Science & Technology, Universiti Kebangsaan Malaysia,
Bangi 43600 UKM, Selangor, Malaysia
3 Elementary Mathematics Education Program, Faculty of Education, Mugla Sitki Kocman University,
Mugla 48000, Turkey; [email protected]
4 Department of Mathematics, Faculty of Science, Yarmouk University, Irbid 21163, Jordan;
[email protected]
5 Department of Basic Science, Al-Huson University College, Al-Balqa’ Applied University, P.O. Box 50,
Al-Huson, Irbid 21510, Jordan; [email protected]
* Correspondence: [email protected]

Received: 29 June 2020; Accepted: 27 August 2020; Published: 1 September 2020 

Abstract: In this study, we introduce an efficient computational method to obtain an approximate


solution of the time-dependent Emden-Fowler type equations. The method is based on the
2D-Bernstein polynomials (2D-BPs) and their operational matrices. In the cases of time-dependent
Lane–Emden type problems and wave-type equations which are the special cases of the problem,
the method converts the problem to a linear system of algebraic equations. If the problem has a
nonlinear part, the final system is nonlinear. We analyzed the error and give a theorem for the
convergence. To estimate the error for the numerical solutions and then obtain more accurate
approximate solutions, we give the residual correction procedure for the method. To show the
effectiveness of the method, we apply the method to some test examples. The method gives more
accurate results whenever increasing n, m for linear problems. For the nonlinear problems, the method
also works well. For linear and nonlinear cases, the residual correction procedure estimates the error
and yields the corrected approximations that give good approximation results. We compare the results
with the results of the methods, the homotopy analysis method, homotopy perturbation method,
Adomian decomposition method, and variational iteration method, on the nodes. Numerical results
reveal that the method using 2D-BPs is more effective and simple for obtaining approximate solutions
of the time-dependent Emden-Fowler type equations and the method presents a good accuracy.

Keywords: Bernstein polynomials; operational matrices; Emden-Fowler equation

1. Introduction
The heat equation which expresses the diffusion of heat can be given by the following form [1–3]:

∂2 y r ∂y ∂y
2
( x, t) + ( x, t) + a f ( x, t) g(y( x, t)) + h( x, t) = ( x, t), 0 < x ≤ L, 0 < t < T, (1)
∂x x ∂x ∂t
subject to
y(0, t) = α, y x (0, t) = 0, (2)

Mathematics 2020, 8, 1473; doi:10.3390/math8091473 www.mdpi.com/journal/mathematics


Mathematics 2020, 8, 1473 2 of 17

where y( x, t) represents the temperature and t the time, r > 0 and a is an integer, α is a constant and
the term f ( x, t) g(y) + h( x, t) is the nonlinear heat source, where f , g and h are some smooth functions.
For the steady case with h( x, t) = 0 and r = 2, Equation (1) is the Emden-Fowler equation [4–6], that is,

∂2 y 2 ∂y
+ + a f ( x ) g(y) = 0. (3)
∂x2 x ∂x

In addition, if f ( x ) = 1, then Equation (3) becomes the Lane–Emden equation of mathematical


physics [7,8].
In this work, we study the numerical solution, which is a simply applied and effective
method, of the time-dependent Emden-Fowler type equations. First, the heat-type Equation (1)
is considered. To solve Equation (1) by the proposed numerical technique, an operational matrix based
on two-dimensional Bernstein polynomials is constructed. Second, with the same notations, we obtain
the approximate solutions of the following wave-type equation:

∂2 y r ∂y ∂2 y
( x, t ) + ( x, t ) + a f ( x, t ) g ( y ( x, t )) + h ( x, t ) = ( x, t), (4)
∂x2 x ∂x ∂t2
subject to
y(0, t) = α, y x (0, t) = 0. (5)

The main issue arisen in the analysis of Equations (1) and (4) is treating the singularity at x = 0.
To overcome this singularity behavior at this point, there are some semi-analytical methods which
are used to solve nonlinear problems in the literature such as Adomian’s decomposition method
(ADM) [1,5], homotopy analysis method (HAM) [9–12], variational iteration method (VIM) [4,13–17],
and homotopy perturbation method (HPM) [18–22]. Wazwaz [5] used ADM to get approximate
analytic solutions of (3). He obtained more accurate results for several examples. Another study
by Wazwaz [1] for time-dependent Emden-Fowler equation was given with a generalization of the
previous work. He employed ADM to solve Equations (1) and (4) and obtained convergent results for
several examples. Chowdhury and Hashim [3] applied HPM to get approximate analytical solutions
of (1) and (4). Bataineh et al. [6] applied HAM to solve the problems (1) and (4). Belal et al. [23] used
VIM to solve this problem.
Since the operational matrices method can achieve the singularity behavior at the point x = 0,
it has been applied to some singular problems. Yousefi and Behroozifar [24] applied the Bernstein
operational matrix to solve the Emden-Fowler equation for the steady-state case. The same problem
was considered by Gupta and Sharma [25] and solved by the Taylor series method. Another work to
solve the steady-state problem was given by Wazwaz et al. [26]. They applied VIM to the problem.
When only the Lane–Emden equation is considered, there are many numerical methods that depend on
ADM [27,28], VIM [29–32], HPM [8,33], and operational matrices method [34] or Bernstein collocation
method [35] were used to get analytic or numerical solutions.
The methods based on operational matrix of differentiation were given in various forms in the
literature. Some of them were constituted by Chebyshev polynomials [36], Legendre polynomials [37],
and Bernstein polynomials [38–44]. One of the common properties of these polynomials is the basis of
polynomial spaces. On the other hand, because of Bernstein polynomials are dense in L2 (Ω) [45] and
thus yields good approximation results, they have been used often recently to solve the problems in
two-dimensions. The Bernstein operational matrices method is also known as the Bernstein matrix
method [44] and Bernstein series solution [35].
In this work, we shall develop a method based Bernstein operational matrices to solve the
nonlinear problem 1. The method is applied easily and presents a good accuracy. We first give Bernstein
polynomials in 1D and 2D in Section 2. The matrix representations of the approximate functions and
their operational matrices for both dimensions are given next. Section 3 presents the method of solution
for heat-type and wave-type equations. In Section 4, we constitute the residual correction procedure
Mathematics 2020, 8, 1473 3 of 17

both to estimate the absolute error and to get the corrected approximate solutions. The most important
property of the procedure can be applied even if the exact solution is unknown. Section 5 contains
some examples including linear and nonlinear models to demonstrate the applicability of the method.
First, we apply the method to time-dependent Lane–Emden type problems and singular wave-type
equations. We perform the method for different number of nodes. The numerical results show that
increasing number of nodes gives a sequence of approximations, which converges to the exact solution,
for linear problems. The method also gives good results for nonlinear problems. Residual correction
procedure estimates the error in general. On the other hand, the corrected approximate solutions can
be obtained and its error is less than the approximate solution. We compare the approximate solutions
obtained by the method with the approximate solutions obtained by ADM, HPM, HAM, and VIM by
calculating the error on some nodes in [0, L] × [0, T ]. In the last section, we summarize the results.

2. 2D Bernstein Polynomials (2D-BPs) and Their Operational Matrices


In this section, because of defining two-dimensional Bernstein polynomials easily, we will give
one-dimensional, Bernstein polynomials first. The Bernstein polynomials of degree m (1D-BPs) on
[0, 1] are defined as [46]
 
m i
Bi,m ( x ) = x (1 − x ) m −i , i = 0, 1, . . . , m, (6)
i

where (mi) = m!
i! (m−i )!
with Bi,m = 0 if i < 0 or i > m. Equation (6) can be rewritten as
 
m i
Bi,m ( x ) = x (1 − x ) m −i
i
 !
m i m −i k m−i
  
= x ∑ (−1) xk
i k =0
k
m −i
m − i k +i
  
k m
= ∑ (− 1 )
i k
x , i = 0, 1, . . . , m.
k =0

Let y : I → R be any real-valued continuous function. The truncated Bernstein polynomials


approximation of y is
m
y( x ) ' ym ( x ) = ∑ ci Bi,m (x) = Cm Φm (x), (7)
i =0

where

Cm = [c0 , c1 , . . . , cm ],
Φm ( x ) = [B0,m ( x ), B1,m ( x ), . . . , Bm,m ( x )]T .

To ease computational complexity, the matrix representations of


n o
(k)
y0m ( x ), y00m ( x ), . . . , ym ( x )
Mathematics 2020, 8, 1473 4 of 17

are to be determined. Let (Ai+1 )1,j and Tm ( x ) be 1 × (m + 1) and (m + 1) × 1 matrices respectively for
j = 0, 1, . . . , m as follows:
(
0, j < i,
(Ai+1 )1,j = j − i m m −i
(−1) ( i )( j−i ), j ≥ i.
 
1 (8)
x
 
Tm ( x ) =   ..  .

 . 
xm
Then, the polynomial Bi,m ( x ) is given by

Bi,m ( x ) = Ai+1 Tm ( x ), (9)

which gives the identity:


Φ( x ) = ATm ( x ), (10)

where  
A1
 A 
 2 
A 
 
A=
 3 . (11)
 .. 
 . 
Am +1
Note that
Tm ( x ) = A−1 Φ ( x ), (12)

and     
0 0 0 0 0 0 1
 1  1 0
   0 ··· 0  x 
 

T0m ( x ) =  2x  = 0 2 0 ··· 0  x2  = LTm ( x ),


    
(13)
 ..   .. .. .. .. ..   .. 
    
 .  . . . . .  . 
mx m−1 0 0 ··· m 0 xm
where  
0 0 0 0 0
1
 0 0 ··· 0 
0 2 0 ··· 0 .
 
L= (14)
 .. .. .. .. .. 
 
. . . . .
0 0 ··· m 0
By using (10), we write y0m ( x ) as

y0m ( x ) = CΦ0 ( x ) = CAT0m ( x ) = CALTm ( x )


= CALA−1 Φ( x ) = CDΦ( x ), (15)

where D = ALA−1 . Similarly, for higher-order derivatives of ym ( x ), one has

y00m ( x )
= C(Φ0 ( x ))0 = C(DΦ0 ( x )) = CD2 Φ( x ),
..
.
(k)  ( k −1)
ym ( x ) = C Φ0 ( x ) = C (DΦ( x ))(k−1) = · · · = CDk Φ( x ).
Mathematics 2020, 8, 1473 5 of 17

The Bernstein polynomials of degree mn (2D-BPs) on [0, 1] × [0, 1] are defined as [47,48]
  
m,n m n i
Bi,j ( x, t) = x (1 − x ) m −i t j (1 − t ) n − j , (i = 0, 1, . . . , m, j = 0, 1, . . . , n),
i j

which can be rewritten as [45]

m −i n − j
m−i n − j i + k j +r
    
m n
m,n
Bi,j ( x, t) = ∑ ∑ (−1) k +r
i j k r
x t . (16)
k =0 r =0

Theorem 1 ([45]). Let Ω = [0, 1] × [0, 1]. The set of all two-dimensional Bernstein polynomials
m,n ∞
=0 on the box Ω is dense in L ( Ω ).
{ Bi,j ( x, t)}i,j 2

Figure 1 shows the two components of the two-dimensional Bernstein polynomials of order (5,5).

0.16 0.35

0.14 0.3

0.12
0.25
0.1
0.2
5,5

5,5
B1,3

B0,3

0.08
0.15
0.06
0.1
0.04

0.02 0.05

0 0
1 1
0.8 1 0.8 1
0.6 0.8 0.6 0.8
0.4 0.6 0.4 0.6
0.4 0.4
0.2 0.2
0.2 0.2
t 0 0 x t 0 0 x

(a) (b)
Figure 1. Two components of the two-dimensional Bernstein polynomials of order (5,5): (a) B5,5
0,2 ( x, t )
and (b) B5,5
1,3 ( x, t ).

Now, assume that y is a real-valued function defined on Ω ⊂ R2 . We want to approximate y( x, t)


by the truncated 2D-BPs series, i.e.,
m n
y( x, t) ' ym,n ( x, t) = ∑ ∑ ci,j Bi,jm,n (x, t). (17)
i =0 j =0

If the identity in [47] is applied to (17), we get


m n m n
∑ ∑ ci,j Bi,jm,n (x, t) = ∑ ∑ ci,j Bi,m (x)Bj,n (t). (18)
i =0 j =0 i =0 j =0

Then, ym,n in (17) can be found using

ym,n ( x, t) = CT Θ( x )Ψ(t), (19)


Mathematics 2020, 8, 1473 6 of 17

where
C = [ci,j ]T1×(m+1)(n+1) = [c0,0 , c0,1 , . . . , c0,n , . . . , cm,0 , cm,1 , . . . , cm,n ]T ,
 
Φ( x ) 0 ··· 0
 0 Φ( x ) ··· 0 
 
Θ( x ) = 
 .. .. .. ..  ,
 . . . . 
(20)
0 0 ··· Φ( x )
h i
Ψ(t) = B0,n (t) B1,n (t) · · · Bn,n (t) ,
h i
B j,n (t) = B j,n (t) B j,n (t) · · · B j,n (t) .

The partial derivatives ∂y/∂x and ∂y/∂t can be approximated as

∂y ∂ym,n ∂Θ
( x, t) ' ( x, t)= C ( x ) Ψ ( t ), (21)
∂x ∂x ∂x
∂y ∂ym,n ∂Ψ
( x, t) ' ( x, t)= CΘ( x ) (t). (22)
∂t ∂t ∂t
Upon using (9), (13), and (15), one gets the identities
 ∂Φ 
(x) 0 ··· 0
 ∂x 
 ∂Φ 
dΘ  0 (x) ··· 0 
(x) = ∂x
 
dx  .. .. .. .. 
 
 . . . . 
 
∂Φ
0 0 ··· (x)
 ∂x 
DΦ( x ) 0 ··· 0
 0

DΦ( x ) ··· 0 

=  .
 . .. .. .. 
 . . . . 

0 0 · · · DΦ( x )
= DΦ( x ), (23)
 
dΨ ∂B(0,n) (t) ∂B(1,n) (t) ∂B(n,n) (t) T
(t) = ···
dt ∂t ∂t ∂t
h i
= A1 LTn (t) A2 LTn (t) · · · An+1 LTn (t)
= ALTn (t), (24)

where
 
DΦ( x ) 0 ··· 0
 0 DΦ( x ) · · · 0 
 
DΦ( x ) =  .
 . .. .. ..  ,
 . . . . 
0 0 · · · DΦ( x )
h i
ALTn (t) = A1 LTn (t) A2 LTn (t) · · · An+1 LTn (t) .
Mathematics 2020, 8, 1473 7 of 17

Hence, we get

∂ym,n
( x, t) = CDΦ( x )Ψ(t), (25)
∂x
∂ym,n
( x, t) = CΘ( x )ALTn (t). (26)
∂t
For the higher-order derivatives, we have

∂s ym,n
( x, t) = CDs1 Φ( x )ALs2 Tn (t), s = s1 + s2 , s1 6= 0, s2 6= 0, (27)
∂x s1 ∂ts2
∂s ym,n
( x, t) = CDs Φ( x )Ψ(t),
∂x s
s
∂ ym,n
( x, t) = CΘ( x )ALs Tn (t).
∂ts

3. Solving Heat-Type and Wave-Type Equations by 2D-BPs


To approximate the solution of (1) subject to the initial condition (2), one substitutes the identities
in (25), (26), and (27) into (1). The residual Re( x, t) are given by
r
Re( x, t) = CD2 Φ( x )Ψ(t) + CDΦ( x )Ψ(t) + a f ( x, t) g (CΘ( x )Ψ(t))
x
+ h( x, t) − CΘ( x )ALTn (t). (28)

Taking the nodes

{( xi , ti ) : 0 < x1 < . . . < xm−1 = 1, 0 ≤ t1 < . . . < tn+1 = 1} ⊂ [0, 1] × [0, 1], (29)

in (28), we obtain (m − 1)(n + 1) equations


r
Re( xi , t j ) = CD2 Φ( xi )Ψ(ti ) + CDΦ( xi )Ψ(ti ) + a f ( xi , ti ) g (CΘ( xi )Ψ(ti ))
xi
+ h( xi , ti ) − CΘ( xi )ALTn (ti ), i = 1, 2, . . . , m − 1, j = 1, 2, . . . , n + 1. (30)

The conditions (2) then yield

∂y
y(0, t j ) = CΘ(0)Ψ(t j ) = α, (0, t) = CDΦ(0)Ψ(t j ) = 0. (31)
∂x

Thus, we have (m + 1)(n + 1) equations. By solving these equations by the command ’fsolve’
which uses Newton’s method for the unknown coefficients Ci,j , we can find the matrix C so that
ym,n ( x, t) is obtained.
In this study, we select the collocation nodes as Newton–Cotes points

2i − 1 2j − 1
xi = , tj = , i = 1, . . . , (m + 1), j = 1, . . . , (n + 1). (32)
2( m + 1) 2( n + 1)

When applied to the wave-type Equation (4), we get the following:


r
Re( xi , t j ) = CD2 Φ( xi )Ψ(ti ) + CDΦ( xi )Ψ(t) + a f ( xi , ti ) g (CΘ( xi )Ψ(ti ))
xi
+ h( xi , ti ) − CΘ( xi )AL2 Tn (ti ),
(i = 1, 2, . . . , m − 1, j = 1, 2, . . . , n + 1), (33)
∂y
y(0, t j ) = CΘ(0)Ψ(t j ) = α, (0, t j ) = CDΦ(0)Ψ(t j ) = 0.
∂x
Mathematics 2020, 8, 1473 8 of 17

4. Error Analysis
In this section, we first give the Bernstein series that converges for the function in C1 . The residual
correction procedure is given to estimate the absolute error and to obtain corrected approximate
solutions. To determine the convergence of the method, we define the constant Mn+1 as follows.

Definition 1. Suppose that Ω = [0, 1] × [0, 1] and for k = 0, 1, . . . , n, f (k) ∈ C1 (Ω), then

n n
∂i + j y xi t j 1
f ( x, t) − ∑ ∑ ∂x j ∂t j (0, 0) i!j! ≤ Mn+1 (n + 1)! (x + t)n+1 , (34)

i =0 j =0

where all partial derivatives of f of order n + 1 are bounded in magnitude Mn+1 , which is
∂ n +1
Mn+1 = sup f ( ) , k = 0, 1, . . . , n + 1.

ζ, τ
(ζ,τ )∈Ω ∂ζ k ∂τ n+1−k

Now, the main theorem of function approximation using 2D-BPs are stated as follows.

∂k
Theorem 2. Consider m, n ∈ N and Ω = [0, 1] × [0, 1], η = max{m, n}. Let ∂x k ∂ti−k
f ( x, t) ∈ C1 (Ω),
k = 0, 1, . . . , η, i = 0, 1, . . . , k. Next, suppose that

m,n m,n m,n


Ym,n = span < B0,0 , B0,1 , . . . , Bm,n >.

Approximating f ( x, t) by f m,n ( x, t) in the space Ym,n as


m n
f ( x, t) ' f m,n ( x, t) = ∑ ∑ ci,j Bi,m (x) Bj,n (t), (35)
i =0 j =0

where f m,n is the best approximation out of Ym,n and supposing that
Z 1Z 1
Em,n ( f ) = [ f ( x, t) − f m,n ( x, t)]2 dxdt, (36)
0 0

then
lim Em,n ( f ) = 0. (37)
m,n→∞

Proof. Let
m n
∂i + j f xi t j
f¯m,n ( x, t) = ∑ ∑ ∂x j ∂t j (0, 0) i!j! . (38)
i =0 j =0

Therefore, by considering Definition 1 and by taking η = max{m, n}, we get

1
| f ( x, t) − f¯m,n ( x, t)| ≤ Mη +1 ( x + t ) η +1 (39)
( η + 1) !
Mathematics 2020, 8, 1473 9 of 17

By considering Taylor’s expansion formula in Definition 1, one has

k f ( x, t) − f m,n ( x, t)k22 ≤ k f ( x, t) − f¯m,n ( x, t)k


≤ k f ( x, t) − f¯η,η ( x, t)k
Z 1Z 1
= [ f ( x, t) − f¯η,η ( x, t)]2 dxdt
0 0
Mη2 +1 Z 1Z 1
= ( x + t)2η +2 dxdt
( η + 1) ! 0 0
Mη2 +1 22η +4 − 2
= . (40)
(η + 1)! (2η + 3)(2η + 4)

Hence, we get
lim k f ( x, t) − f m,n ( x, t)k22 = 0. (41)
m,n→∞

This concludes the proof.

Now, we constitute residual correction procedure for the problem. Let y(x, t) be the exact and ym,n (x, t)
the 2D-BPs approximate solutions of Equation (1), respectively. Writing em,n (x, t) = y(x, t) − ym,n (x, t)
as the error, then

∂2 em,n r ∂em,n ∂em,n


+ + a f g(ym,n + em,n ) − = R( x, t), (42)
∂x2 x ∂x ∂t
∂em,n
em,n (0, t) = α, (0, t) = 0,
∂x
where
∂2 ym,n r ∂ym,n ∂ym,n
R( x, t) = + − + h( x, t).
∂x2 x ∂x ∂t
Substituting the approximate solution along with the constructed operational matrix in (42) yields
the residual equation Reerr ( x, t) for the error as
r
Reerr ( x, t) = Cerr D2 Φ( x )Ψ(t) + Cerr DΦ( x )Ψ(t) + a f ( x, t) g [Cerr Θ( x )Ψ(t)
x
+ ym,n ( x, t)] − Cerr Θ( x )ALTn (t)+ R( x, t). (43)

To solve Equation (43) numerically, we compute it at the following collocation points:



( xi , ti ) : 0 < x1 < . . . < xs−1 = 1, 0 ≤ t1 < . . . < t p+1 = 1 ⊂ [0, 1] × [0, 1]. (44)

Applying the proposed method to (43) with the given initial conditions gives us the coefficient
matrix Cerr so that we get an approximate solution ẽs,p for the error. Hence, ym,n + ẽs,p is another
approximate solution, which is called the corrected 2D-BPs approximate solution for the problem.
In practice, selecting s ≥ m, p ≥ n yields better approximation results.
s,p
The solution ym,n := ym,n + ẽs,p improves the approximation ym,n provided that
s,p
em,n − ẽs,p = y − (ym,n + ẽs,p ) ≤
ym,n .

(45)

Similar definitions and results can be given for the wave-type Equation (4).

5. Application to Several Test Problems


The applicability of the proposed 2D-BPS method is demonstrated via several test problems.
To simulate the results, three types of equations are selected. Our results are compared with the
Mathematics 2020, 8, 1473 10 of 17

methods of ADM, HPM, VIM, and HAM with h = −1. We use the Newton–Cotes points (32) and
Maple 15 to simulate the numerical outlets with 50-digit precision.

5.1. Time-Dependent Lane–Emden Type Problems


Example 1. Consider
2
y xx + y x − (6 + 4x2 − cos t)y = yt , (46)
x
subject to
y(0, t) = esin t , y x (0, t) = 0. (47)

The exact solution is [1–4]:

x4 x6 x8
 
2
y( x, t) ' esin t 1 + x2 + + + + · · · = e x +sin t . (48)
2! 3! 4!

To solve the above problem via the proposed method, we get from Equations (30) and (31) and Equations (46)
and (47)

2
Re( x, t) = CD2 Φ( x )Ψ(t) + CDΦ( x )Ψ(t) − (6 + 4x2 − cos t)CΘ( x )Ψ(t)
x
s
− CΘ( x )AL Tn (t), (49)

CΘ(0)Ψ(t j ) = esin t j , CT CDΦ(0)Ψ(t j ) = 0. (50)

Substituting (32) into Equations (49) and (50) for m = n = 3 yields a system of linear equations for the
unknown coefficients Ci,j , which once computed numerically gives

y3,3 ( x, t) = 1.0057(1 − x )3 (1 − t)3 + 3.0171x (1 − x )2 (1 − t)3


+ 3.9180x2 (1 − x )(1 − t)3 + 2.3768x3 (1 − t)3
+ 3.9414(1 − x )3 t(1 − t)2 + 11.8243x (1 − x )2 t(1 − t)2
+ 15.4612x2 (1 − x )t(1 − t)2 + 9.4559x3 t(1 − t)2
+ 5.6529(1 − x )3 t2 (1 − t) + 16.9589x (1 − x )2 t2 (1 − t)
+ 22.0396x2 (1 − x )t2 (1 − t) + 13.3483x3 t2 (1 − t)
+ 2.3250(1 − x )3 t3 + 6.9751x (1 − x )2 t3
+ 9.0971x2 (1 − x )t3 + 5.5510x3 t3 .

We perform the method to the problem for various n = m, s = p = 10 and s = p = 20. The results
are given in Tables 1 and 2. As seen from the tables, increasing n gives the decreasing error sequence
while the computational time increases. On the other hand, residual correction procedure estimates
the error well for n 6= p. The corrected solutions are more accurate than the solutions for n < p.
We give the computational costs of the method in Table 3. Increasing n = m yields more computational
costs which means that the method needs more computational times, numbers of multiplications,
summations, assignments, and storages for big n, m. As a result, we can say that the numbers n, m are
selected as not too big or not too small. It seems to be suitable for selecting n = m around 10 for
Example 1.
The graphs of |e12,12 |, |ẽ15,15 | and |y − (y12,12 + ẽ15,15 )| are plotted in Figure 2 which also depicts
the absolute errors of the 5th-order approximate solutions of ADM, HPM, HAM and VIM [1–4].
We also give a comparison for the method with HAM and VIM in Table 4 for different nodes number.
It can be seen from Figure 2 and Table 4 that the corrected 2D-BPs approximate solution yields better
approximate results than the results obtained by ADM, HPM, HAM, and VIM. Moreover, the residual
correction procedure estimates the error more accurately.
Mathematics 2020, 8, 1473 11 of 17

Table 1. The norms of absolute errors, the estimation of the errors by using the residual correction
procedure, and the errors obtained by the corrected approximate solutions of Example 1 for s = p = 10.

n=m 3 4 5 6 7
ken,n k∞ 0.7547 0.2304 0.0773 0.0183 4.45 × 10−3
kẽ10,10 k∞ 0.7965 0.2249 0.0739 0.0180 4.53 × 10−3
ken,n − ẽ10,10 k∞ 4.17 × 10−2 5.46 × 10−3 3.42 × 10−3 3.06 × 10−4 8.09 × 10−5
Run time (s) 0.032 0.094 0.156 0.359 0.734
n 8 9 10 11 12
ken,n k∞ 9.28 × 10−4 2.04 × 10−4 3.94 × 10−5 7.28 × 10−6 1.19 × 10−5
kẽ10,10 k∞ 9.18 × 10−4 1.65 × 10−4 1.08 × 10−5 1.69 × 10−6 6.71 × 10−8
ken,n − ẽ10,10 k∞ 9.76 × 10−6 3.93 × 10−5 3.94 × 10−5 8.97 × 10−6 1.26 × 10−6
Run time (s) 1.357 2.543 4.540 7.675 12.293

Table 2. The results for Example 1 and s = p = 20.

n=m 4 6 8 10 12
ken,n k∞ 0.2304 0.0183 9.28 × 10−4 3.94 × 10−5 1.19 × 10−6
kẽ20,20 k∞ 0.2249 0.0180 9.56 × 10−4 3.82 × 10−5 1.22 × 10−6
ken,n − ẽ20,20 k∞ 5.42 × 10−3 2.68 × 10−4 2.85 × 10−5 1.22 × 10−6 2.94 × 10−8
Run time (s) 0.094 0.359 1.357 4.540 13.448
n 14 16 18 20 22
ken,n k∞ 3.22 × 10−8 7.45 × 10−10 1.33 × 10−11 2.71 × 10−13 3.39 × 10−15
kẽ20,20 k∞ 3.21 × 10−8 7.29 × 10−10 1.39 × 10−11 7.73 × 10−40 4.97 × 10−16
ken,n − ẽ20,20 k∞ 1.95 × 10−10 1.67 × 10−11 6.18 × 10−13 2.71 × 10−13 3.89 × 10−15
Run time (s) 30.389 71.090 150.509 300.521 534.194

Table 3. The computational costs of the obtaining Re( xi , t j ) of the method for 0 ≤ i, j ≤ n in the Maple
code for Example 1.

n=m Multiplications Assignments Additions Storage


5 7827 217 3901 217
10 40,955 727 5503 727
15 309,207 1537 184,281 1537
20 851,768 2647 549,717 2647

Table 4. The results of the 2D-BPM, HAM, and VIM for Example 1.

n=5 8 10 15
Degree of polynomial
(degree 10) (degree 16) (degree 20) (degree 30)
2D-BPM 0.0773 9.28 × 10−4 3.94 × 10−5 7.45 × 10−10
max. abs. error
Run time (s) 0.156 1.357 4.540 71.090
m=2 m=4 m=6 m=8
HAM
(degree 8) (degree 16) (degree 24) (degree 32)
max. abs. error 0.1933 1.22 × 10−3 1.94 × 10−6 2.00 × 10−9
Run time (s) 0.188 0.327 0.499 0.717
m=2 m=4 m=6 m=8
VIM
(degree 8) (degree 16) (degree 24) (degree 32)
max. abs. error 0.1933 1.22 × 10−3 1.94 × 10−6 1.09 × 10−9
Run time (s) 0.218 0.343 0.483 0.686
Mathematics 2020, 8, 1473 12 of 17

−6 −6
x 10 x 10

1.2 1.4

1 1.2

Estimating Abs-Error |ẽ15,15 |


1
0.8

Abs-Error |e12,12|
0.8
0.6
0.6
0.4
0.4

0.2 0.2

0 0
1 1
0.8 1 0.8 1
0.6 0.8 0.6 0.8
0.4 0.6 0.4 0.6
0.4 0.4
0.2 0.2
0.2 0.2
t 0 0 x t 0 0 x

(a) (b)

−8
x 10

Corrected Abs-Error |y − (y12,12 + ẽ15,15 )| 2.5

1.5

0.5

0
1
0.8 1
0.6 0.8
0.4 0.6
0.4
0.2
0.2
t 0 0 x

(c)
Figure 2. (a) absolute error, (b) estimated absolute error, and (c) corrected absolute error for 2D-BPs
solution for Example 1.

5.2. Singular Wave-Type Equations


Example 2. We consider now

2
y xx + y x − (5 + 4x2 )y = ytt + (12x − 5x3 − 4x5 ),
x
y(0, t) = e−t , y x (0, t) = 0,

where the exact solution is


2 −t
y( x, t) = x3 + e x . (51)

The solution in series form by ADM [1], HAM [2], and HPM [3] is

x4 x6 x8
 
y( x, t) ' x3 + e−t 1 + x2 + + + +··· . (52)
2! 3! 4!

We applied the method to the problem for various m 6= n. We can say from Table 5 that the norm
of the absolute error decreases when m, n increases. The procedure estimates the error well and the
corrected solutions are better than the solutions in the norm. The absolute error and corrected absolute
error for s = p = 18 are shown in Figure 3. We also give the solutions of the problem by ADM, HPM,
and HAM [1–3] to make a comparison in the same figure. We can conclude from this figure that the
corrected absolute error is better than the absolute error, also better than the absolute error of ADM,
HPM, and HAM.
Mathematics 2020, 8, 1473 13 of 17

Table 5. The norms of absolute errors, the estimation of the errors by using the residual correction
procedure, and the errors obtained by the corrected approximate solutions of Example 2 for s = 16 and
p = 18.

m = 4, n = 5 m = 6, n = 5 m = 6, n = 8 m = 7, n = 9
kem,n k∞ 0.0993 9.38 × 10−3 7.75 × 10−3 1.96 × 10−3
kẽ16,18 k∞ 0.0976 7.71 × 10−3 7.74 × 10−3 1.96 × 10−3
kem,n − ẽ16,18 k∞ 1.68 × 10−3 1.68 × 10−3 6.38 × 10−6 8.23 × 10−7
Run time (s) 0.062 0.218 0.624 1.201
m = 10, n = 8 m = 12, n = 10 m = 14, n = 12 m = 15, n = 16
kem,n k∞ 2.29 × 10−5 6.23 × 10−7 1.50E-8 2.14 × 10−9
kẽ16,18 k∞ 1.65 × 10−5 5.25 × 10−7 1.36 × 10−8 1.83 × 10−9
kem,n − ẽ16,18 k∞ 6.38 × 10−6 9.81 × 10−8 1.42 × 10−9 3.13 × 10−10
Run time (s) 2.480 7.051 18.096 50.279

−8 −8
x 10 x 10

1.4 1.4

1.2 1.2

Estimating Abs-Error |ẽ18,18 |


1 1
Abs-Error |e14,14|

0.8 0.8

0.6 0.6

0.4 0.4

0.2 0.2

0 0
1 1
0.8 1 0.8 1
0.6 0.8 0.6 0.8
0.4 0.6 0.4 0.6
0.4 0.4
0.2 0.2
0.2 0.2
t 0 0 x t 0 0 x

(a) (b)

−11
x 10

1.6
Corrected Abs-Error |y − (y14,14 + ẽ18,18 )|

1.4

1.2

0.8

0.6

0.4

0.2

0
1
0.8 1
0.6 0.8
0.4 0.6
0.4
0.2
0.2
t 0 0 x

(c)

Figure 3. (a) absolute error; (b) estimated absolute error; (c) corrected absolute error for 2D-BPs solution
for Example 2.

5.3. Nonlinear Models


Example 3. Consider

5
y xx + y x + (24t + 16t2 x2 )ey − 2x2 ey/2 = yt , (53)
x
y(0, t) = 0, y x (0, t) = 0. (54)

The exact solution of the problem [1–4] is y( x, t) = −2 ln(1 + tx2 ). We apply the method to the
linear problem for various m = n and apply the procedure for s = p = 9. The results are given
in Tables 6 and 7. As seen from the tables, increasing m = n yields more accurate results, whereas
the computational times increase. On the other hand, the proposed method yields a much better
approximate solution than the solutions obtained by ADM, HAM, and HPM [1–3], of order 5. We plot
the error, the estimation of the error, and the corrected error for m = n = 8 and ms = p = 9 in Figure 4.
Mathematics 2020, 8, 1473 14 of 17

We can say from the figures that the estimation by using the procedure fits the error well and the
corrected error is smaller than the error.

Table 6. The norms of absolute errors, the estimation of the errors by using the residual correction
procedure, and the errors obtained by the corrected approximate solutions of Example 3 for s = p = 9.

n=m 5 7 9
ken,n k∞ 2.48 × 10−4 4.43 × 10−5 2.66 × 10−6
kẽ9,9 k∞ 2.45 × 10−4 4.70 × 10−5 5.65 × 10−12
ken,n − ẽ9,9 k∞ 2.66 × 10−6 2.66 × 10−6 2.66 × 10−6
Run time (s) 1.638 20.155 107.251

Table 7. The results of the 2D-BPM and HAM for Example 3.

Degree of polynomial n = 4 (degree 8) 6 (degree 12) 8 (degree 16)


2D-BPM 1.87 × 10−3 1.57 × 10−4 2.86 × 10−5
max. abs. error
Run time (s) 0.422 4.680 44.398
HAM m = 2 (degree 8) m = 3 (degree 12) m = 6 (degree 24)
max. abs. error 1.1130 1.3272 3.0520
Run time (s) 1.778 1.950 2.340

−5 −9
x 10 x 10

2.5 4

3.5
2
3
Abs-Error |ẽ9,9 |
Abs-Error |e8,8 |

1.5 2.5

2
1 1.5

1
0.5
0.5

0 0
1 1
0.8 1 0.8 1
0.6 0.8 0.6 0.8
0.4 0.6 0.4 0.6
0.4 0.4
0.2 0.2
0.2 0.2
t 0 0 x t 0 0 x

(a) (b)

−6
x 10

2.5
Corrected Abs-Error |y − (y8,8 + ẽ9,9 )

1.5

0.5

0
1
0.8 1
0.6 0.8
0.4 0.6
0.4
0.2
0.2
t 0 0 x

(c)
Figure 4. (a) absolute error; (b) estimated absolute error; (c) corrected absolute error for 2D-BPs solution
for Example 3.

6. Conclusions
In this study, we have proposed a numerical method to solve time-dependent Emden-Fowler
type equations. In the numerical scheme, the 2D-BPs are utilized. The residual correction procedure is
applied to estimate the error of the approximate solution. By using the suggested procedure, we obtain
a new approximate solution which is more accurate than the 2D-BPs approximate solution. The error
analysis as well as convergence of the proposed method have been investigated. We applied the
method to several test problems including linear and nonlinear problems and also compared with
Mathematics 2020, 8, 1473 15 of 17

some other methods to show the efficiency of the new method. As seen from the results of text
examples, increasing the node numbers n, m yields a sequence which converges to the exact solution
for all examples in the norm. The computational times and necessary operations in the code increase if
n, m increases. Hence, the optimum n, m values are observed around 10. The procedure estimates the
error with a good accuracy for n, m 6= s, p. In addition, by using the procedure, more accurate results
are obtained. We can conclude that the obtained results are consistent with the results of ADM, HPM,
HAM, and VIM. Especially for the nonlinear problem, the method gives better approximate solutions
with respect to the semi-analytic methods.

Author Contributions: Conceptualization, A.S.B., O.R.I., A.-K.A., M.S. and I.H.; methodology, A.S.B., O.R.I.,
A.-K.A. and M.S.; software, A.S.B., O.R.I., A.-K.A. and M.S.; validation, A.S.B., O.R.I., A.-K.A., M.S. and I.H.;
formal analysis, A.S.B., O.R.I., A.-K.A. and M.S.; investigation, A.S.B., O.R.I., A.-K.A. and M.S.; writing-original
draft preparation, A.S.B., O.R.I., A.-K.A. and M.S.; writing-review and editing, A.S.B., O.R.I., A.-K.A., M.S. and
I.H.; funding acquisition, I.H.. All authors have read and agreed to the published version of the manuscript
Funding: We are grateful for the financial support received from the Universiti Kebangsaan Malaysia under the
research grant GP-2019-K006388.
Conflicts of Interest: All authors declare that they have no conflict of interest.

References
1. Wazwaz, A.M. Analytical solution for the time-dependent Emden-Fowler type of equations by Adomian
decomposition method. Appl. Math. Comput. 2005, 166, 638–651. [CrossRef]
2. Bataineh, A.S.; Noorani, M.S.M.; Hashim, I. Solutions of time-dependent Emden-Fowler type equations by
homotopy analysis method. Phys. Letts. A 2007, 371, 72–82. [CrossRef]
3. Chowdhury, M.S.H.; Hashim, I. Solutions of time-dependent Emden-Fowler type equations by
homotopy-perturbation method. Phys. Letts. A 2007, 368, 305–313. [CrossRef]
4. Batiha, K. Approximate analytical solutions for time-dependent Emden-Fowler-type equations by variational
iteration method. Am. J. Appl. Sci. 2007, 4, 439–443. [CrossRef]
5. Wazwaz, A.M. Adomian decomposition method for a reliable treatment of the Emden-Fowler equation.
Appl. Math. Comput. 2005, 161, 543–560. [CrossRef]
6. Bataineh, A.S.; Noorani, M.S.M.; Hashim, I. Homotopy analysis method for singular IVPs of Emden-Fowler
type. Commun. Nonlinear Sci. Numer. Simulat. 2009, 14, 1121–1131. [CrossRef]
7. Chandrasekhar, S. An Introduction to the Study of Stellar Structure; Dover Publications: New York, NY,
USA, 1957.
8. Ramos, J.I. Series approach to the Lane–Emden equation and comparison with the homotopy perturbation
method. Chaos Solitons Fractals 2008, 38, 400–408. [CrossRef]
9. Liao, S.J. The Proposed Homotopy Analysis Technique for the Solution of Nonlinear Problems. Ph.D. Thesis,
Shanghai Jiao Tong University, Shanghai, China, 1992.
10. Liao, S.J. Beyond Perturbation: Introduction to Homotopy Analysis Method; Chapman and Hall/CRC Press:
Boca Raton, FL, USA, 2003; p. 321.
11. Liao, S.J. On the homotopy analysis method for nonlinear problems. Appl. Math. Comput. 2004, 147, 499–513.
[CrossRef]
12. Liao, S.J. Comparison between the homotopy analysis method and homotopy perturbation method.
Appl. Math. Comput. 2005, 169, 1186–1194. [CrossRef]
13. He, J.H. A new approach to nonlinear partial differential equation. Commun. Nonlinear Sci. Numer. Simul.
1997, 2, 230–235. [CrossRef]
14. He, J.H. Approximate analytical solution for seepage flow with functional derivatives in porous media.
Comput. Methods Appl. Mech. Eng. 1998, 167, 57–68. [CrossRef]
15. He, J.H. Approximate solution of nonlinear differential equations with convolution roduct nonlinearities.
Comput. Methods Appl. Mech. Eng. 1998, 167, 69–73. [CrossRef]
16. He, J.H. Variational iteration method-a kind of nonlinear analytical technique: Some examples. Int. J.
Non-Linear Mech. 1999, 34, 699–708. [CrossRef]
Mathematics 2020, 8, 1473 16 of 17

17. He, J.H. Variational iteration method for autonomous ordinary differential systems. Appl. Math. Comput.
2000, 114, 115–123. [CrossRef]
18. He, J.H. Homotopy perturbation method: A new nonlinear analytical technique. Appl. Math. Comput. 2003,
135, 73–79. [CrossRef]
19. He, J.H. Asymptotology by homotopy perturbation method. Appl. Math. Comput. 2004, 156, 591–596.
[CrossRef]
20. He, J.H. The homotopy perturbation method for nonlinear oscillators with discontinuities.
Appl. Math. Comput. 2004, 151, 287–292. [CrossRef]
21. He, J.H. Application of homotopy perturbation method to nonlinear wave equations. Chaos Solitons Fractals
2005, 26, 695–700. [CrossRef]
22. He, J.H. Homotopy perturbation method for bifurcation of nonlinear problems. Int. J. Nonlinear Sci.
Numer. Simul. 2005, 6, 207–208. [CrossRef]
23. Batiha, B.; Noorani, M.S.N.; Hashim, I. Application of variational iteration method to heat and wave-like
equations. Phys. Letts. A 2007, 369, 55–61. [CrossRef]
24. Yousefi, S.A.; Behroozifar, M. Operational matrices of Bernstein polynomials and their applications. Int. J.
Syst. Sci. 2010, 41, 709–716. [CrossRef]
25. Gupta, V.G.; Sharma, P. Solving singular initial value problems of Emden-Fowler and Lane–Emden type.
Int. J. Appl. Math. Comput. Sci. 2009, 1, 206–212.
26. Wazwaz, A.M. Solving two Emden-Fowler type equations of third order by the variational iteration method.
Appl. Math. Inf. Sci. 2015, 9, 2429–2436.
27. Wazwaz, A.-M. A new algorithm for solving differential equations of Lane–Emden type. Appl. Math. Comput.
2001, 118, 287–310. [CrossRef]
28. Rach, R.; Wazwaz, A.M.; Duan, J.S. The Volterra integral form of the Lane–Emden equation: New derivations
and solution by the Adomian decomposition method. J. Appl. Math. Comput. 2015, 47, 365–379. [CrossRef]
29. Dehghan, M.; Shakeri, F. Approximate solution of a differential equation arising in astrophysics using the
variational iteration method. New Astron. 2008, 13, 53–59. [CrossRef]
30. Yildirim, A.; Ozis, T. Solutions of singular IVPs of Lane–Emden type by the variational iteration method,
Nonlinear Analy. Theory Methods Appl. 2009, 70, 2480–2484. [CrossRef]
31. Zomot, N.H.; Ababneh, O.Y. Solution of differential equations of Lane–Emden type by combining integral
transform and variational iteration method. Nonlinear Analy. Diff. Equ. 2016, 4, 143–150. [CrossRef]
32. Ghorbani, A.; Bakherad, M. A variational iteration method for solving nonlinear Lane–Emden problems.
New Astron. 2017, 54, 1–6. [CrossRef]
33. Rafig, A.; Hussain, S.; Ahmed, M. General homotopy method for Lane–Emden type differential equations.
Int. J. Appl. Math. Mech. 2009, 5, 75–83.
34. Kumar, N.; Pandey, R. Solution of the Lane–Emden equation using the Bernstein operational matrix of
integration. ISRN Astron. Astrophys. 2011, 2011, 351747. [CrossRef]
35. Isik, O.R.; Sezer, M. Bernstein series solution of a class of Lane–Emden type equations. Math. Probl. Eng.
2013, 2013, 423797. [CrossRef]
36. Bhrawya, A.H.; Alofi, A.S. The operational matrix of fractional integration for shifted Chebyshev polynomials.
Appl. Math. Lett. 2013, 26, 25–31. [CrossRef]
37. Kashkari, B.S.; Syam, M.I. Fractional-order Legendre operational matrix of fractional integration for solving
the Riccati equation with fractional order. Appl. Mathe. Comput. 2016, 290, 281–291. [CrossRef]
38. Pandey, R.K.; Kumar, N. Solution of Lane–Emden type equations using Bernstein operational matrix of
differentiation. New Astron. 2012, 17, 303–308. [CrossRef]
39. Maleknejad, K.; Basirat, B.; Hashemizadeh, E. A Bernstein operational matrix approach for solving a
system of high order linear Volterra-Fredholm integro-differential equations. Math. Comput. Model. 2012,
55, 1363–1372. [CrossRef]
40. Yousefi, S.A.; Behroozifar, M.; Dehghan, M. The operational matrices of Bernstein polynomials for solving
the parabolic equation subject to specification of the mass. J. Comput. Appl. Math. 2011, 335, 5272–5283.
[CrossRef]
41. Yousefi, S.; Behroozifar, M.; Dehghan, M. Numerical solution of the nonlinear age-structured population
models by using the operational matrices of Bernstein polynomials. Appl. Math. Model. 2012, 36, 945–963.
[CrossRef]
Mathematics 2020, 8, 1473 17 of 17

42. Maleknejad, K.; Hashemizadeh, E.; Basirat, B. Computational method based on Bernstein operational
matrices for nonlinear Volterra-Fredholm-Hammerstein integral equations. Commun. Nonlinear Sci.
Numer. Simulat. 2012, 17, 52–61. [CrossRef]
43. Parand, K.; Hossayni, S.A.; Rad, J.A. Operation matrix method based on Bernstein polynomials for the Riccati
differential equation and Volterra population model. Appl. Math. Model. 2016, 40, 993–1011. [CrossRef]
44. Bataineh, A.S.; Isik, O.R.; Hashim, I. Bernstein method for the MHD flow and heat transfer of a second grade
fluid in a channel with porous wall. Alex. Eng. J. 2016, 55, 2149–2156. [CrossRef]
45. Nemati, A. Numerical solution of 2D fractional optimal control problems by the spectral method along with
Bernstein operational matrix. Int. J. Control 2018, 91, 2632–2645. [CrossRef]
46. Bhatti, M.I.; Bracken, P. Solutions of differential equations in a Bernstein polynomial basis. J. Comput.
Appl. Math. 2007, 205, 272–280. [CrossRef]
47. Hosseini Shekarabi, F.; Maleknejad, K.; Ezzati, R. Application of two-dimensional Bernstein polynomials for
solving mixed Volterra-Fredholm integral equations. Afr. Mat. 2015, 26, 1237–1251. [CrossRef]
48. Asgari, M.; Ezzati, R. Using operational matrix of two-dimensional Bernstein polynomials for solving
two-dimensional integral equations of fractional order. Appl. Math. Comput. 2017, 307, 290–298. [CrossRef]

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

You might also like