You are on page 1of 8

Applied Mathematics and Computation 186 (2007) 992–999

www.elsevier.com/locate/amc

Numerical solution of sixth order boundary value problems


with sixth degree B-spline functions
a,* b
G.B. Loghmani , M. Ahmadinia
a
Department of Mathematics, University of Yazd, Yazd, Iran
b
Department of Mathematics, University of Qom, Qom, Iran

Abstract

Siddiqi and Twizell using sextic splines to approximate solution of sixth order linear boundary value problems. In the
present paper, a sixth degree B-spline functions is used to construct an approximate solution for sixth order linear and
nonlinear boundary value problems. In fact we will show that for every e > 0, there exist an approximate solution ve such
that the least square error of this ve is less than e > 0. And also ve satisfies the exact boundary conditions.
 2006 Elsevier Inc. All rights reserved.

Keywords: Least square method; B-spline functions; Sextic splines; Sixth order boundary value problems

1. Introduction

Some Refs. [1,2] contains theorems which detail the conditions for existence and uniqueness of solutions of
higher order boundary value problems.
Numerical solution of second and third order boundary value problems have been discussed by Loghmani
and Ahmadinia [13], Caglar et al. [6] and Tirmizi [17]. Usmani [20], solved fourth order boundary value prob-
lem using quartic splines.
When an infinite horizontal layer of fluid is heated from below and is subject to the action of rotation, insta-
bility sets in. When this instability is as ordinary convection the ordinary differential equation is sixth order;
when the instability sets in as overstability, it is modelled by an eighth order ordinary differential equation.
Suppose, now, that a uniform magnetic field is also applied across the fluid in the same direction as gravity.
When instability sets in now as ordinary convection, it is modelled by a tenth order boundary value problem.
When instability sets in as overstability, it is modelled by a twelfth order boundary value problem (for details,
see Chandrasekhar [7]). Finite difference methods of solution for such problems were developed by Boutayeb
and Twizell [3–5], Djidjeli et al. [10], Twizell and Boutayeb [18], and Twizell et al. [19].

*
Corresponding author.
E-mail addresses: loghmani@yazduni.ac.ir (G.B. Loghmani), mahdiahmadinia@yahoo.com (M. Ahmadinia).

0096-3003/$ - see front matter  2006 Elsevier Inc. All rights reserved.
doi:10.1016/j.amc.2006.08.068
G.B. Loghmani, M. Ahmadinia / Applied Mathematics and Computation 186 (2007) 992–999 993

Siddiqi and Twizell [16], used sextic splines to solve a sixth order linear boundary value problem of the form
8
ð6Þ
>
< y þ /ðtÞyðtÞ ¼ wðtÞ; 1 < a 6 t 6 b < 1
yðaÞ ¼ A0 ; y 00 ðaÞ ¼ A2 ; y ð4Þ ðbÞ ¼ A4 ;
>
:
yðbÞ ¼ B0 ; y 00 ðbÞ ¼ B2 ; y ð4Þ ðbÞ ¼ B4 ;

where y = y(t), and /(t) and w(t) are continuous functions defined in the interval t 2 [a, b], and Ai and Bi,
i = 0, 2, 4, are finite real constants.
In the present paper a sixth degree B-spline function is used to solve sixth order boundary value problems.
These problems have the general form

gðt; yðtÞ; y 0 ðtÞ; . . . ; y ð6Þ ðtÞÞ ¼ 0; 1 < a 6 t 6 b < 1

with the separated boundary conditions


8
> c10 yða1 Þ þ c11 y 0 ða1 Þ þ    þ c15 y ð5Þ ða1 Þ ¼ A1 ;
>
>
>
> c20 yða2 Þ þ c21 y 0 ða2 Þ þ    þ c25 y ð5Þ ða2 Þ ¼ A2 ;
>
>
>
< c30 yða3 Þ þ c31 y 0 ða3 Þ þ    þ c35 y ð5Þ ða3 Þ ¼ A3 ;
> 0 ð5Þ
> c40 yða4 Þ þ c41 y ða4 Þ þ    þ c45 y ða4 Þ ¼ A4 ;
>
>
>
> c50 yða5 Þ þ c51 y 0 ða5 Þ þ    þ c55 y ð5Þ ða5 Þ ¼ A5 ;
>
>
:
c60 yða6 Þ þ c61 y 0 ða6 Þ þ    þ c65 y ð5Þ ða6 Þ ¼ A6 ;

