• No results found

On using a modified Legendre-spectral method for solving singular IVPs of Lane–Emden type

N/A
N/A
Protected

Academic year: 2021

Share "On using a modified Legendre-spectral method for solving singular IVPs of Lane–Emden type"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

Contents lists available atScienceDirect

Computers and Mathematics with Applications

journal homepage:www.elsevier.com/locate/camwa

On using a modified Legendre-spectral method for solving singular IVPs

of Lane–Emden type

H. Adibi

, A.M. Rismani

Department of Applied Mathematics, Faculty of Mathematics and Computer Science, Amirkabir University of Technology, No. 424, Hafez Ave., 15914, Tehran, Iran

a r t i c l e i n f o Article history:

Received 6 September 2009 Received in revised form 3 July 2010 Accepted 30 July 2010 Keywords: Lane–Emden equation Legendre-spectral method Lagrange interpolation

a b s t r a c t

In this paper, approximate solutions of singular initial value problems (IVPs) of the Lane–Emden type in second-order ordinary differential equations (ODEs) are obtained by an improved Legendre-spectral method. The Legendre–Gauss points are used as collocation nodes and Lagrange interpolation is employed in the Volterra term. The results reveal that the method is effective, simple and accurate.

© 2010 Elsevier Ltd. All rights reserved.

1. Introduction

The Lane–Emden equation describes the gravitational potential of a self-gravitating spherically symmetric polytropic fluid, as well as the equilibrium density distribution in a self-gravitating sphere of polytropic isothermal gas, which is of fundamental importance in the fields of stellar structure [1], radiative cooling, modeling of clusters of galaxies, astrophysics [2], etc. We consider the following Lane–Emden type equation [1,3]:

y00

+

2 ty 0

+

f

(

y

) =

0

,

0

<

t

1 (1.1) subject to y

(

0

) =

a

,

y0

(

0

) =

0 (1.2)

where t and y denote the independent and dependent variables, respectively, the primes denote differentiation with respect to t, f

(

y

)

is a nonlinear function of y, and a is a constant. It should be noted that the most general form of singular initial value problems of Lane–Emden type is as follows:

y00

+

2

ty 0

+

f

(

t

,

y

) =

g

(

t

),

0

<

t

1 (1.3)

subject to conditions(1.2), where f

(

t

,

y

)

is a continuous real valued function, and g

(

t

) ∈

C

[

0

,

1

]

. This has also been handled analytically by using perturbation methods [4], Adomian’s decomposition method [5], the quasilinearization method of Bellman and Kalaba [6], the piecewise linearization technique [7] and a variational method [8]. The variational iteration method [2] and the collocation method have been utilized for solving the Lane–Emden equation arising in astrophysics in [2,9]. Also a numerical method can be found in [10].

Corresponding author. Tel.: +98 21 64542524; fax: +98 66497930.

E-mail address:[email protected](H. Adibi).

0898-1221/$ – see front matter©2010 Elsevier Ltd. All rights reserved.

(2)

In this paper, we first transform Eq.(1.1)into a Volterra integral equation and then solve it numerically by a spectral method. Overall, the spectral class of solution methods, based on using orthogonal polynomials, are implemented in various ways, such as using pantograph type delay differential equations [11] and Volterra type integral equations [12]. The spectral method provides the most convenient computer implementations.

The remainder of the paper is organized as follows: In Section2, we transform Eq.(1.3)into a Volterra integral equation with sufficiently smooth kernel. In Section3, we present an improved Legendre-collocation method. In Section4, numerical results for some problems are investigated and the corresponding tables are presented. Finally in Section5the report ends with a brief conclusion.

2. Volterra’s integral equation formulation Eq.(1.1)can be written as

L

(

y

) =

ty00

+

2y0

= −

tf

(

t

,

y

) +

tg

(

t

)

(2.1)

and the solution of L

(

y

) =

0 together with the method of variation of parameters yields y

(

t

) =

1 t



C

+

Z

t 0 s2f

(

u

(

s

))

ds



+

D

Z

t 0

(

sf

(

s

,

y

(

s

)) −

sg

(

s

))

ds (2.2)

