numerical solutions of a class of non-linear ......hermite matrix collocation method we now are...

13
Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351 S339 NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ORDINARY DIFFERENTIAL EQUATIONS IN HERMITE SERIES by Coskun GULER a * , Saba Ozge KAYA a , and Mehmet SEZER b a Department of Mathematical Engineering, Faculty of Chemical and Metallurgical Engineering, Yildiz Technical University, Istanbul, Turkey b Department of Mathematics, Faculty of Science and Letters, Manisa Celal Bayar University, Manisa, Turkey Original scientific paper https://doi.org/10.2298/TSCI181215047G The purpose of this paper is to present a Hermite polynomial approach for solv- ing a high-order ODE with non-linear terms under mixed conditions. The method we used is a matrix method based on collocation points together with truncat- ed Hermite series and reduces the solution of equation to solution of a matrix equation which corresponds to a system of non-linear algebraic equations with unknown Hermite coefficients. In addition, to illustrate the validity and appli- cability of the method, some numerical examples together with residual error analysis are performed and the obtained results are compared with the existing result in literature. Key words: Hermite polynomials and series, non-linear ODE, matrix and collocation method Introduction Non-linear ODE play an important role in many physical and technical applications and are essential tools for modelling many physical situations [1-9] such as chemical reac- tions, spring-mass systems, bending of beams and so forth. Most of these type equations have no analytical solution and numerical methods are required to obtain approximate solutions [1-3]. Recently, authors in [10-15] have presented the matrix and collocation methods for solv- ing linear and non-linear differential and integral equations in terms of special polynomials. In this study, we develop the mentioned matrix and collocation for solving the m th -order ODE with non-linear terms in the form: ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 2 0 0 0 p m k p q k pq k p q P xy x Q xy xy x gx = = = + = ∑∑ (1) under the mixed conditions: ( ) ( ) ( ) () ( ) () 1 0 m k k k kj kj kj j k a y a by b cy c λ = + + = (2) and apply to find the approximate solution in the truncated Hermite series: * Corresponding author, e-mail: [email protected]

Upload: others

Post on 15-Nov-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351 S339

NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ORDINARY DIFFERENTIAL EQUATIONS IN HERMITE SERIES

by

Coskun GULER a*, Saba Ozge KAYA a, and Mehmet SEZER ba Department of Mathematical Engineering, Faculty of Chemical and Metallurgical Engineering,

Yildiz Technical University, Istanbul, Turkey b Department of Mathematics, Faculty of Science and Letters, Manisa Celal Bayar University,

Manisa, Turkey

Original scientific paper https://doi.org/10.2298/TSCI181215047G

The purpose of this paper is to present a Hermite polynomial approach for solv-ing a high-order ODE with non-linear terms under mixed conditions. The method we used is a matrix method based on collocation points together with truncat-ed Hermite series and reduces the solution of equation to solution of a matrix equation which corresponds to a system of non-linear algebraic equations with unknown Hermite coefficients. In addition, to illustrate the validity and appli-cability of the method, some numerical examples together with residual error analysis are performed and the obtained results are compared with the existing result in literature.Key words: Hermite polynomials and series, non-linear ODE,

matrix and collocation method

Introduction

Non-linear ODE play an important role in many physical and technical applications and are essential tools for modelling many physical situations [1-9] such as chemical reac-tions, spring-mass systems, bending of beams and so forth. Most of these type equations have no analytical solution and numerical methods are required to obtain approximate solutions [1-3]. Recently, authors in [10-15] have presented the matrix and collocation methods for solv-ing linear and non-linear differential and integral equations in terms of special polynomials. In this study, we develop the mentioned matrix and collocation for solving the mth-order ODE with non-linear terms in the form:

( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )2

0 0 0

pmk p q

k pqk p q

P x y x Q x y x y x g x= = =

+ =∑ ∑∑ (1)

under the mixed conditions:

( ) ( ) ( ) ( ) ( ) ( )1

0

mk k k

kj kj kj jk

a y a b y b c y c λ−

=

+ + = ∑ (2)

and apply to find the approximate solution in the truncated Hermite series:

* Corresponding author, e-mail: [email protected]

