# Using an Effective Numerical Method for Solving a Class of Lane-Emden Equations

Authors: Yulan Wang; Hao Yu; Fugui Tan; Shuguang Li
Journal: Abstract and Applied Analysis
 (2014)

---

## Abstract

We use the reproducing kernel method to solve the well-known classes of Lane-Emden-type equations. These classes of equations have the form of Lane-Emden problem. Comparing the results of the reproducing kernel method with the analytical solutions by means of some typical examples, we can affirm that the reproducing kernel method is an efficient and accurate method.


---

## Body

## 1. Introduction

Let us consider the following Lane-Emden problem:(1)
u
′′
(
x
)
+
n
x
u
′
(
x
)
+
f
(
u
)
=
g
(
x
)
,
x
∈
[
0
,
b
]
,
u
(
0
)
=
λ
1
,
u
′
(
0
)
=
λ
2
,
where n
≥
0, g
(
x
) is given bounded, continuous function, and f
(
u
) is nonlinear function; in [1], we can see that the most popular form of f
(
u
) is f
(
u
)
=
u
m, where m is a constant parameter; this type of equation is the Lane-Emden equations of the first kind; in addition, f
(
u
) can be the exponential functions f
(
u
)
=
e
u; this type of equations is called the Lane-Emden equations of the second kind; furthermore, the function f
(
u
) can be logarithmic functions and trigonometric functions; all these types of equations are named after the astrophysicists Jonathan Lane and Robert Emden; they were the first to study these types of equations. Lane-Emden equations are widely used in various physical phenomena. Many scholars [2–5] devote their energies to this field, with the high development of computer technology; lots of numerical methods have been put forward to solve this type of equation, such as pseudospectral method, Haar wavelet method, and Adomian decomposition method (ADM) [6–11].Reproducing kernel method (RKM) is an attractive method because of its accuracy, and it has already been applied to various fields. In this paper, we use the reproducing kernel method to solve (1) to show the efficiency and accuracy of this method.


## 2. The Reproducing Kernel Method

### 2.1. Practise Homogenization for Lane-Emden Equations

In order to use reproducing kernel method to solve (1), we need to practise homogenization for (1); previously, we multiplied (1) by x; we find that
(2)
(
L
u
)
(
x
)
=
F
(
x
,
u
)
,
x
∈
[
0
,
b
]
,
u
(
0
)
=
λ
1
,
u
′
(
0
)
=
λ
2
,
where L
u
(
x
)
=
x
u
′′
(
x
)
+
n
u
′
(
x
)
,
F
(
x
,
u
)
=
x
g
(
x
)
-
x
f
(
u
). Obviously, the solution of (2) is the solution of (1). So we only need to gain the solution of (2). The question (2) with nonhomogeneous boundary value conditions is equivalent to the problem of having a function v
(
x
) satisfying
(3)
(
L
v
)
(
x
)
=
F
-
(
x
,
v
)
,
x
∈
[
0
,
b
]
,
v
(
0
)
=
0
,
v
′
(
0
)
=
0
,
where F
-
(
x
,
v
)
=
x
g
(
x
)
-
x
f
(
v
+
λ
1
+
λ
2
x
)
-
λ
2
n.


### 2.2. Construct Reproducing Kernel Space

