Вы находитесь на странице: 1из 8

Applied Mathematics and Computation 175 (2006) 7279 www.elsevier.

com/locate/amc

B-spline interpolation compared with nite dierence, nite element and nite volume methods which applied to two-point boundary value problems
Hikmet Caglar a, Nazan Caglar
a

b,* ,

Khaled Elfaituri

Istanbul Kultur University, Department of Mathematics-Computer, Istanbul, Turkey b Istanbul Kultur University, Faculty of Economic and Administrative, No: 22, 34191, Atakoy-Istanbul, Turkey

Abstract This paper considers the B-spline interpolation and compares this method with nite dierence, nite element and nite volume methods which applied to the two-point boundary value problem.   d du px f x; a < x < b; ua ub 0. dx dx 2005 Elsevier Inc. All rights reserved.
Keywords: Piecewise polynomial; B-spline interpolation; Finite dierence; Finite element; Finite volume

Corresponding author. E-mail address: ncaglar@iku.edu.tr (N. Caglar).

0096-3003/$ - see front matter 2005 Elsevier Inc. All rights reserved. doi:10.1016/j.amc.2005.07.019

H. Caglar et al. / Appl. Math. Comput. 175 (2006) 7279

73

1. Introduction The theory of spline functions is a very active eld of approximation theory and boundary value problems (BVPs), when numerical aspects are considered. In a series of papers by Caglar et al. [35] BVPs of order third, fourth and fth were solved using fourth and sixth-degree B-splines. In the present paper, a cubic B-spline interpolation is used to solve two-point boundary value problems as the following form which are assumed to have a unique solution in the interval of integration [1]:   d du px f x; dx dx a < x < b;
1

1:1

ua ub 0;

where p 2 C a; b; p > 0 and f 2 Ca; b.

The method is tested on numerical example and results are compared with nite dierence, nite element and nite volume methods from the literature [7].

2. Piecewise polynomial Generally, consider the piecewise polynomial, let [a, b] & R be a nite interval and we introduce a set of partition X = {x0, x1, x2, . . . , xn} of [a, b], where xi (i = 0, 1, 2, 3, . . . , n) are called nodes of the partition. The set of piecewise polynomials of degree k dened on a partition X = {x0, x1, x2, . . . , xn} is denoted by Pk(Xn) in each subinterval Ii = [xi1, xi] is a kth degree polynomial. Specically, consider the type of basis, B-spline (bell-shaped splines), for our spline interpolation function, for which we only use the equidistant partition. Moreover, we extend the set of nodes by taking h ba ; n x0 a; and xi x0 ih; where i 1; 2; 3; . . .

A detailed description of B-spline functions generated by subdivision can be found in [2].

3. Implicit denition Let {Xn} be a partition of [a, b] & R. A B-spline of order l is a spline from Sl(Xn) with minimal support and the partition of unity holding. Let Bl,i(x) denote the B-spline of degree l, where i 2 Z and then we have the following properties:

74

H. Caglar et al. / Appl. Math. Comput. 175 (2006) 7279

Supp (Bl,i) = [xi, xi+l+1], P (x) P 0 "x 2 R (non-negativity), Bl,i 1 i1 Bl;i x 1 8x 2 R partition of unity.

4. Explicit denition Let {Xn} be a set of partition of [a, b], The zero degree B-splines are dened as follows:  1; where xi 6 x 6 xi1 ; B0;i x 4:1 0; otherwise and for positive l, it is dened in the following recursive form:  Bl;i x    x xi xli1 x Bli;i x Bl1;i1 x. xli1 xi1 xli xi 4:2