Page 2: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... S340 THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351

0

( ) ( ) ( ), N

N n nn

y x y x a H x a x b=

≅ = −∞ < ≤ ≤ < ∞∑ (3)

Here ( ), ( ), and ( )k pqP x Q x g x are the functions defined on the interval a−∞ < ≤x b≤ ≤ < ∞ ; ,, , and kj kj kj ja b c λ are appropriate constants, ( 0,1, , )na n N m= … ≥ are unknown

Hermite coefficients to be determined, ( ) , 0,1, ,nH x n N= … , are the Hermite polynomials de-fined:

2 2

2

0

( 1) !2( )( 2 )! !

nk n k

n kn

k

nH x xn k k

−−

=

−=

−∑

(4)

These polynomials are orthogonal on ( , )−∞ ∞ with respect to weight function 2

( ) e xw x −= and generally defined by Rodrigues:

2 2 ( )( ) ( 1) e (e )n x x n

nH x −= − (5)The first few Hermite polynomials can be given as, explicit expressions from eqs. (4)

to (5):

2 3 4 20 1 2 3 4( ) 1, ( ) 2 , ( ) 4 2, ( ) 8 12 , ( ) 16 48 12H x H x x H x x H x x x H x x x= = = − = − = − +

Also, the sequence of Hermite polynomials, ( )nH x , satisfies the recurrence relation:

( )1 0 1 0( ) 2 ( ) with 0, ( ) 2 ( ) n nH x nH x H x H x H x−′ ′ ′= = = (6)

Fundamental matrix relations

Let us consider the mth-order non-linear differential eq. (1) and find the matrix forms of each term in the equation. We firstly convert the solution ( )y x by a truncated Hermite series (3) to matrix form:

( ) ( ) ( )Ny x y x H x A≅ = (7)where

[ ]0 1( ) ( ) ( ) ( )NH x H x H x H x=

[ ]0 1 TNA a a a=

Also, by using the expression (6), for 0,1, ,n N= … , we find the recurrance relation between the matrix ( )H x and its derivative ( ) ( )kH x as:

( ) ( ) ( ) , 0,1, ,k kH x H x M k m= = … (8)where

0

0 2 0 01 0 0

0 0 4 00 1 0

, 0 0 0 2

0 0 10 0 0 0

M MN

= =

By using eqs. (7) and (8), we have the matrix relation:

Page 3: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351 S341

( ) ( ) ( )( ) ( ) ( ) ( ) , 0,1, ,k k k kNy x y x H x A H x M A k m≅ = = = … (9)

In addition, we can obtain the following matrix forms of the expressions (0) 2[ ( )]y x , (1) (0) ( ) ( )y x y x , (1) 2[ ( )]y x , (2) (1)( ) ( )y x y x , (2) (0)( ) ( )y x y x and (2) 2[ ( )]y x , by means of similar oper-

ations as (7)-(9) [12, 16]:

2(0) ( ) ( ) ( )y x H x H x A = (10.1)

(1) (0)( ) ( ) ( ) ( )y x y x H x MH x A= (10.2)

2(1) ( ) ( ) ( )y x H x MH x MA = (10.3)

(2) (1) 2( ) ( ) ( ) ( )y x y x H x M H x MA= (10.4)

(2) (0) 2( ) ( ) ( ) ( )y x y x H x M H x A= (10.5)

2(2) 2 2( ) ( ) ( )y x H x M H x M A = (10.6)

where

(0) (1) (2)( ) ( ), ( ) ( ), ( ) ( ) y x y x y x y x y x y x′ ′′= = =

[ ] ( ) ( )21 1( ) diag ( ) ( ) ( ) ; ( )

N NH x H x H x H x H x

+ × += …

[ ] ( ) ( )2 21 1diag ;

N NM M M M M

+ × += …

( ) ( )2 22 2 2 2 21 1diag ; N NM M M M M + × + = …

( ) ( )2

0 0

1 1

1 1 1 1

,

N NN N

a a Aa a A

A A

a a A+ × + ×

= =

Now we can define the collocation points as:

0 10,1, , ; i Nb ax a i i N a x x x b