where a 6 a1 6 a2 6 a3 6 a4 6 a5 6 a6 6 b.
We convert the problem into an optimal control problem (in fact, a least square problem) with control
u(t) = y(5)(t). The approximate solution is taken as a linear combination of certain spline functions as in
[12–14]. The optimal control problem is converted to a (not necessarily linear) system of equations of the
unknown coefficients of the linear combination. The method finds a sequence of functions {vk} which satisfy
the exact separated boundary conditions. Also, up to an error ek, the function vk satisfies the differential equa-
tion, where ek ! 0 as k ! 1.
The rest of the paper is organized as follows: In Sections 2 and 3 describes the method of approximating
sixth order B-spline functions using least square method. In Section 4 we show the numerical results and a
comparison with the exact solution. The effectiveness of the method will be demonstrated as well.

2. Spline solution for sixth order boundary value problems

Consider the differential equation

gðt; yðtÞ; y 0 ðtÞ; . . . ; y ð6Þ ðtÞÞ ¼ 0; 1 < a 6 t 6 b < 1 ð1Þ

with the separated boundary conditions


8
> c10 yða1 Þ þ c11 y 0 ða1 Þ þ    þ c15 y ð5Þ ða1 Þ ¼ A1 ;
>
>
> c yða Þ þ c y 0 ða Þ þ    þ c y ð5Þ ða Þ ¼ A ;
>
>
> 20 2 21 2 25 2 2
>
< c30 yða3 Þ þ c31 y 0 ða3 Þ þ    þ c35 y ð5Þ ða3 Þ ¼ A3 ;
ð2Þ
> 0 ð5Þ
> c40 yða4 Þ þ c41 y ða4 Þ þ    þ c45 y ða4 Þ ¼ A4 ;
>
>
>
> c50 yða5 Þ þ c51 y 0 ða5 Þ þ    þ c55 y ð5Þ ða5 Þ ¼ A5 ;
>
>
:
c60 yða6 Þ þ c61 y 0 ða6 Þ þ    þ c65 y ð5Þ ða6 Þ ¼ A6 :

Let g : R8 ! R be a continuous function . We convert the problem to an optimal control problem


Z b
2
min ðgðt; yðtÞ; y 0 ðtÞ; . . . ; uðtÞ; u0 ðtÞÞÞ dt
ðy;uÞ a
994 G.B. Loghmani, M. Ahmadinia / Applied Mathematics and Computation 186 (2007) 992–999

with constraint u(t) = y(5)(t) and boundary conditions


8
> c10 yða1 Þ þ c11 y 0 ða1 Þ þ    þ c15 uðtÞða1 Þ ¼ A1 ;
>
>
> c yða Þ þ c y 0 ða Þ þ    þ c uðtÞða Þ ¼ A ;
>
>
> 20 2 21 2 25 2 2
>
< c30 yða3 Þ þ c31 y 0 ða3 Þ þ    þ c35 uðtÞða3 Þ ¼ A3 ;
>
> c40 yða4 Þ þ c41 y 0 ða4 Þ þ    þ c45 uðtÞða4 Þ ¼ A4 ;
>
>
>
> c50 yða5 Þ þ c51 y 0 ða5 Þ þ    þ c55 uðtÞða5 Þ ¼ A5 ;
>
>
:
c60 yða6 Þ þ c61 y 0 ða6 Þ þ    þ c65 uðtÞða6 Þ ¼ A6 ;

where u : R ! R is taken to be control functions as in [11,12]. The actual solution of (1) and (2) is a function v
such that
2
kgðt; vðtÞ; v0 ðtÞ; . . . ; vð6Þ ðtÞÞkL2 ð½a;bÞ ¼ 0

and v satisfies the boundary conditions (2).


For all e > 0, the method finds an approximate solution ve satisfying (2), and

kgðt; ve ðtÞ; v0e ðtÞ; . . . ; veð6Þ ðtÞÞk2L2 ð½a;bÞ < e:

The sketch of the method is delineated as follows.