We apply this recursion to get the third-degree B-spline which is the most important case for the study in this paper. The third-degree B-splines are dened as 8 3 where x 2 xi ; xi1 ; > x xi ; > > > > 3 > h 3h2 x x 3hx x 2 > > i1 i1 > > > > 3 where x 2 xi1 ; xi2 ; 1 < 3x xi1 ; B3;i x 3 2 > 6h > h3 3h2 xi3 x 3hxi3 x > > > > > > 3xi3 x3 ; where x 2 xi2 ; xi3 ; > > > > : 3 xi4 x ; where x 2 xi3 ; xi4 . 4:3

5. Cubic B-spline interpolation The cubic B-spline interpolation is a linear combination of the cubic B-spline basis as follows: n1 X S l x C i B3;i x; 5:1
i3

where Ci are unknown real coecients and B3,i(x) are third-order B-spline functions [2,6,8].

H. Caglar et al. / Appl. Math. Comput. 175 (2006) 7279

75

B3,i=3(x) B3, i2(x) B3, i1(x)

xi 3

xi 2

xi 1

xi

xi +1

xi +2

x i +3

Fig. 1. Explains the terms which are not zero.

We have two free parameters, and there are three terms not equal to zero at the nodes (see Fig. 1). From Eq. (5.1) can be simplied to Sxi C i3 B3;i3 xi C i2 B3;i2 xi C i1 B3;i1 xi f xi ; where i 0; 1; 2; . . . ; n. By this equation, a system of linear equations of order (n + 1) (n + 3) can be build as shown below: 2 1 4 1 0 1 4 1 0 1 4 ... ... ... 0 1 ... 0 ... .. . 6 6 6 0 6 6 6 0 6 6 6... 4 0 32 C 3 0 76 . 76 C 2 . 76 . 76 . 76 . 76 . 76 76 . 76 . 54 . C n1 3 2 f x0 3 7 7 6 7 6 f x1 7 7 7 6 7 6 . 7 7 6 . 7 7 66 . 7. 7 7 6 7 6 . 7 7 6 . 7 5 4 . 5 f xn

... 0 1 4 1

This means we need two free parameters, the initial value conditions or the boundary value conditions to solve this system.

6. Numerical result and conclusion In this section, the method discussed in Section 5 is tested on the following problem from the literature [7]. We compare our results with nite dierence, nite element and nite volume solutions. Problem 6.1 px e1x ; f x 1 e1x in the interval a; b 0; 1. 6:1

76

H. Caglar et al. / Appl. Math. Comput. 175 (2006) 7279

The analytical solution is u(x) = x(1 ex1). We obtain from (1.1)     d du d 1x du px e f x ) f x; dx dx dx dx d2 u du ex1 1. dx2 dx The spline solution can be obtained by using (6.2) in (5.1) for n = 10 ux C 3 B3 x C 2 B2 x C 9 B9 x; u0 x C 3 B03 x C 2 B02 x C 9 B09 x; u00 x C 3 B00 x C 2 B00 x C 9 B00 x 3 2 9 and     1 1 C 2 0 C 1 ; 2h 2h     1 1 C 1 0 C 0 ; u0 0:1 C 2 2h 2h . . .     1 1 0 u 1 C 7 C 8 0 C 9 ; 2h 2h u0 0:0 C 3 u00 0:0 C 3 . . .       1 2 1 C 2 2 C 1 2 ; 2h h h

6:2

6:3

6:4

and

6:5

      1 2 1 00 u 1 C 7 2 C 8 2 C 9 2 . h h h By substituting (6.3)(6.5) in (6.2). Then the following system of equations can be written in matrix form: 3 2 2 h 4 2 h 0 0 0 3 3 2 2 C 1:3679 7 3 6 0 2 h 4 2 h 0 0 76 6 7 6 1:4066 7 6 . 7 6 . . 76 C 2 7 .. .. 76 . 7 2h2 6 6 .. 7. . . 76 . 7 . . 6 7 6 . 74 . 5 6 5 4 . 5 4 4 2 h 0 2 C9 0 0 2 h 4 2 h 6:6 But this system is (11 13), the two equations should be added from boundary conditions which are u(0) = u(1) = 0. Thus matrix form (6.6) can be rewritten as