N−

= + = … ≤ < <…< = (11)

By substituting the collocation points, eq. (11), into eq. (1), we get the system of ma-trix equations, for 0,1, ,i N= … :

2

( ) ( ) ( )

0 0 0( ) ( ) ( ) ( ) ( ) ( )

pmk p q

k i i pq i i i ik p q

P x y x Q x y x y x g x= = =

+ =∑ ∑∑

or the compact form:

2

( ) ( , )

0 0 0

pmk p q

k pqk p q

P Y Q Y G= = =

+ =∑ ∑∑ (12)

Page 4: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... S342 THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351

where

[ ]0 1( )d ag ( ) (i )k k k NkP xP PxP x= …

0 1( ) ( ) )dia (gpq pq pq pq NQ xQ xQx Q = …

( ) ( )

( )

(0 00 0

11

( ) ( )( )

( ) )( ),

( ) (( )

11

)

, ,

( ) ( )( ) ( )( )( ) ( )( )

( )( )( ) NN

p

N

p qk

p qkk q

p qkN

y yy ggy yyY Y G

gy x

x xx xxx xx

xx yy x

= = =

By putting the collocation points (11) into the matrix relation (9), we obtain the matrix equation, for 0,1, ,i N= … :

( ) ( )( ) ( ) k ki

ki

ky H M A Y HM Ax x= ⇒ = (13)

where

( )( )

( )

( ) ( ) ( )( ) ( ) ( )

( ) ( ) ( )

0 0 0 1 0 0

1 0 1 1 1 1

0 1

N

N

N N N N N

H x H x H x H xH x H x H x H x

H

H x H x H x H x

… … = =

On the other hand, we can write the non-linear part of eq. (12):

2

( , ) (0,0) (1,0) (1,1) (2,0) (2,1) (2,2)00 10 11 20 21 22

0 0

pp q

pqp q

Q Y Q Y Q Y Q Y Q Y Q Y Q Y= =

= + + + + +∑∑ (14)

Besides, by substituting the collocation points (11) into the relations (10.1)-(10.6), the matrices (0,0)Y , (1,0) Y , (2,0) Y , (2,1) Y , and (2,2)Y are obtained:

(0,0) * (1,0) * (1,1) *

0,0 1,0 1,1

(2,0) * (2,1) * (2,2) *2,0 2,1 2,2

Y H A Y H A Y H A

Y H A Y H A Y H A

= = =

= = = (15)

where

( ) ( )( ) ( )

( ) ( )

( ) ( )( ) ( )

( ) ( )

0 0 0 0

1 1 1 1* *0,0 1,0,

N N N N

H x H x H x MH xH x H x H x MH x

H H

H x H x H x MH x

= =

( ) ( )( ) ( )

( ) ( )

( ) ( )( ) ( )

( ) ( )

20 00 0

21 1* * 1 1

1,1 2,0

2

,

N N N N

H x M H xH x MH x MH x MH x M H x M H x

H H

H x MH x M H x M H x

= =

Page 5: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351 S343

( ) ( )( ) ( )

( ) ( )

( ) ( )( ) ( )

( ) ( )

2 220 00 0

2 2 2* *1 1 1 12,1 2,2

2 2 2

,

N N N N

H x M H x MH x M H x M

H x M H x M H x M H x MH H

H x M H x M H x M H x M

= =

[ ]0 1T

NA a A a A a A= …

Hermite matrix collocation method

We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this purpose, substituting the matrix relations (13)-(15) into eq. (12), we obtain the fundamental matrix equation:

( )( )

2*

,0 0 0

pmk

k pq p qk p q

P HM A Q H A G= = =

+ =∑ ∑∑

or the compact form:

WA VA G+ = (16)where

0

; , 0,1, ,m

kk ij

kW P HM w i j N

=

= = = … ∑

[ ] ( )2

2*,

0 0 ; 0,1, , ; 0,1, , 1 1

p

pq p q mnp q

V Q H v m N n N= =

= = = … = … + −∑∑

Also we can write the matrix eq. (16) in the augmented matrix form:

[ ]; :W V G (17)or clearly:

[ ]

2

2

2

00 01 0 00 01 00( 1) 1

10 11 1 10 11 11( 1) 1

0 1 0 1 ( 1) 1

; : ( )

; : ( ); :

; : ( )

N N

N N

N N NN N N NN N

w w w v v v g x

w w w v v v g xW V G

w w w v v v g x

+ −

+ −

+ −

=

Besides, by using the matrix relation (9), the matrix relation for the mixed conditions (2) is obtained:

( ) ( ) ( )1

0

mk

kj kj kj jk

a H a b H b c H c M A λ−

=

+ + = ∑

or briefly:

* * ; : UA O A U Oλ λ + = ⇒ (18)

Page 6: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... S344 THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351

or clearly:

00 01 0 0

10 11 1 1*

1,0 1,1 1, 1

; 0 0 0 : ; 0 0 0 :

; :

; 0 0 0 :

N

N

m m m N m

u u uu u u

U O

u u u

λλ

λ

λ− − − −

=

where

0 1 ; 0,1, , 1j j jNU u u u j m = = … −

( ) ( ) ( )1

0

mk

kj kj kjk

a X a b X b c X c B−

=

= + + ∑

[ ]0 1 1T

mλ λ λ λ −=

[ ] ( )* 0 0 0 zero matrixO =

Consequenlty, to find Hermite coefficients )0, , ,( 1na n N= … related with the approx-imate solution (3) of the problem (1) and (2), by replacing the m row matrices (18) by the last m rows (or any m rows) of the augmented matrix (17), we obtain the resulting matrix:

2

2

2

00 01 0 00 01 00( 1) 1

10 11 1 10 11 11( 1) 1

,0 ,1 , ,0 ,1 ,( 1) 1

00 01 0 0

10 11 1 1

1,0 1,1

; ; ( )

; ; ( )

; ; ( )

0 0 0:

0

;

0 0

N N

N N

N m N m N m N N m N m N mN m N

N

N

m m m

W

w w w v v v g x

w w w v v v g x

w w w v v v g x

u u uu u u

u u

V G

u

λλ

+ −

+ −

− − − − − −− + −

− − −

=

1, 10 0 0N mλ −

From this non-linear system, that is the matrix equation WA VA G+ = , the unknown coefficients )0, , ,( 1na n N= … are determined; therefore the truncated Hermite series solution (3) is obtained:

0

( ) ( ) N

N n nn

y x a H x=

= ∑

Accuracy of solutions and residual error estimation

We can check the accuracy of the obtained solutions as follows [16]. Since the trun-cated Hermite series (3) is an approximate solution of eq. (1). When the solution ( )Ny x and its derivatives are substituted in eq. (1), the resulting equation must be satisfied approximately; that is, for [ , ], 0,1,2,lx x a b l= ∈ = …

( ) ( ) ( ) ( ) ( ) ( ) ( )2

( ) ( ) ( )

0 0 0 0

pmk p q

N l k l l pq l l l lk p q

R x P x y x Q x y x y x g x= = =

= + − ≅∑ ∑∑

Page 7: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351 S345

or

( )10 , is any positive numbers( ) lkN l lR x k−≤

If max1 0 10lk k− −= is prescribed, then the truncation limit N is increased until the difference ( )N lR x at each of the points becomes smaller than the prescribed 10 k− . Therefore, if

) 0(N lR x → when N is sufficiently large enough, then the error decreases. On the other hand, by means of the residual function ( )NR x and the mean value of the

function | ( ) |NR x on the interval [ , ]a b , the accuracy of the solution can be controlled and the error can be estimated [17].

Thus, the upper bound of the mean error nR :

( ) ( ) d db b

N Na a

R x x R x x≤∫ ∫

and

( ) ( )( ) ,db

N Na

R x x b a R c a c b= − ≤ ≤∫

( ) ( )( ) ( )d db b

N N Na a

R x x b a R c R x x= − ≤∫ ∫

( )( ) d

b

Na

N n

R x xR c R

b a≤ =

Moreover we use different error norms for measuring errors. These are defined:

– ( )22

0

n

ii

L e=

= ∑

– max( ), 0iL e i n∞ = ≤ ≤

– 2

1( )1

nii

eRMS

n==+

where | ( ) ( )|i i N ie y x y x= − also y and Ny are the exact and approximate solutions of the prob-lem, respectively [18].

Numerical example

The method of this study is useful in finding the solutions of a class of non-linear equations in terms of Hermite polynomials and the accuracy. We illustrate it by the several nu-merical examples and perform all of them on the computer using a program written separately in MATLAB R2017b.

Example 1. Consider the second order non-linear differential equation:

2( ) 2 ( ) ( ) ( ) ( ) ( ) ( ) y x y x y x y x y x y x g x′ +′ ′ ′− + − =′ (19)

Page 8: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... S346 THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351

with the initial and boundary conditions:

(0) 3, (0) 2y y′= = 0 1 x≤ ≤ (20)

where .( ) 2 2exg x = +While the exact solution is ( ) 1 2exy x = + , the proposed method is applied and the

approximate solutions of eq. (19) under the conditions (20) are obtained as 22 ( ) 3 2y x x x= + + ,

2 33 ( ) 3 2 0.3944y x x x x= + + + , 2 3 4

4 ( ) 3 2 0.32544 0.10704y x x x x x= + + + + , 5 ( ) 3 2y x x= + + 2 3 4 50.336336 0.074608 0.025772x x x x+ + + + for 2- 5N = , respectively.

In tabs. 1 and 2, we see that absolute errors and 2L , L∞ and RMS errors are calculat-ed for 2, 3, 4,5N = , respectively. In tab. 3, the exact solution of the problem and the the approx-imate solutions of the problem obtained with Taylor matrix method [19] and the proposed method on [0,1]x∈ for 5N = , are presented.

Table 1. Absolute error of Example 1 for N = 2-5 and h = 0.1 Absolute errors

xl e2 e3 e4 e50 0 0 0 0

0.1 3.4184e–04 5.2564e–05 5.6922e–06 2.21837e–060.2 2.8000e–03 3.4968e–04 3.0732e–05 1.27917e–050.3 9.7000e–03 9.3118e–04 6.3711e–05 3.04095e–050.4 2.3600e–02 1.6100e–03 8.1011e–05 4.99869e–050.5 4.7440e–02 1.9000e–03 7.2541e–05 6.78585e–050.6 8.4200e–02 9.5280e–04 7.0177e–05 8.42649e–050.7 1.3751e–01 2.2000e–03 1.7919e–04 1.02848e–040.8 2.1110e–01 9.1000e–03 6.1299e–04 1.26842e–040.9 3.3092e–01 2.1700e–02 1.7000e–03 1.51611e–041 4.3664e–01 4.22000e02 4.1000e–03 1.53143e–04

Table 2. The L2, L∞ and RMS errors of Example 1 for N = 2-5N L2-error L∞-error RMS-error2 5.997233e–01 4.365636e–01 2.998616e–013 4.842227e–02 4.216365e–02 2.421113e–024 4.483755e–03 4.083656e–03 2.241877e–035 2.973264e–04 1.531430e–04 1.486632e–04

Table 3. Comporison of the solutions of Example 1 for N = 5 and h = 0.1xl Exact solution Taylor matrix method Proposed method0 3 3 3

0.1 3.21034 3.21034 3.210340.2 3.44280 3.44280 3.442810.3 3.69971 3.69972 3.699740.4 3.98364 3.98365 3.983690.5 4.29744 4.29744 4.297510.6 4.64423 4.64424 4.644320.7 5.02750 5.02751 5.027600.8 5.45108 5.45107 5.451200.9 5.91920 5.91913 5.919351 6.43656 6.43630 6.43671

Page 9: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351 S347

Example 2. Consider the second order non-linear differential equation of the form:

22

22 ( ) 1 sin( ) d d

ddy y y x x

xx + + = −

(21)

with the initial conditions [20]:

(0) 0, (0) 1y y= =′ (22)Similarly, while the exact solution is ( ) siny x x= , the approximate solutions of (21)

under the conditions (22) are obtained as 2 ( )y x x= , 33 ( ) 0.163980335781936y x x x= − ,

3 44 ( ) 0.1697171792058040 0.009876360178284074y x x x x= − + , 3

5 ( ) 0.166728y x x x= − +4 50.000304 0.007936x x+ + for 2 5N = − , respectively.

Considering N = 2-5, the obtained approximate solutions are compared with the exact solution in fig.1 and the absolute errors are demonstrated in tab. 4. In tab. 5, for N = 5, the solu-tions, exact and obtained with Taylor matrix method and suggested method, are compared [19].

y(x)N = 2N = 3N = 4N = 5

Figure 1 Comporison of the Hermite polynomial solutions and exact solution of Example 2 for N = 2-5 (for color image see journal web site)

Table 4. Absolute errors of Example 2 for N = 2-5 and h = 0.1Absolute errors

xn e2 e3 e4 e5

0 0 0 0 00.1 1.665833e–04 2.603017e–06 2.146190e–06 3.488682e–080.2 1.330669e–03 1.882651e–05 1.126605e–05 1.28875e–070.3 4.479793e–03 5.232427e–05 2.257198e–05 1.157813e–070.4 1.058165e–02 8.691620e–05 2.740695e–05 1.127313e–070.5 2.057446e–02 7.691942e–05 2.291349 e–05 4.613957e–070.6 3.535752e–02 6.222592e–05 2.140782 e–05 7.803649e–070.7 5.578231e–02 4.629424e–04 5.936562 e–05 1.402682e–060.8 8.264390e–02 1.314022e–03 2.059295 e–04 4.15998e–060.9 1.166730e–01 2.868574e–03 5.708533 e–04 1.396141e–051 1.585290e–01 5.451320e–03 1.311803 e–03 4.101519e–05

Page 10: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... S348 THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351

The upper bound of the mean error , nR , of Example 2 can be calculated as 2 3 4 57.93031 01 , 4.124611 02, 1.305709 02, 2.25636 03R e R e R e R e= − = − = − = − as in the

method given and nR of Example 2 is illustrated in fig. 2 for N =2-5.

Table 5. Comporison of the solutions of Example 2 for N = 5 and h = 0.1xl Exact solution Taylor matrix method Proposed method0 0 0 0

0.1 0.0998334 0.0998333 0.09983330.2 0.1986693 0.1986691 0.19866920.3 0.2955202 0.2955199 0.29552010.4 0.3894183 0.3894181 0.38941840.5 0.4794255 0.4794253 0.47942600.6 0.5646424 0.5646418 0.56464320.7 0.6442176 0.6442164 0.64421900.8 0.7173560 0.7173556 0.71736020.9 0.7833269 0.7833332 0.78334081 0.8414709 0.8415000 0.8415120

N = 2N = 3N = 4N = 5|RN =

(x)|

Figure 2. The residual error functions of Example 2 for N =2-5 (for color image see journal web site)

Example 3. Consider the following differential equation:

( )

2

2

2

( ) 2 ( ) ( ) ( )

( 1) , 0 1/2

2 , 1 /2 1

y x y x y x g x

x xg x

x x

′ − + =

− ≤ ≤= − < ≤

(23)

It is solved with the suggested method for the boundary condition:

(0) 0y = (24)

For 0 1/2x≤ ≤ , 0 ( ) 2P x = − , 1( ) 1P x = , 00 ( ) 1Q x = .

Page 11: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351 S349

For 21( ) ( 1)g x x= − , 2N = and the ordering points are 0 1 20, 1/4, 1/2x x x= = = for

the interval 0 1/2x≤ ≤ .The solution is investigated in the following form:

1

0( ) n

nn

y x a x=

≅ ∑

Using our proposed method, the fundamental matrix equation is obtained:

*1 0 00 00P HMA P HA Q H A G+ + =

Here,

( )( )( )

1

1 0 21 0 0 01 70 1 0 1/4 12 4

0 0 1 1/2 1 1 1

HP H H

H

− = = = − −

0

00 0 1

2

1 0 0 0 2 0 2 0 00 1 0 0 0 4 0 2 0 0 0 1 0 0 0 0 0 2

aQ M P A a

a

− = = = − = −

( ) ( )

( ) ( )( ) ( )

*00

0 0 1 0 2 0 0 0 2 0 41/4 1/4 1 1/2 7/4 1/2 1/4 7/8 7/4 7/8 49/161/2 1/2 1 1 1 1 1 1 1 1 1

H HH H H

H H

− − = = − − − − − − − −

[ ]( ) diag ( ) ( ) ( )H x H x H x H x=

[ ] [ ]0 1 2 0 1 2, T TA a a a A a A a A a A= =

[ ] [ ]1 1 1 1( ) (0) 1/4 1/2 1 9/16 1/4( ) ( ) T TG x g g g= =

The following fundamental matrix equation is obtained:

2 2 4 1 0 2 0 0 0 2 0 4 111 1 7 1 1 7 7 7 49 92 1 1 2 2 4 2 4 16 8 16 64 16

2 0 6 1 1 1 1 1 1 1 1 1 14

A A

− − − − + − − − − = − − − −

The [ ] [ ]1 0 2 0 0 0 0 0 0 0 0 0 0A A− + = is obtained for the bound-ary condition (0) 0y = and using the proposed method, the desired matrix equation:

2 2 4 1 0 2 0 0 0 2 0 4 1

1 0 2 0 0 0 0 0 0 0 0 0 02 0 6 1 1 1 1 1 1 1 1 1 1/4

A A− − − − + = − − − − −

is constructed.

Page 12: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... S350 THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351

Thus, Hermite’s coefficients are found as 0 1 20, 1 / 2, 0.a a a= = = For 0 1 / 2x≤ ≤ , the solution:

( ) 1/2 , 0 1/2y x x x= ≤ ≤

is obtained.For 2

1( ) 2g x x= − , 2N = and the ordering points are 0 1 21/2, 3/4, 1x x x= = = for the interval 1/2 1x< ≤ .

The (1/2) 1/4y = is obtained for 0 1/2x = by considering ( ) 1/2y x x= . Thus, the follow-ing matrix equation is written:

2 0 6 1 1 1 1 1 1 1 1 1 7/4

1 1 1 0 0 0 0 0 0 0 0 0 1/42 2 4 1 2 2 2 4 4 2 4 4 1

A A− − − − − − − + = − − −

Thus, since there are no real Hermite’s coefficients, there is no approximate solution for the interval 1/2 1x< ≤ .

The solution of (23) under the conditions (24):

1 , 0 1/2

22

) 1/ 1