Consider sixth degree spline function
8 6
> t; 0 6 t 6 1;
>
>
>
> 6t6 þ 42t5  105t4 þ 140t3  105t2 þ 42t  7; 1 < t 6 2;
>
>
> 6
>
>
> 15t  210t5 þ 1155t4  3220t3 þ 4935t2  3990t þ 1337; 2 < t 6 3;
>
>
< 20t6 þ 420t5  3570t4 þ 15680t3  37590t2 þ 47040t  24178; 3 < t 6 4;
BðtÞ ¼
>
> 15t6  420t5 þ 4830t4  29120t3 þ 96810t2  168000t þ 119182; 4 < t 6 5;
>
>
>
> 6 5 4 3 2
> 6t þ 210t  3045t þ 23380t  100065t þ 225750t  208943;
>
>
5 < t 6 6;
>
> 6 5 4 3 2
>
> t  42t þ 735t  6860t þ 36015t  100842t þ 117649; 6<t67
:
0 otherwise:
k
for a fix k 2 N, and consider a equal partition a < a + h < a + 2h <    < a + 3 Æ 2 h = b on [a, b] where h ¼ ba
32k
.
Define
 
3  2k
Bki ðtÞ ¼ B ðt  aÞ  i ; ði ¼ 6; 2; . . . ; 3  2k  1Þ;
ba
where B is a scaling function (sixth degree spline in [9,15]) and Bki ; ðk 2 N; i ¼ 6; 5; . . . ; 3  2k  1Þ are trans-
lations and dilations of B as prescribed in [8,12–14]. Let
k
X
32 1
vk ðtÞ ¼ ci Bki ðtÞ; ð3Þ
i¼6

where the coefficients {ci} are determined from the conditions


8 ð5Þ
>
> c10 vk ða1 Þ þ c11 v0k ða1 Þ þ    þ c15 vk ða1 Þ ¼ A1 ;
>
>
>
> ð5Þ
c20 vk ða2 Þ þ c21 v0k ða2 Þ þ    þ c25 vk ða2 Þ ¼ A2 ;
>
>
>
>
< c v ða Þ þ c v0 ða Þ þ    þ c vð5Þ ða Þ ¼ A ;
30 k 3 31 k 3 35 k 3 3
> c40 vk ða4 Þ þ c41 v0 ða4 Þ þ    þ c45 vð5Þ ða4 Þ ¼ A4 ;
>
>
> k k
>
>
>
> 0 ð5Þ
c50 vk ða5 Þ þ c51 vk ða5 Þ þ    þ c55 vk ða5 Þ ¼ A5 ;
>
>
: ð5Þ
c60 vk ða6 Þ þ c61 v0k ða6 Þ þ    þ c65 vk ða6 Þ ¼ A6
G.B. Loghmani, M. Ahmadinia / Applied Mathematics and Computation 186 (2007) 992–999 995

and the following least square problem:


ð6Þ 2
min kgðt; vk ðtÞ; v0k ðtÞ; . . . ; vk ðtÞÞkL2 ð½a;bÞ :
ci

The minimization problem is equivalent to the following system:


o ð6Þ 2
kgðt; vk ðtÞ; v0k ðtÞ; . . . ; vk ðtÞÞkL2 ð½a;bÞ ¼ 0; ði ¼ 6; 5; . . . ; 3  2k  1Þ:
oci

3. Justification of the method

To justify the method, we consider the special case


Z 1
min f ðt; yðtÞ; y 0 ðtÞÞ dt ð4Þ
y 0

and y satisfies the boundary conditions


ci0 yðai Þ ¼ Ai ; 1 6 i 6 6: ð5Þ
Consider the linear spline function
8
>
< t; 0 6 t 6 1;
BðtÞ ¼ 2  t; 1 6 t 6 2;
>
:
0 otherwise:
P
Let yðtÞ ¼ ci Bki ðtÞ, where Bki(t) :¼ B(2kt  i + 1) (i = 0, 1, 2, . . . , 2k). (Bki’s are translations and dilations of
linear spline (hat function) B.) Then
Z 1 Z 1 !
2k
X 2k
X
f ðt; yðtÞ; y 0 ðtÞÞ dt ¼ f t; ci Bki ðtÞ; ci B0ki ðtÞ dt ¼ F ðc0 ; c1 ; . . . ; c2k Þ: ð6Þ
0 0 i¼0 i¼0