H. Caglar et al. / Appl. Math. Comput. 175 (2006) 7279

77

32 C 3 3 2 3 0 6C 7 6 2 h 4 2 h 0 6 1:3679 7 0 0 76 2 7 76 6 7 6 76 C 7 6 7 6 6 0 2 h 4 2 h 0 6 1:4066 7 0 76 1 7 7 76 . 7 6 7 6 6 . 7 . . 76 . 7 .. .. . . 76 . 7 2h2 6 6 . 7. 6 . . 7 . . 6 . 7 6 6 . 7 76 . 7 6 . 7 6 . . 76 . 7 6 . 7 6 . 4 2 h 0 76 6 . 7 6 76 . 7 6 7 6 7 4 0 4 2 5 0 2 h 4 2 h 54 . 5 . 0 0 1=6 2=3 1=6 C9 2 1=6 2=3 1=6 0 0 6:7 Then if h = 0.1 we can nd C as follows: C 0:0657; 0:0012; 0:0608; 0:1119; 0:1531; . . . ; 0:1490; 0:0902; 0:0050; 0:1102. P And we can nd the function ux n1 ci B3;i x, for example i3
u1 x 0:2x3 0:3649x2 0:6325x 0:000016 at the interval 0; 0:1; u2 x 0:2333x3 0:3550x2 0:6315x 0:000016 at the interval 0:1; 0:2; u3 x 0:25x3 0:3449x2 0:6294x 0:00015 at the interval 0:2; 0:3; . . . u10 x 0:6x3 0:3x2 0:1979x 0:102 at the interval 0:9; 1.

If we compare our results with the results Fang et al. [7], we will see the dierence between them and conclude that the B-spline interpolation is the better method to interpolate any smooth functions than others. The numerical results for our example are shown in Table 1, which shows that there is a big dierence for the errors between B-spline interpolation and other methods unless there is no remarkable dierence among the accuracy of the other three methods in the case where f is sufciently smooth.
Table 1 Shows the max-norm of errors for the four methods with respect to the true solution Methods Finite dierence solution Finite element solution Finite volume solution B-spline interpolation H 0.1 0.01 0.1 0.01 0.1 0.01 0.1 0.01 Max-norm/h2 8.24e3 8.31e3 6.35e3 6.36e3 3.18e3 3.18e3 2.9e4 2.89e6

78

H. Caglar et al. / Appl. Math. Comput. 175 (2006) 7279

The next graphs are showing the original function U(x) with respect to the functions of B-spline interpolation ui(x), where i = 1, 2, 3, . . . , 10 respectively.

References
[1] R.P. Agarwal, Boundary Value Problems for High Order Dierential Equations, World Scientic, Singapore, 1986. [2] C. De Boor, A Practical Guide to Splines, Springer-Verlag, New York, 1978. [3] 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) 373381.

H. Caglar et al. / Appl. Math. Comput. 175 (2006) 7279

79

[4] H.N. Caglar, S.H. Caglar, E.H. Twizell, The numerical solution of fth-order boundary-value problems with sixth-degree B-spline functions, Appl. Math. Lett. 12 (1999) 2530. [5] N. Caglar, H. Caglar, B. Cagal, Spline solution of nonlinear beam problems, J. Concr. Applic. Math. 1 (3) (2003) 253259. [6] K. Elfaituri, L. Lojos, Interpolation theory, MSc. Thesis, Otvos Lurant University, Hungary, 1998. [7] Q. Fang, T. Tsuchiya, T. Yamamoto, Finite dierence, nite element and nite volume methods applied to two-point boundary value problems, J. Comput. Appl. Math. 139 (2002) 919. [8] H. Yingkang, M.Y. Xiang, Discrete modulus of smoothness of splines with equally spaced knots, SIAM Rev. 32 (5) (1995) 14281435.

Вам также может понравиться