where C and D are constants. Imposing the initial conditions of(1.2), we obtain y

(

t

) =

a

+

Z

t 0



s2 t

s



(

f

(

s

,

y

(

s

)) −

g

(

s

))

ds (2.3)

which is a nonlinear Volterra integral equation of the second kind. 3. The Legendre-collocation method

In order to use a spectral method, we consider the collocation points as the set of N Legendre–Gauss, or Gauss–Radua, or Gauss–Lobatto points

{

tj

}

Nj=1.

If we do so, entering the collocation points,(2.3)gets replaced by y

(

tj

) =

a

+

Z

tj 0



s2 tj

s



(

f

(

s

,

y

(

s

)) −

sg

(

s

))

ds

,

tj

∈ [−

1

,

1

]

,

j

=

1

,

2

, . . . ,

N

.

(3.1)

The main difficulty in obtaining a high rate of accuracy is computing the integral term in(3.1). In fact for small values of tj,

there is little information available for y

(

s

)

. To overcome this difficulty, the integral interval

(

0

,

tj

]

is transferred to the fixed

interval

(−

1

,

1

]

. We first make the following simple linear transformation: s

(

t

, θ) =

t

2

θ +

t

2

, −

1

θ ≤

1

.

(3.2)

Then(3.1)takes the form y

(

tj

) =

a

+

tj 2

Z

tj 0



s2

(

t j

, θ)

tj

s

(

tj

, θ)



f

(

s

(

tj

, θ),

y

(

s

(

tj

, θ))) −

g

(

s

(

tj

, θ))

d

θ.

(3.3)

Using an N-point Gauss quadrature rule related to the Legendre weights

{

w

j

}

in

[−

1

,

1

]

gives y

(

tj

) =

a

+

tj 2 N

X

k=1



s2

(

tj

, θ

k

)

tj

s

(

tj

, θ

k

)



f

(

s

(

tj

, θ

k

),

y

(

s

(

tj

, θ

k

))) −

g

(

s

(

tj

, θ

k

)) w

k

,

(3.4) where

{

θ

k

}

N

k=1coincide with the collocation points

{

tj

}

Nj=1. We now need to represent f

(

s

,

y

(

s

))

in terms of ykfor k

=

1

,

2

, . . . ,

N. To this end, we expand them, using Lagrange interpolation polynomials, in the vector sense as y

(

s

) ≈

N

X

p=1

ypŁp

(

s

),

(3.5)

where Łpis the p-th Lagrange basis function and is expressed in terms of Legendre functions by

Łp

(

s

) =

N

X

k=1

(3)

Here, discrete polynomial coefficients

β

k

,

p are expressed as follows:

β

k

,

p

=

1

γ

k N

X

i=0 Łp

(

ti

)

Pk