Therefore, in view of (6), the optimal problem (4) and (5) reduces to the problem
minc0 ;...;c2k F ðc0 ; c1 ; . . . ; c2k Þ ð7Þ
subject to gi ðc0 ; c1 ; . . . ; c2k Þ ¼ 0; 1 6 i 6 6; ð8Þ
where g0i s are derived from Eq. (5). For finding c0 ; c1 ; c2 ; . . . ; c2k , we have to solve the system oF
ocj
¼
0; ðj ¼ 0; 1; . . . ; 2k Þ:
Let c0 ; c1 ; . . . ; c2k be the solution of (7) and (8) and set
2k
X
y k ðtÞ ¼ ci Bki ðtÞ: ð9Þ
i¼0

Let
Z 1
LðyÞ :¼ f ðt; yðtÞ; y0ðtÞÞ dt:
0

Suppose there exists a solution y* 2 C([0, 1]) of (4) satisfying (5). (We assume L(y*) 5  1.) The following
theorem shows that under reasonable conditions, Lðy k Þ converges to L(y*) as k ! +1.
Theorem 1. Let f have the property that for all e > 0 there exists d > 0 such that jf(t, x, y)  f(t, x1, y1)j < e,
whenever jx  x1j < d and jy  y1j < d. Let y* 2 C([0, 1]) be a solution of the problem: (4) and (5). Assume (y*) 0
is piecewise continuous, left continuous on [0, 1]. The following assertions are true.

(a) For all e > 0 there exists k 2 N and yk such that 0 6 L(yk)  L(y*) < e, and yk satisfies (5).
(b) Let y k be as in (9). Then Lðy  Þ 6 Lðy k Þ 6 Lðy k Þ and Lðy k Þ ! Lðy  Þ as k ! +1.
996 G.B. Loghmani, M. Ahmadinia / Applied Mathematics and Computation 186 (2007) 992–999

Proof. Fix e > 0. Let h 2 C1([0, 1]) be such that h satisfies (5) and jL(h)  L(y*)j < e/2. Such a function can be
constructed by using the fact that f(t, y*(t), (y*) 0 (t)) and (y*) 0 (t) are bounded as t runs from 0 to 1, and (y*) 0 is
continuous outside the union of m intervals (ai, bi) of arbitrary small lengths; the function h can be chosen such
that h 0 = (y*) 0 outside these intervals and
Z bi Z bi
h0 ðtÞ dt ¼ ðy  Þ0 ðtÞ dt ði ¼ 1; 2; . . . ; mÞ:
ai ai

(Here m denotes the number of discontinuties of (y*) 0 .) And


X
m
ðbi  ai Þ 6 =ð4MÞ;
i¼1

where M is a bound of f when t 2 [0, 1]. Thus


m Z
X bi
0

jLðy Þ  LðhÞj 6 jf ðt; y  ðtÞ; ðy  Þ ðtÞÞ  f ðt; hðtÞ; h0 ðtÞÞj dt 6 =2:
i¼1 ai

k
Now, let k 2 N, let Bk0 ; Bk1 ; . .P .;B k2k be the functions introduced before the theorem, and let ti = i/2 ,
k 2k k
(i = 0, 1, . . . , 2 ). Define y k ðtÞ :¼ i¼0 hðti ÞBki ðtÞ. Then yk(ti) = h(ti), (i = 0, 1, . . . , 2 ) and the restriction of
yk(t) to each subinterval [ti, ti+1] is a line segment. Since h is uniformly continuous, the sequence {yk} converges
uniformly to h. Also, it follows by the mean-value theorem applied to the restriction of h to each [ti, ti+1] that y 0k
converges uniformly on [0, 1] to the derivative h 0 . (Note that each y 0k is assumed to be piecewise continuous,
and left continuous on [0, 1].)
Let d be the positive number corresponding to e/2 as in the statement of the theorem. There exists a natural
number N such that, for all k > N, kyk  hk1 < d and ky 0k  h0 k1 < d. Thus

jf ðt; y k ðtÞ; y 0k ðtÞÞ  f ðt; hðtÞ; h0 ðtÞÞj < e=2:

It follows that jL(yk)  L(y*)j 6 jL(yk)  L(h)j + jL(h)  L(y*)j < e for k > N. This proves (a).
For (b), we know that L(y*) 6 L(y) for all y 2 C([0, 1]) satisfying (5). Hence Lðy  Þ 6 Lðy k Þ. The inequality
Lðy k Þ 6 Lðy k Þ is clear. h
The above theorem shows that for all e > 0 there exists an approximate solution y k for the optimal control
problem (4) and (5) such that the difference between the value of Lðy k Þ and the value L(y*) is at most e.
If the problem involves the higher derivative y00 , we will use the quadratic spline function B as
8 2
> t; 0 6 t 6 1;
>
>
>
< 2t2 þ 6t  3; 1 < t 6 2;
BðtÞ ¼
> 2
> ð3  tÞ ; 2 < t 6 3;
>
>
:
0 otherwise:

Here, B00 is a left continuous step function. In this method, B is used when the regularity of B is minimal. That
00
is, if the problem involves y 0 only, then B 0 must be chosen to be a step function; if it involves y 0 and y00 , then B
must be chosen to be a step function, etc.

4. Numerical results

In this section, the method discussed on Section 2 were tested on two problems from the literature [16]. The
spline solution of Eqs. (1) and (2) was obtained using a linear combination Eq. (3), and resulting of minimi-
zation problem was solved by maple (9.5). The least square errors (LSE) in the analytical solutions for Test
problems 1and 2 were calculated and are depicted in Figs. 1–3.
G.B. Loghmani, M. Ahmadinia / Applied Mathematics and Computation 186 (2007) 992–999 997

LSE=6.04733*10(-7)

0.4

0.3

0.2

0.1

0
0 0.2 0.4 0.6 0.8 1
x
approximate solution

exact solution

Fig. 1. Spline solution and analytical solution for k = 0 with LSE.

LSE=1*10(-9)

0.4

0.3

0.2

0.1

0
0 0.2 0.4 0.6 0.8 1
x
approximate solution

exact solution

Fig. 2. Spline solution and analytical solution for k = 2 with LSE.

Test problem 1 ([16], Eq. (4.1)). Consider the linear boundary value problem
y ð6Þ þ ty ¼ ð24 þ 11t þ t3 Þet ; 0 6 t 6 1;
yð0Þ ¼ yð1Þ ¼ 0; y 00 ð0Þ ¼ 0; y 00 ð1Þ ¼ 4e;
y ð4Þ ð0Þ ¼ 8; y ð4Þ ð1Þ ¼ 16e
998 G.B. Loghmani, M. Ahmadinia / Applied Mathematics and Computation 186 (2007) 992–999

LSE=1.581792*10(-7)

0.3

0.2

0.1 x
-1 -0.5 0 0.5 1
0

-0.1

-0.2

-0.3

approximate solution

exact solution

Fig. 3. Spline solution and analytical solution for k = 0 with LSE.

with exact solution


yðtÞ ¼ tð1  tÞet ð10Þ
we use the method and obtain the results as shown in Figs. 1 and 2.

Test problem 2 ([16], Eq. (4.3)). Consider the linear boundary value problem
y ð6Þ þ y ¼ 6½2x cosðxÞ þ 5 sinðxÞ; 1 6 t 6 1;
yð1Þ ¼ yð1Þ ¼ 0;
y 00 ð1Þ ¼ 4 cosð1Þ þ 2 sinð1Þ;
y 00 ð1Þ ¼ 4 cosð1Þ þ 2 sinð1Þ;
y ð4Þ ð1Þ ¼ 8 cosð1Þ  12 sinð1Þ;
y ð4Þ ¼ 8 cosð1Þ  12 sinð1Þ
with exact solution
yðtÞ ¼ ðx2  1Þ sinðxÞ ð11Þ
we use the method and obtain the results as shown in Fig. 3.
Note: It is interesting to note that, the method even for small k yields a good result. And the maximum
absolute error with the analytical solution for Test problem 1 ([16], Eq. (4.1)) with n = 100 is 0.5418 ·
106. But the least square error for this problem with k = 0 is 0.6047 · 106 and for k = 2 is 1 · 109. Also
the maximum absolute error with the analytical solution for Test problem 2 ([16], Eq. (4.3)) with n = 128 is
0.5801 · 106. But the least square errors for this problem with k = 0 is 0.1582 · 106.