Aiming at the purpose of solving (3), we need to introduce the reproducing kernel space; previously, let us introduce the concept of the reproducing kernel space.For each ofx
∈
X, there is a function of two variables K
x
(
y
)
∈
H, where H is Hilbert space and X is a set abstraction. If we can get
(4)
〈
u
(
y
)
,
K
x
(
y
)
〉
=
u
(
x
)
,
u
(
y
)
∈
H
,
we say that H is the reproducing kernel Hilbert space and K
x
(
y
) is the reproducing kernel of H.We give a linear spaceW
2
3
[
0
,
b
] as follows:
(5)
W
2
3
[
0
,
b
]
=
{
L
2
u
∣
u
,
u
′
,
u
′′
mkm
is one-variable absolutely continuous function,
mmm
u
′′′
∈
L
2
[
0
,
b
]
,
u
(
0
)
=
0
,
u
′
(
0
)
=
0
}
.
According to [12, 13], we give the inner product as follows:
(6)
〈
u
(
y
)
,
v
(
y
)
〉
=
u
′′
(
0
)
v
′′
(
0
)
+
∫
0
b
‍
u
′′′
(
y
)
v
′′′
(
y
)
d
y
.
And according to [14], we can prove that W
2
3
[
0
,
b
] is a reproducing kernel space; its reproducing kernel R
(
x
,
y
) is(7)
R
(
x
,
y
)
=
{
1
120
(
120
+
x
5
+
120
x
y
mk
-
5
x
4
y
+
30
x
2
y
2
+
10
x
3
y
2
)
,
x
<
y
,
1
120
(
120
+
y
5
+
10
x
2
y
2
(
3
+
y
)
km
-
5
x
y
(
y
3
-
24
)
)
,
y
<
x
.
In order to use reproducing kernel method to solve (3) and referring to [15, 16], we can get ψ
i
(
x
) as follows: (8)
ψ
i
(
x
)
=
{
(
1
24
x
(
x
2
4
x
(
3
+
x
)
y
1
24
i
kkkk
+

n
(
24
-
x
3

+
12
x
y
+
4
x
2
y
)
)
)
|
y
=
x
i
,
x
<
y
,
(
1
24
(
4
y
(
-
3
x
y
2
+
y
3
+
3
x
2
(
1
+
y
)
)
kkikk
+
n
(
y
4
+
6
x
2
y
(
2
+
y
)
1
24
i
kkmmik
-
4
x
(
-
6
+
y
3
)
)
)
)
|
y
=
x
i
,
y
<
x
,
where i
=
1,2
,
3
,
….Then practise Gram-Schmidt orthonormalization for{
ψ
i
(
x
)
}
i
=
1
∞; according to [17, 18] we get
(9)
ψ
-
1
(
x
)
=
β
11
ψ
1
(
x
)
,
ψ
-
2
(
x
)
=
β
21
ψ
1
(
x
)
+
β
22
ψ
2
(
x
)
,
ψ
-
3
(
x
)
=
β
31
ψ
1
(
x
)
+
β
32
ψ
2
(
x
)
+
β
33
ψ
3
(
x
)
,
mmmi
⋮
ψ
-
i
(
x
)
=
β
i
1
ψ
1
(
x
)
+
β
i
2
ψ
2
(
x
)
+
β
i
3
ψ
3
(
x
)
+
⋯
+
β
i
i
ψ
i
(
x
)
,
where β
i
k are coefficients of Gram-Schmidt orthonormalization.If{
x
i
}
i
=
1
∞ are distinct points dense in [
0
,
b
] and L
-
1 is existent, we get that
(10)
u
(
x
)
=
∑
i
=
1
∞
‍
∑
k
=
1
i
‍
β
i
k
F
-
(
x
k
,
v
(
x
k
)
)
ψ
¯
i
(
x
)
+
λ
1
+
λ
2
x
is the solution of (3). The proof of it refers to [19, 20]. If the equations are linear ones, F
-
(
x
,
v
)
=
F
-
(
x
), we can solve the problems directly. If they are nonlinear equations, we have to use iteration method to solve them, and the specific methodology refers to [21, 22].


### 2.3. The Approximate Solution

We denote the approximate solution ofu
m
(
x
) by
(11)
u
m
(
x
)
=
∑
i
=
1
m
‍
∑
k
=
1
i
‍
β
i
k
F
-
(
x
k
,
v
(
x
k
)
)
ψ
¯
i
(
x
)
+
λ
1
+
λ
2
x
.
According to the proof of [23] we can easily get that ∥
u
m
(
x
)
-
u
(
x
)
∥
→
0 and u
m
(
k
)
(
x
)
→
u
(
k
)
(
x
)
,
k
=
0,1
,
2.


## 2.1. Practise Homogenization for Lane-Emden Equations

In order to use reproducing kernel method to solve (1), we need to practise homogenization for (1); previously, we multiplied (1) by x; we find that
(2)
(
L
u
)
(
x
)
=
F
(
x
,
u
)
,
x
∈
[
0
,
b
]
,
u
(
0
)
=
λ
1
,
u
′
(
0
)
=
λ
2
,
where L
u
(
x
)
=
x
u
′′
(
x
)
+
n
u
′
(
x
)
,
F
(
x
,
u
)
=
x
g
(
x
)
-
x
f
(
u
). Obviously, the solution of (2) is the solution of (1). So we only need to gain the solution of (2). The question (2) with nonhomogeneous boundary value conditions is equivalent to the problem of having a function v
(
x
) satisfying
(3)
(
L
v
)
(
x
)
=
F
-
(
x
,
v
)
,
x
∈
[
0
,
b
]
,
v
(
0
)
=
0
,
v
′
(
0
)
=
0
,
where F
-
(
x
,
v
)
=
x
g
(
x
)
-
x
f
(
v
+
λ
1
+
λ
2
x
)
-
λ
2
n.


## 2.2. Construct Reproducing Kernel Space

Aiming at the purpose of solving (3), we need to introduce the reproducing kernel space; previously, let us introduce the concept of the reproducing kernel space.For each ofx
∈
X, there is a function of two variables K
x
(
y
)
∈
H, where H is Hilbert space and X is a set abstraction. If we can get
(4)
〈
u
(
y
)
,
K
x
(
y
)
〉
=
u
(
x
)
,
u
(
y
)
∈
H
,
we say that H is the reproducing kernel Hilbert space and K
x
(
y
) is the reproducing kernel of H.We give a linear spaceW
2
3
[
0
,
b
] as follows:
(5)
W
2
3
[
0
,
b
]
=
{
L
2
u
∣
u
,
u
′
,
u
′′
mkm
is one-variable absolutely continuous function,
mmm
u
′′′
∈
L
2
[
0
,
b
]
,
u
(
0
)
=
0
,
u
′
(
0
)
=
0
}
.
According to [12, 13], we give the inner product as follows:
(6)
〈
u
(
y
)
,
v
(
y
)
〉
=
u
′′
(
0
)
v
′′
(
0
)
+
∫
0
b
‍
u
′′′
(
y
)
v
′′′
(
y
)
d
y
.
And according to [14], we can prove that W
2
3
[
0
,
b
] is a reproducing kernel space; its reproducing kernel R
(
x
,
y
) is(7)
R
(
x
,
y
)
=
{
1
120
(
120
+
x
5
+
120
x
y
mk
-
5
x
4
y
+
30
x
2
y
2
+
10
x
3
y
2
)
,
x
<
y
,
1
120
(
120
+
y
5
+
10
x
2
y
2
(
3
+
y
)
km
-
5
x
y
(
y
3
-
24
)
)
,
y
<
x
.
In order to use reproducing kernel method to solve (3) and referring to [15, 16], we can get ψ
i
(
x
) as follows: (8)
ψ
i
(
x
)
=
{
(
1
24
x
(
x
2
4
x
(
3
+
x
)
y
1
24
i
kkkk
+

n
(
24
-
x
3

+
12
x
y
+
4
x
2
y
)
)
)
|
y
=
x
i
,
x
<
y
,
(
1
24
(
4
y
(
-
3
x
y
2
+
y
3
+
3
x
2
(
1
+
y
)
)
kkikk
+
n
(
y
4
+
6
x
2
y
(
2
+
y
)
1
24
i
kkmmik
-
4
x
(
-
6
+
y
3
)
)
)
)
|
y
=
x
i
,
y
<
x
,
where i
=
1,2
,
3
,
….Then practise Gram-Schmidt orthonormalization for{
ψ
i
(
x
)
}
i
=
1
∞; according to [17, 18] we get
(9)
ψ
-
1
(
x
)
=
β
11
ψ
1
(
x
)
,
ψ
-
2
(
x
)
=
β
21
ψ
1
(
x
)
+
β
22
ψ
2
(
x
)
,
ψ
-
3
(
x
)
=
β
31
ψ
1
(
x
)
+
β
32
ψ
2
(
x
)
+
β
33
ψ
3
(
x
)
,
mmmi
⋮
ψ
-
i
(
x
)
=
β
i
1
ψ
1
(
x
)
+
β
i
2
ψ
2
(
x
)
+
β
i
3
ψ
3
(
x
)
+
⋯
+
β
i
i
ψ
i
(
x
)
,
where β
i
k are coefficients of Gram-Schmidt orthonormalization.If{
x
i
}
i
=
1
∞ are distinct points dense in [
0
,
b
] and L
-
1 is existent, we get that
(10)
u
(
x
)
=
∑
i
=
1
∞
‍
∑
k
=
1
i
‍
β
i
k
F
-
(
x
k
,
v
(
x
k
)
)
ψ
¯
i
(
x
)
+
λ
1
+
λ
2
x
is the solution of (3). The proof of it refers to [19, 20]. If the equations are linear ones, F
-
(
x
,
v
)
=
F
-
(
x
), we can solve the problems directly. If they are nonlinear equations, we have to use iteration method to solve them, and the specific methodology refers to [21, 22].


## 2.3. The Approximate Solution

We denote the approximate solution ofu
m
(
x
) by
(11)
u
m
(
x
)
=
∑
i
=
1
m
‍
∑
k
=
1
i
‍
β
i
k
F
-
(
x
k
,
v
(
x
k
)
)
ψ
¯
i
(
x
)
+
λ
1
+
λ
2
x
.
According to the proof of [23] we can easily get that ∥
u
m
(
x
)
-
u
(
x
)
∥
→
0 and u
m
(
k
)
(
x
)
→
u
(
k
)
(
x
)
,
k
=
0,1
,
2.


## 3. Numerical Experiment

Example 1.
Let us talk about the well-known polytropic differential equation in [3]. Consider
(12)
u
′′
+
2
x
u
′
+
u
5
(
x
)
=
0
,
x
∈
[
0,1
]
,
u
(
0
)
=
1
,
u
′
(
0
)
=
0
,
whose exact solution is given by u
T
(
x
)
=
(
1
+
x
2
/
3
)
-
1
/
2; using the reproducing kernel method, x
i
=
i
h, h
=
1
/
N, i
=
1,2
,
…
,
N, and N
=
50. The numerical results are shown in Figure 1 and Table 1.Table 1
Numerical solutions for Example1.
x
u
T
(
x
)
u
50
|
u
T
(
x
)
-
u
50
(
x
)
|
|
u
T
′
(
x
)
-
u
50
′
(
x
)
|
|
u
T
′
′
(
x
)
-
u
50
′
′
(
x
)
|
0.0
1
1
0
0
0.00298864
0.1
0.998337
0.998338
3.37916
×
1
0
-
7
1.12915
×
1
0
-
7
3.93668
×
1
0
-
6
0.2
0.993399
0.9934
3.57116
×
1
0
-
7
3.49412
×
1
0
-
7
5.2331
×
1
0
-
6
0.3
0.985329
0.98533
4.20119
×
1
0
-
7
9.49753
×
1
0
-
7
8.31208
×
1
0
-
6
0.4
0.974355
0.974355
5.53188
×
1
0
-
7
1.72224
×
1
0
-
6
1.10979
×
1
0
-
5
0.5
0.960769
0.96077
7.64858
×
1
0
-
7
2.49738
×
1
0
-
6
1.31351
×
1
0
-
5
0.6
0.944911
0.944912
1.04891
×
1
0
-
6
3.16098
×
1
0
-
6
1.37757
×
1
0
-
5
0.7
0.927146
0.927147
1.39484
×
1
0
-
6
3.77284
×
1
0
-
6
1.06634
×
1
0
-
5
0.8
0.907841
0.907843
1.81934
×
1
0
-
6
4.9052
×
1
0
-
6
3.95915
×
1
0
-
6
0.9
0.887357
0.887359
2.455
×
1
0
-
6
8.51793
×
1
0
-
6
5.08462
×
1
0
-
5
1.0
0.866025
0.866029
3.77266
×
1
0
-
6
1.98432
×
1
0
-
5
1.76573
×
1
0
-
4Figure 1
Present numerical method for Example1.Example 2.
Considering the following nonlinear equation:(13)
u
′′
(
x
)
+
1
x
u
′
(
x
)
-
u
3
(
x
)
+
3
u
5
(
x
)
=
0
,
x
∈
[
0,1
]
,
u
(
0
)
=
1
,
u
′
(
0
)
=
0
,
the exact solution is given by u
T
(
x
)
=
1
/
1
+
x
2; using the reproducing kernel method, x
i
=
i
h, h
=
1
/
N, i
=
1,2
,
…
,
N, and N
=
50. The numerical results are shown in Figure 2 and Table 2.Table 2
Numerical solutions for Example2.
x
u
T
(
x
)
u
50
|
u
T
(
x
)
-
u
50
(
x
)
|
|
u
T
′
(
x
)
-
u
50
′
(
x
)
|
|
u
T
′
′
(
x
)
-
u
50
′
′
(
x
)
|
0.0
1
1
0
0
0.0112026
0.1
0.995037
0.99504
2.93318
×
1
0
-
6
1.29666
×
1
0
-
5
1.64099
×
1
0
-
4
0.2
0.980581
0.980585
4.30454
×
1
0
-
6
1.58583
×
1
0
-
5
1.26869
×
1
0
-
4
0.3
0.957826
0.957832
6.15161
×
1
0
-
6
2.06044
×
1
0
-
5
1.3056
×
1
0
-
4
0.4
0.928477
0.928485
8.27303
×
1
0
-
6
2.10852
×
1
0
-
5
1.15115
×
1
0
-
4
0.5
0.894427
0.894438
1.03314
×
1
0
-
6
2.12716
×
1
0
-
5
1.93154
×
1
0
-
5
0.6
0.857493
0.857506
1.34827
×
1
0
-
5
5.30101
×
1
0
-
5
7.5356
×
1
0
-
4
0.7
0.819232
0.819258
2.59653
×
1
0
-
5
2.43656
×
1
0
-
4
3.6414
×
1
0
-
3
0.8
0.780869
0.780948
7.95391
×
1
0
-
5
9.70462
×
1
0
-
4
1.22923
×
1
0
-
2
0.9
0.743294
0.74356
2.66219
×
1
0
-
4
3.10842
×
1
0
-
3
3.31332
×
1
0
-
2
1.0
0.707107
0.707909
8.02319
×
1
0
-
4
8.31259
×
1
0
-
3
7.52151
×
1
0
-
2Figure 2
Present numerical method for Example2.Example 3.
Consider a linear Lane-Emden equation:(14)
u
′′
(
x
)
+
1
x
u
′
(
x
)
+
u
(
x
)
=
g
(
x
)
,
x
∈
[
0,1
]
,
u
(
0
)
=
0
,
u
′
(
0
)
=
0
,
where g
(
x
)
=
4
-
9
x
+
x
2
-
x
3; using the reproducing kernel method, x
i
=
i
h, h
=
1
/
N, i
=
1,2
,
…
,
N, and N
=
50,100,150. The exact solution is given by u
T
(
x
)
=
x
2
-
x
3. The numerical results are presented in Figure 3 and Table 3.Table 3
Numerical solutions for Example3.
x
Exact solution
50-order RKM approximation
100-order RKM approximation
150-order RKM approximation
u
T
(
x
)
u
50
(
x
)
u
100
(
x
)
u
150
(
x
)
0.0
0
0
0
0
0.1
0.009
0.00886466
0.00897728
0.00899228
0.2
0.032
0.0318207
0.0319718
0.0319906
0.3
0.063
0.0627957
0.0629686
0.0629896
0.4
0.096
0.0957782
0.0959661
0.0959888
0.5
0.125
0.124764
0.124964
0.124988
0.6
0.144
0.143752
0.143962
0.143987
0.7
0.147
0.146741
0.14696
0.146986
0.8
0.128
0.12773
0.127957
0.127985
0.9
0.081
0.0807176
0.0809539
0.0809837
1.0
0
−0.000295352
−0.0000496372
−0.0000179019Figure 3
Present numerical method for Example3.Example 4.
Consider a Lane-Emden equation of the second kind in [1]. One has
(15)
u
′′
(
x
)
+
n
x
u
′
(
x
)
+
e
u
(
x
)
=
0
,
n
≥
0
,
u
(
0
)
=
0
,
u
′
(
0
)
=
0
,
where n
=
0; using the reproducing kernel method, x
i
=
i
h, h
=
1
/
N, i
=
1,2
,
…
,
N, and N
=
50. The exact solution is given by u
T
(
x
)
=
2
L
n
(
sec
h
(
x
/
2
)
). The numerical results are presented in Figure 4 and Table 4.Table 4
Numerical solutions for Example4.
x
u
T
(
x
)
u
50
|
u
T
(
x
)
-
u
50
(
x
)
|
|
u
T
′
(
x
)
-
u
50
′
(
x
)
|
|
u
T
′
′
(
x
)
-
u
50
′
′
(
x
)
|
0.0
0
0
0
0
0.0198013
0.1
0.00499584
0.00497722
1.86175
×
1
0
-
5
2.00342
×
1
0
-
4
2.32373
×
1
0
-
5
0.2
0.0199337
0.0198951
3.85998
×
1
0
-
5
1.97876
×
1
0
-
4
1.09236
×
1
0
-
4
0.3
0.0446665
0.0446089
5.76023
×
1
0
-
5
1.76911
×
1
0
-
4
4.26393
×
1
0
-
4
0.4
0.0789556
0.0788834
7.21411
×
1
0
-
5
9.9302
×
1
0
-
5
1.3039
×
1
0
-
3
0.5
0.122479
0.122407
7.29154
×
1
0
-
5
1.17118
×
1
0
-
4
3.30994
×
1
0
-
3
0.6
0.174846
0.174807
3.90139
×
1
0
-
5
6.28561
×
1
0
-
4
7.38437
×
1
0
-
3
0.7
0.235604
0.235676
7.16611
×
1
0
-
5
1.71224
×
1
0
-
3
1.50496
×
1
0
-
2
0.8
0.304261
0.304599
3.37896
×
1
0
-
4
3.83982
×
1
0
-
3
2.87368
×
1
0
-
2
0.9
0.380294
0.381194
8.99901
×
1
0
-
4
7.7914
×
1
0
-
3
5.2279
×
1
0
-
2
1.0
0.463163
0.465161
1.99826
×
1
0
-
3
1.48297
×
1
0
-
2
9.16336
×
1
0
-
2Figure 4
Present numerical method for Example4.Example 5.
Consider a Lane-Emden equation in [3]. One has
(16)
u
′′
(
x
)
+
2
x
u
′
(
x
)
+
4
(
2
e
u
(
x
)
+
e
u
(
x
)
/
2
)
=
0
,
x
≥
0
,
u
(
0
)
=
0
,
u
′
(
0
)
=
0
.
Using the reproducing kernel method, x
i
=
i
h, h
=
1
/
N, i
=
1,2
,
…
,
N, and N
=
50. The exact solution is given by u
T
(
x
)
=
-
2
L
n
(
1
+
x
2
). The numerical results are presented in Figure 5 and Table 5.Table 5
Numerical solutions for Example5.
x
Exact solution
50-order RKM approximation
The approximation solutions in [3]
u
T
(
x
)
u
50
(
x
)
u
(
x
) in [3]
0.0
0
0
0
0.01
−0.0001999900
−0.00019999
−0.0001970587
0.1
−0.0199006617
−0.0199007
−0.0198967225
0.5
−0.4462871026
−0.446287
−0.4462840851
1.0
−1.3862943611
−1.38629
−1.3862934297
2.0
−3.2188758249
−3.21888
−3.2188763248
3.0
−4.6051701860
−4.60517
−4.6051709964
4.0
−5.6664266881
−5.66643
−5.6664274573Figure 5
Present numerical method for Example5.


## 4. Conclusions and Remarks

In this paper, reproducing kernel method has been used to solve some typical Lane-Emden examples; the computation implies that the solutions by the reproducing kernel method are very accurate. Moreover, the first and second derivatives of the solutions also have very high accuracy. From all of this, we can affirm that the reproducing kernel method is an efficient and accurate method. All computations are performed by the Mathematica 8.0 software package.



---

*Source: 735831-2014-06-18.xml*