(

ti

i

=

Pk

(

tp

)/γ

k

,

(3.7) in which

γ

k

=

N

X

i=0 Pk2

(

ti

i

=



k

+

1 2



−1

,

for k

<

N

.

(3.8)

Note that

γ

N

=

(

N

+

1

/

2

)

−1for Gauss and Gauss–Radau formulae, and

γ

N

=

2

/

N for the Gauss–Lobatto formula. Hence, it

follows from(3.6)and(3.7)that Lp

(

s

) =

N

X

i=0

Pk

(

tp

)

Pk

(

s

)/γ

k

.

(3.9)

On the other hand, the function f

(

s

,

y

(

s

))

can now be expanded in the series f s

,

N

X

p=1 ypŁp

(

s

)

!

M

X

r=0 fj

(

s

,

0

)

r

!

N

X

p=1 ypŁp

(

s

)

!

r

.

(3.10)

Combining Eqs.(3.4)and(3.10)yields y

(

tj

) =

a

+

tj 2 N

X

k=1



s2

(

tj

, θ

k

)

tj

s

(

tj

, θ

k

)



M

X

r=0 fj

(

s

(

tj

, θ

k

),

0

)

r

!

N

X

p=1 ypŁp

(

s

(

tj

, θ

k

))

!

r

g

(

s

(

tj

, θ

k

))

!

w

k

.

(3.11)

The nonlinear system(3.11)can then be solved by an appropriate numerical method. 4. Numerical results

In this section, the method is applied to some numerical examples. All computations are performed using the Matlab 7.1 software package. The numerical scheme(3.11)leads to a nonlinear system for

{

yj

}

Nj=1, and a proper solver for the nonlinear system should be used. To solve, we use the robust routine fsolve from the optimization toolbox of Matlab. fsolve should be provided with an initial guess as a starting point. For different starting points we observe the same convergence point with more or fewer iterations.

Example 1. Consider the homogeneous Lane–Emden equation [13,14] y00

+

2

ty 0

4t2

+

6



y

=

0

,

0

<

t

1

,

(4.1)

subject to the conditions

y

(

0

) =

1

,

y0

(

0

) =

0

.

(4.2)

With the simple linear transformation t

=

x

+

1

2

1

<

x

1

,

the interval

(

0

,

1

]

is replaced by the interval

(−

1

,

1

]

. The equation is converted into the nonlinear Volterra integral equation y



x

+

1 2



=

1

+

Z

x+21 0



2s2 x

+

1

s



4s2

+

6



y

(

s

)

ds

1

<

x

1

,

(4.3)

(which is a special case of Eq.(2.3)) with the exact solution y

(

t

) =

et2

.

The maximum absolute errors for different values of N in L-norm are presented inTable 1.

Example 2. Now consider the linear, nonhomogeneous Lane–Emden equation [13,14] y00

+

2

ty 0

+

ey

+

4ey2

=

0

,

(4.4)

subject to the conditions

(4)

Table 1

Maximum absolute errors for different values of N.

N ky− ˆyk∞ N ky− ˆyk∞ 5 7.80×10−4 25 3.96×10−13 10 1.17×10−5 30 5.35×10−14 15 1.40×10−8 35 2.47×10−15 20 3.59×10−10 40 1.41×10−15 Table 2

Maximum absolute errors for different values of N.

N ky− ˆyk∞ N ky− ˆyk∞ 5 8.63×10−4 25 2.32×10−11 10 1.00×10−4 30 2.23×10−11 15 1.03×10−7 35 3.69×10−12 20 2.14×10−10 40 2.61×10−12 Table 3

Maximum absolute errors for different values of N.

N ky− ˆyk∞ N ky− ˆyk∞

3 2.04×10−5 7 2.94×10−14

4 2.60×10−7 8 1.33×10−16

5 2.02×10−9 9 3.33×10−16

6 7.25×10−12 10 2.22×10−16

Its associated nonlinear Volterra integral equation y



x

+

1 2



=

0

+

Z

x+21 0



2s2 x

+

1

s





ey(s)

+

4ey(2s)



ds 1

<

x

1 (4.6)

has the exact solution y

(

t

) = −

2 Ln

(

1

+

t2

).

The numerical results are shown inTable 2in terms of absolute errors for different numbers N. The results show the excellent convergence of method. Note that in this example, the final system is nonlinear and is solved by the Newton method. Example 3. Consider the Lane–Emden type equation [13,14]

y00

+

2

ty 0

6y

=

4y ln y

,

(4.7)

with initial conditions

y

(

0

) =

1

,

y0

(

0

) =

0

.

(4.8)

Utilizing(2.3)we get the nonlinear Volterra integral equation y



x

+

1 2



=

1

+

Z

x+21 0



2s2 x

+

1

s



(−

6y

(

s

) −

4y

(

s

)

ln y

(

s

))

ds

1

<

x

1 (4.9) whose exact solution is y

(

t

) =

exp

(

t2

)

. The calculations are performed using N

=

3, i.e. 10 Legendre–Gauss points are chosen in

(

0

,

1

]

. The maximum absolute errors are shown inTable 3, using Lagrange interpolation at these collocation points. Note that for this problem, the procedure leads to a nonlinear system of equations for unknowns xj

=

x

(

tj

)

. To start

the routine fsolve we use the initial guess

[

0

,

0

, . . . ,

0

]

. 5. Conclusion

An efficient and accurate numerical scheme based on the Legendre-spectral method is proposed for solving the nonlinear system of Fredholm–Volterra integral equations. The Gaussian integration method with Lagrange interpolation was employed to reduce the problem to the solution of nonlinear algebraic equations. Illustrative examples were given to demonstrate the validity and applicability of the method. The results show that the method is simple and accurate. In fact by selecting a few collocation points, excellent numerical results are obtained.

(5)

References

[1] S. Chandrasekhar, An Introduction to the Study of Stellar Structure, Dover Publications, New York, 1967.

[2] M. Dehghan, F. Shakeri, Approximate solution of a differential equation arising in astrophysics using the variational iteration method, New Astron. 13 (2008) 53–59.

[3] H.T. Davis, Introduction to Nonlinear Differential and Integral Equations, Dover, New York, 1962.

[4] C.M. Bender, K.A. Milton, S.S. Pinsky, L.M. Simmons, A new perturbative approach to nonlinear problems, J. Math. Phys. 30 (1989) 1447–1455. [5] A.-M. Wazwaz, A new method for solving singular value problems in the second-order ordinary differential equations, Appl. Math. Comput. 128 (2001)

45–57.

[6] V.B. Mandelzweig, F. Tabakin, Quasilinearization approach to nonlinear problems in physics with application to nonlinear ODEs, Comput. Phys. Comm. 141 (2001) 268–281.

[7] J.I. Ramos, Linearization methods in classical and quantum mechanics, Comput. Phys. Comm. 153 (2003) 199–208. [8] Ji-Huan He, Variational approach to the Lane–Emden equation, Appl. Math. Comput. 143 (2003) 539–541.

[9] K. Parand, A. Shahini, M. Dehghan, Rational Legendre pseudospectral approach for solving nonlinear differential equations of Lane–Emden type, J. Comput. Phys. 228 (2009) 8830–8840.

[10] K. Parand, M. Dehghan, A.R. Rezaei, S.M. Ghaderi, An approximation algorithm for the solution of the nonlinear Lane–Emden type equations arising in astrophysics using Hermite functions collocation method, Comput. Phys. Comm. 181 (2010) 1096–1108.

[11] A. Ishtiaq, H. Brunner, T. Tang, A spectral method for pantograph-type delay differential equations and its convergence analysis, J. Comput. Math. 27 (2009) 254–265.

[12] T. Tang, X. Xu, J. Cheng, On spectral methods for Volterra type integral equations and the convergence analysis, J. Comput. Math. 26 (2008) 825–837. [13] Ahmet Yildirim, Turgut Öziş, Solutions of singular IVPs of Lane–Emden type by the variational iteration method, Nonlinear Anal. 70 (2009) 2480–2484. [14] Ahmet Yildirim, Turgut Öziş, Solutions of singular IVPs of Lane–Emden type by homotopy perturbation method, Phys. Lett. A 369 (2007) 70–76.

References

Related documents

Archived specimens with previously determined ER α and PR status from 801 women with early invasive breast cancer were collected from Oscar Lambret Cancer Center, Lille,

tools and dies, fixtures and gauges, prototypes, aircraft and medical parts, and grinding wheel form tools. Wire electrical discharge machining process is a mostly

COOLEY'S ANEMIA (HOMOZYGOUS BETA-THALASSEMIA); A STUDY INTELLIGENCE AND BEHAVIORAL PATTERNS IN PATIENTS

Report on patients with non transfusion-dependent β-thalassemia major being treated with hydroxyurea attending the Thalassemia Research Center, Sari, Mazandaran Province,

We also used these antibodies to show that Naegleria expresses the proteins in the same order as their incorporation into basal bodies, with SAS-6 localizing first, followed by

THE EMPIRICAL STUDY OF PUBLIC TRANSPORT PASSENGERS’ BEHAVIORAL INTENTIONS: THE ROLES OF SERVICE QUALITY, PERCEIVED SACRIFICE, PERCEIVED VALUE, AND SATISFACTION (CASE

The study also revealed 24 species of butterflies which are protected under various schedules of Indian Wildlife Protection Act, 1972, and 13 species as being endemic to the

Chapter 12 is intended to investigate the spatiotemporal changes in the distribution of mudskipper species. In this chapter, the authors acknowledge that the