5. Conclusions

A linear combination of B-spline functions with least square method create a method for the numerical
solution of sixth order boundary value problems. It is interesting to note that, The method solves any linear
and nonlinear boundary value problem with the separated boundary conditions of any accuracy. Also our
G.B. Loghmani, M. Ahmadinia / Applied Mathematics and Computation 186 (2007) 992–999 999

method in comparison with the method of Siddiqi and Twizell [16] is very better with a view to accuracy and
utilization.

Acknowledgement

The authors would like to thank the research council of Yazd university for their support of this project.

References

[1] A.R. Aftabizadeh, N.H. Pavel, Y.K. Huang, Anti-periodic oscillations of some second order differential equations and optimal
control problem, J. Comput. Appl. Math. 52 (1–3) (1994) 3–21.
[2] R.P. Agarwal, Boundary Value Problems for High order Differential Equations, World Scientific, Singapore, 1986.
[3] A. Boutayeb, E.H. Twizell, Numerical methods for the solution of special sixth-order boundary-value problems, Int. J. Comput.
Math. 45 (1992) 207–233.
[4] A. Boutayeb, E.H. Twizell, Finite difference method for the solution of eighth-order boundary-value problems, Int. J. Comput. Math.
48 (1993) 63–75.
[5] A. Boutayeb, E.H. Twizell, Finite difference method for twelfth-order boundary-value problems, J. Comput. Appl. Math. 35 (1991)
133–138.
[6] H.N. Caglar, S.H. Caglar, E.H. Twizell, The numerical solution of third-order boundary-value problems with fourth-degree B-spline
functions, Int. J. Comput. Math. 71 (1999) 373–381.
[7] S. Chandrasekhar, Hydrodynamic and Hydromagnetic Stability, Clarendon Press, Oxford, 1961, Reprinted by Dover Books,
New York, 1981.
[8] I. Daubecheis, Orthonormal bases of compactly supported wavelets, Comm. Pure Appl. Math. 41 (1988) 909–996.
[9] C. De Boor, A Practical Guide to Splines, Springer-Verlag, Newyork, 1978.
[10] K. Djidjeli, E.H. Twizell, A. Boutayeb, Finite-difference methods for the special nonlinear boundary-value problems of order 2m,
J. Comput. Appl. Math. 47 (1993) 35–45.
[11] S. Effati, A.V. Kamyad, Solution of boundary value problems for linear second order ODE’s by using measure theory, J. Anal. 6
(1998) 139–149.
[12] M. Gachpazan, A. Kerayechian, A.V. Kamyad, A new method for solving nonlinear second order partial differential equations,
Korean J. Comput. Appl. Math. 7 (2) (2000) 333–345.
[13] G.B. Loghmani, M. Ahmadinia, Numerical solutions of third-order boundary value problems, Iran J. Sci. Technol. Transaction A, to
appear.
[14] M. Radjabalipour, Application of wavelet to optimal control problems, in: International Conference on Scientific Computation and
Differential Equations, UBC, Vancouver, July 29–August 3, 2001).
[15] J. Stoer, R. Bulirsch, Introduction to Numerical Analysis, Springer-Verlag, Berlin, 1993.
[16] S.S. Siddiqi, E.H. Twizell, Spline solutions of linear sixth-order boundary value problems, Int. J. Comput. Math. 60 (1996) 295–304.
[17] S.I.A. Tirmizi, On numerical solution of third order boundary-value problems, Comm. Appl. Numer. Math. 7 (1991) 309–313.
[18] E.H. Twizell, A. Boutayeb, Numerical methods for the solution of special and general sixth-order boundary-value problems, with
application to Benard Layer eigenvalue problems, Proc. R. Soc. Lond. A 431 (1990) 433–450.
[19] E.H. Twizell, A. Boutayeb, K. Djidjeli, Numerical methods for eighth-, tenth- and twelfth-order eigenvalue problems arising in
thermal instability, Adv. Comput. Math. 2 (1994) 407–436.
[20] R.A. Usmani, The use of quartic splines in the numerical solution of a fourth-order boundary-value problem, J. Comput. Appl. Math.
44 (1992) 187–199.

You might also like