(,

yx

xx x

≤ ≤

∅ <

= ≤

overlaps with the exact solution of the problem.

Conclusion

Non-linear differential equations used in engineering, physics, mathematics or in many modelling problems are usually difficult to solve as analytically. In this study, to solve a class of non-linear differential equations with boundary conditions, we introduce a matrix method depending on Hermite polynomials and collocation points. Also the residual error analysis has been also developed for the accuracy of solutions. The present method and the error analysis procedures are applied to some examples which have been solved by Taylor matrix method in the literature. The results related with examples have been shown in tabs. 1-5 and figs. 1 and 2. As it is seen from the numerical examples, the method provides a better approximation than the other methods such as Taylor matrix method. A significant advantage of the proposed meth-od, the Hermite coefficients of the solution can be found obviously by developing computer programs. The method also can be developed and applied to solve other high order non-linear differential equations with new strategies.

Acknowledgment

The abstract that has the different title was presented in the ICAAMM 2018 (7th Inter-national Conference on Applied Analysis and Mathematical Modelling).

References[1] Gavalas, G. R., Nonlinear Differential Equations of Chemically Reacting Systems, Springer-Verlag New

York Inc., USA, 2013[2] Fucik, S., Kufner, A., Nonlinear Differential Equations, Elsevier, Amsterdam, The Netherlands, 2014[3] Ordokhani, Y., Mohtashami, M. J., Approximate Solution of Nonlinear Fredholm Integro-Differential

Equations with Time Delay by Using Taylor Method, Journal of Science (Kharazmi University), 9 (2010), 1, pp. 73-84

Page 13: NUMERICAL SOLUTIONS OF A CLASS OF NON-LINEAR ......Hermite matrix collocation method We now are ready to construct the fundamental matrix equation corresponding to eq. (1). For this

Guler, C., et al.: Numerıcal Solutıons of a Class of Non-Lınear Ordınary Dıfferentıal Equatıons ... THERMAL SCIENCE: Year 2019, Vol. 23, Suppl. 1, pp. S339-S351 S351

[4] Guler, C., A New Numerical Algorithm for the Abel Equation of the Second Kind, International Journal of Computer Mathematics, 84 (2007), 1, pp. 109-119

[5] Gokmen, E., et al., A Numerical Approach for Solving Volterra Type Functional Integral Equations with Variable Bounds and Mixed Delays, Journal of Computational and Applied Mathematics, 311 (2017), Feb., pp. 354-363

[6] Saaty, T. L., Modern Nonlinear Equations, Publication, Mineola, Dover, New York, USA, 1981[7] Hale, J., Theory of Functional Differential Equations, Springer-Verlag, New York, USA, 1987[8] Hristov, J., An Approximate Analytical (Integral-Balance) Solution to a Nonlinear Heat Diffusion Equa-

tion, Thermal Science, 19 (2015), 2, pp. 723-733[9] Tian, Y., et al., A New Method for Solving a Class of Heat Conduction Equations, Thermal Science, 19

(2015), 4, pp. 1205-1210[10] Yuksel, G., et al., Chebyshev Polynomial Solutions of a Class of Second-Order Nonlinear Ordinary Dif-

ferential Equations, Journal of Advanced Research in Scientific Computing, 3 (2011), 4, pp. 11-24[11] Gurbuz, B., Sezer, M., Laguerre Polynomial Approach for Solving Lane-Emden Type Functional Differ-

ential Equations, Applied Mathematics and Computation, 242 (2014), Sept., pp. 255-264[12] Bulbul, B., Sezer, M., Numerical Solution of Duffing Equation by Using an Improved Taylor Matrix

Method, Journal of Applied Mathematics, 2013 (2013), ID 691614[13] Yalcinbas, S., et al., A Collocation Method Using Hermite Polynomials for Approximate Solution of Pan-

tograph Equations, Journal of the Franklin Institute, 348 (2011), 6, pp. 1128-1139[14] Gokmen, E., Sezer, M., Approximate Solution of a Model Describing Biological Species Living Together

by Taylor Collocation Method, New Trends in Mathematical Sciences, 3 (2015), 2, pp. 147-158[15] Akgonullu, N., et al., A Hermite Collocation Method for the Approximate Solutions of Higher-Order

Linear Fredholm Integro-Differential Equations, Numerical Methods for Partial Differential Eqautions, 27 (2010), 6, pp. 1708-1721

[16] Gulsu, M., Sezer, M., On the Solution of Riccati Equation by Taylor Matrix Method, Applied Mathemat-ics and Computation, 176 (2006), 2, pp. 414-421

[17] Balci, M. A., Sezer, M., Hybrid Euler Taylor Matrix Method for Solving of Generalized Linear Fredholm Integro-Differential Difference Equations, Applied Mathematics and Computation, 273 (2016), Jan., pp. 33-41

[18] Bulbul, B., Sezer, M., A New Approach to Numerical Solution of Nonlinear Klein Gordon Equation, Mathematical Problems in Engineering, 2013 (2013), ID 869749

[19] Guler, C., Kaya, S. O., A Numerical Approach Based on Taylor Polynomials for Solving a Class of Non-linear Differential Equations, Mathematical Problems in Engineering, 2018 (2018), ID 8256932

[20] Rawashdeh, M. S., Maitama, S., Solving Nonlinear Ordinary Differential Equations Using the NDM, Journal of Applied Analysis and Computation, 5 (2015), 1, pp. 77-88

Paper submitted: December 15, 2018Paper revised: December 30, 2018Paper accepted: January 10, 2019

© 2019 Society of Thermal Engineers of SerbiaPublished by the Vinča Institute of Nuclear Sciences, Belgrade, Serbia.

This is an open access article distributed under the CC BY-NC-ND 4.0 terms and conditions