Download as pdf or txt
Download as pdf or txt
You are on page 1of 98

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/333810850

B-Spline Interpolation Method for Solving Differential Equations

Thesis · November 2013

CITATIONS READS

0 2,050

1 author:

Ali Zyarah
Iraqi Ministry of Education, General Directorate of Education for the Holy Karbala
11 PUBLICATIONS 20 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Application Mathematics View project

All Mathematics Conferences View project

All content following this page was uploaded by Ali Zyarah on 16 June 2019.

The user has requested enhancement of the downloaded file.


Republic of Iraq
Ministry of Higher Education
and Scientific Research
Kufa University
College of Education for Girls
Department of Mathematics

B-Spline Interpolation Method


for Solving Differential
Equations
A Thesis Submitted to
The Council of the College of Education for Girls
University of Kufa
in Partial Fulfillment of the Requirements for the Degree of Master of
Science in Mathematics

By

Ali Abd Al Hussein Ibrahim Zyarah

Supervised by

Assis.Prof.Dr. Adil Mohamad Hassan Al-Rammahi

1434 A.H. 2013 A.D.


‫‪ ‬ال ر حَمٰ ر ُ‪ ‬علَ ر َ الرء ر َا َ ‪ ‬خَلَ ر َ اإلنس ر‬

‫‪ ‬عَلَمَهُ البَيَ َ ‪ ‬الشَمسُ والرَمَر ُ ِحُُسربَ ‪‬‬

‫وَالنَج ُ وَالشَجَ ُ يَسجُدَا ح ‪‬‬

‫صدق اهلل العلي العظيم‬

‫سورة الرمحن‬
To the one who has taught me the tender without waiting….
To the one who has carried his name proudly…. My Father

To the meaning of love and the meaning of affection and


dedication….
To smile life mystery of existence…. My Mother

To those who gave the best help and support…. My Brothers

To the very-devoted ….
To the candle who illuminates the darkness of my life…
My Sister

To My Friends
To who are so distinguished ….
Who are with me in the road to success and goodness….

ali
Acknowledgments
Praise is to God, Lord of the world, and best prayers and peace be
unto his last messenger Mohammed, and his pure descendants, and his
noble companions.

I would like to thank my supervisor, Assis.Prof.Dr.Adil Mohamad


Hassan Al-Rammahi, for suggesting this project and for his guidance
throughout this work.
I wish to express my deepest thanks to Prof.Dr.Ali.H.Battor head of
the Mathematics Department in the College of Education for Girls, Prof.
Ali.H.Mohammed, Assis.Prof.Hussein Hadi Abass, Assis.Prof.Dr.Habeeb
Kareem Abdullah, Dr.Hussein Nasrallh and all staff the members in the

department for their help and encouragement during my work…..


I would like to extend my thanks to all teaching staff at the
University of Karbala - Department of Mathematics….
Supervisor’s Certification
I certify that the preparation of this thesis entitled
"B-Spline Interpolation Method for Solving
Differential Equations" was made under my
supervision at The University of Kufa, College of
Education for Girls, as a partial fulfillment of the
requirements for the degree of master of science in
mathematics .

Signature:
Name : Assistant Professor Dr. Adil Mohamad Hassan Rizaq
Date : / /2013

In view of the available recommendations, I forward


this thesis for debate by the Examining Committee.

Signature:
Name : Professor Dr. Ali Hussain Battor
Head of mathematics department,
College of education for Girls, University
of Kufa.

Date : / /2031
Linguistic Supervisor Certification

This is to certify that I have read the thesis entitled


"B-Spline Interpolation Method for Solving
Differential Equations " and corrected every
grammatical mistake I found therefore this thesis is
qualified for debate.

Signature:

Name :

Date : / / 2013
Scientific Supervisor Certification

This is to certify that I have read the thesis entitled


"B-Spline Interpolation Method for Solving
Differential Equations " and I found, this thesis is
qualified for debate.

Signature:

Name :

Date : / / 2013
Examining Committee Certification
We certify that we have read this thesis ''B-Spline
Interpolation Method for Solving Differential
Equations '' and as an Examining Committee, we
examined the student in its content, and that in our
opinion it meets all the requirements for the degree of
Master of Science in mathematics.

Signature :
Name : Ali Hassan Mohammed.
The Title : professor
Date : / / 2013.
Chairman

Signature :
Signature :
Name :Dr. Hayder Jabbar Abood
Name : Dr.Fadhel Subhi Fadhel
The Title : professor
The Title : Assistant Professor
Date : / / 2013
Date : / / 2013
Member
Member
Signature :
Name : Dr. Adil Mohamad Hassan Rizaq
The Title : Assistant professor.Dr.
Date : / / 2013.
Supervisor

Approved by the university committee on graduate studies.

Signature :
Name : Dr.Dhaferah Jaafar Abd Ali
The Title : Assistant professor
Dean of the College of Education for Girls .
University of Kufa .
Date: / / 2013
Abstract
The main objectives of the thesis are solution the differential
equation using B-spline method. In the thesis, the concept of B-spline
method is addressed and the B-spline basis functions and curves are
investigated. The analysis is made by solving Cox-de Boor equations and
plot results for the basis functions of different degrees and U-vector
configurations. De Boor algorithm is also employed in order to
accomplish this task. An idea emerged from this study and applied to
generate curve designs by manipulating control points.

The applications of B-spline include data interpolation and the


solving of boundary value problems. Data interpolation of curves and
surfaces by B-spline method are thoroughly investigated. B-spline
interpolation uses parameterisation methods. Some of the known methods
are explained by applying them to solve some examples. The results are
the values of the parameters and a U-vector. These are then used to
compute the corresponding basis functions by using Cox-de Boor
relationship.

B-spline collocation method is adopted to approximately solve


boundary value problems. Boundary value problems include second order
and fourth order differential equations with boundary conditions. And
solve the partial differential equations with the boundary conditions and
two initial conditions by B-spline, where they are to be in the form of a
specific metal plate between 0 and 1 on both axes.
Through the examples observed that we have found the amount of the
error of the B-spline is less than Finite Difference Method.
FDM Finite Difference Method
PDE Partial Differential Equations
ODE Ordinary Differential Equations
ti Knot Vector of U-direction
rj Knot Vector of W-direction
d The number of internal points in the knot vector
h The total number of knots in the knot vector in U-
direction
l The total number of knots in the knot vector in W-
direction
p Degree of B-spline in U-direction
q Degree of B-spline in W-direction
k Order of Basis Function
Bi Control points of curve
Bi,j Control points of surface
RMS Root Mean Square errors
fi The values of the solution of B-spline
gi The values of Exact solution
xi ,yj Cartesian coordinates
Ni,p Basis Function of B-spline in U-direction
Mj,q Basis Function of B-spline in W-direction
Contents

Introduction v

vii

Basic Concepts Of PDE's And Numerical


Chapter One 1
Solution By FDM's
Basic Concepts and Definition of Partial
1.1 1
Differential Equations

1.2 Finite Difference Method 4

1.2.1 Elliptic Equations 5

1.2.2 Hyperbolic Equations 10

B-Spline Curve Theory and Numerical Solution


Chapter Two 13
Of ODE's using B-spline method

2.1 B-spline Curve Theory 13

2.1.1 B-spline Background 13

2.1.2 B-spline curve 15

2.1.2.1 Knot vectors 15

2.1.2.2 Basis functions 16

2.1.2.3 Control points 20

Numerical Solution of ODE's using B-spline


2.2 21
method
Comparison between B-spline method and
2.3 29
FDM's of ODE's
Numerical Solution Of PDE's using B-Spline
Chapter Three 34
method
Solution of Partial Differential Equations using
3.1 34
B-spline method
Comparison between B-spline method and Finite
3.2 Difference Methods of Partial Differential 60
equations
The Program Of Basis Function Of B-Spline
By the porgram's "Visual Studio ". 66

Conclusion 68

Future Work 69

References 70

Summary in
75
Arabic
Introduction

Numerical techniques are used to solve the mathematical models in


engineering problems. Many of the mathematical models of engineering
problems are expressed in terms of PDE's. The most update technique for
solving PDE's is the FDM. This is extremely useful in solving
complicated problems with unusual geometrical shapes or boundaries. In
the FDM, a solution is derived at a finite number of points by
approximating the derivatives at each of them. The accuracy of this
method is based on the refinement level of the grid points where the
solution is being evaluated. In the last few years another numerical
technique has been increasingly used to solve mathematical models in
engineering research, the B-spline Collocation Method. A collocation
method involves satisfying a differential equation to some tolerance at a
finite number of points, called collocation points. The B-spline
Collocation Method has a few distinct advantages over the FDM's. The
advantage over the FDM is that the B-spline Collocation Method
provides a piecewise-continuous, closed form solution. B-spline
technique has applications at engineering problems. This technique has
been used in fluid flow problems with a great deal of success and more
recently, some research has been conducted using the technique on
computational aero acoustic [16] and biology problems. [13]
This thesis is organized as follows:

Chapter one contains two sections:

Section one is about the basic concepts of the numerical solution of


PDE.

Section two explains FDM for solving PDE's with some examples of
the Elliptic equations and Hyperbolic equations.

Chapter two contains three sections:

Section one which is entitled the concept of the B-spline curves


theory, representing as the background of one dimensional B-spline
method.

Section two concerning with the numerical solution of the ODE's


with boundary conditions by B-spline method.

Section three shows give a comparison between B-spline method


and FDM's for solving ODE's.

Chapter three contains two sections:

In section one, we solve the PDEs with boundary condition and two
initial conditions by B-spline method.

Section two includes the a comparison between B-spline method and


the FDM's of PDE's.
There are a numerous number of publications in the field of splines
and interpolations. Graphical curves and surfaces, in many different areas
of research and applications, are one of the many topics that received
much interest. Only will the most relevant publications be mentioned and
listed in this thesis.

A start to learn about the subject is an on-line set of lectures by


Professor C.-K. Shene, Introduction to Computing with Geometry Notes
[8]. A thorough analysis of basis functions and B-spline curves and
surfaces is given. The notes include reviews, theories, examples, and
references.

Timothy Irwin Mueller [30], (1986), did his PhD project on Geometric
Modelling with Multivariate B-splines. His thesis investigates the use of a
parametric box spline surface representation over a three direction grid to
define spline surfaces over three, four, five, and six-sided regions.

K-L Chung, et al [22], (1994), presented a fast algorithm for cubic B-


spline curve fitting based on the matrix perturbation technique.

R.W. Johnson, et al [28], (1999), discussed the potential of a B-spline


collocation method for numerically solving the equations of fluid
dynamics. It is known that B-splines can resolve complex curves with
drastically fewer data than can their standard shape function counterparts.
An example on channel flow problem was solved using their method.

Fredrik Anderson [10], (2003), did his MSc project on Bézier and B-
spline Technology. His project extended to both curves and surfaces with
many examples demonstrating the concepts.
Christopher K. Ingram [7], (2003), did his M.Sc. project on the
development and generalization of a geometric B-spline curves over the
triangular domain. The geometrical construction mimics the control point
blending that occurs with uniform B-Splines.

Burg, et al [9], (2003 ), represented the free surface about viscous hulls
by B-splines in conjunction with the generation of quality viscous grids.
The method used to approximate a surface is defined via the elevations of
the y-coordinates in a three dimensional unstructured surface mesh to a
B-Spline approximating surface.

C. Deng, et al [5], (2007), published their work on local fitting algorithm


for converting planar curves to B-splines. For a smooth planar curve a set
of points together with their tangent vectors are first sampled from the
curve such that the connected polygon approximates the curve with high
accuracy and inflexions are detected by the sampled data efficiently.

R. J. Cripps [27], (2007), developed an alternative method to surface


construction (NURBs) by specifying the curvature and constructs the
surface so that it satisfies the curvature constraints. A case study is
presented that illustrates the point-based approach.

J. Goh, et al [20], (2010), solved one-dimensional heat equation with a


nonlocal initial condition. Collocation based cubic B-spline and extended
cubic uniform B-spline methods were used. The stability of the method
was also analyzed.

F. Auricchio, et al [11], (2010), concentrated their work on isogeometric


collocation methods. Isogeometric analysis is a computational mechanics
technology based on functions used to represent geometry. Their idea is
to build a geometrical model and directly use the functions describing the
geometry in the analysis. It is an alternative method to the finite element
model that used in approximating the geometry.

V.Dabral et al [31], (2011), published their work on B-Spline finite


element method to solve one dimensional heat equations.

Y. Gupta, et al [33], (2011), recapitulated a numerical method based on


cubic B-spline to solve boundary value problems for a system of
singularly perturbed second order ordinary differential equations. The
method utilized the values of cubic B-spline and its derivatives at nodal
points together with the equations of the given system and boundary
conditions, ensuing into the linear matrix equation. They also
demonstrated the efficiency of the method and also confirmed how their
developed algorithm is better than existing numerical methods.

M. Dosti, A. Nazemi [25], (2011), proposed a numerical solution for the


one-dimensional hyperbolic telegraph equation by using septic B-spline
collocation method. Their scheme works in a similar fashion as finite
difference methods. The accuracy of the presented method was
demonstrated by giving two test problems. The numerical results were
found to be in good agreement with the exact solutions.

J. Goh, et al [20], (2012), obtained a numerical solutions of one-


dimensional heat and advection-diffusion equations by collocation
method based on cubic B-spline. Cubic B-spline is applied as
interpolation function. The numerical results were found to be in good
agreement with the exact solution.

N. Caglar, et al [26], (2012), solved second-order linear hyperbolic


equations by using B-spline method. The solution of damped wave
equation and that of telegraph equation were both discussed and
illustrated. Their numerical results revealed that the B-spline method is
very effective and approximates the exact solutions very well.

Al-Kafaji, shahad adil [1], (2012), Analysis of B-spline Method With


Applications. Review the subject of B-spline method to include: basis
functions, curves, interpolation, approximation, and applications. Suitable
applications of B-spline methods are to be included in the study.
Introduction
The differential equations are good techniques to describe most of
the engineering issues. It is clear evident in the description of the
processes of heat transfer, fluid flow, wave motion, electronic circuits in
addition to its uses in structural issues, and the mathematical description
of the chemical reactions. As the way differences ended, FDM's is the
most widely used and common to resolve the different versions of these
equations and therefore resorting to convert, each differential equation to
algebraic equation is applicable to a specific part of the field containing
the solution of differential equation. [17]
Many numerical methods are used for solutions of the PDE's. In this
chapter the concept of solutions of partial differential equations is studied
via the update method of finite differences. Many examples are discussed
for more clarity.

1.1.Basic Concepts and Definition of Partial Differential


Equations
A Partial Differential Equation (PDE) is an equation that involves an
unknown function of two or more independent variables and certain
partial derivatives of the unknown function.. In contrast to ODE's where
unknown function depends only on one variable, in PDE's the
unknown function depends on several variables, [12].
More precisely let U denote a function of the n ≥ 2 independent
variables x 1 , x 2 ,..., x n . Then the relation of the form :

f (x 1 , x 2 ,..., x n ,U ,U x 1 ,...,U x n ,U x 1 x 1 ,...,U x n x n )  0 (1.1.1)


where f is a function of its arguments is a partial differential equation.
The general linear second order PDE in one dependent variable U can be
written as
n n

A U
i , j 1
ij xi x j  B iU x i FU  G
i 1
, (1.1.2)

in which we assume Aij  A ji and Aij , B i , F and G are real valued

functions defined in some region of the space x 1 , x 2 ,..., x n . Here we shall


be concerned with second order PDE's in one dependent variable U and
two independent variables x and y hence equation (1.1.2) may be written
the form
AU xx  BU xt  CU tt  DU x  EU t  FU  G , (1.1.3)
where the coefficients A, B, C, D, E, F and G are functions of x and y in
some domain of the xy-plane,[2].
Also, equation (1.1.3) is homogeneous if the right side is equal to zero for
all x, t, otherwise it is non-homogeneous.
If the A, B, C, D, E, F are constants, then the equation is called with
constant coefficients, otherwise it is with variable coefficients. All linear
second order PDE's lies in one of the following types:

1-The Parabolic Equation:


It describes the entry into force of the heat (Heat Flow) and diffusion
processes (Diffusion Processes). The solution process needs to provide
primary requirement of one and two border crossings conditions which
verify the property B 2  4AC  0 , [35].
2- Elliptic Equation
It describes the phenomena of the situation without time (Steady State)
such as Laplace equation and Poisson equation. The solution process
needs to provide boundary conditions which verify the border check
property B 2  4AC  0 , [35].

3- Hyperbolic Equation
It describes the seismic movements and the movements of the wave.
We need to provide a solution process, as well as two initial conditions
and two boundary conditions to check the property B 2  4AC  0 , [35].
1.2. Finite Difference Method
FDM is for finding numerical solution of PDE's. It is the most
popular method for solving PDE's. The starting point is the conservation
equation in differential form. The given region or domain is divided into
a network of rectangles called grid. The points of intersection of these
lines are called grid points or mesh points. At each grid point, the
differential equation is approximated by replacing the partial derivatives
by their corresponding difference approximations. This results in
algebraic equations for each grid point, in which the variable value at that
point and a certain number of neighboring points appears as unknown. In
other words, by knowing value of that variable at a particular point can be
calculated. In principle, the FDM can be applied to any grid type.
However, in practice finite difference method is the best suitable for only
structured grids, [13].
When necessary, these methods are also used to obtain variable
values at locations other than grid point. On structured grids, the FDM is
very simple and effective. It is especially easy to obtain higher order
schemes on regular grids. The disadvantage of FDM is that the
conservation is not enforced unless special care is taken. Also, the
restriction to simple geometries is a significant disadvantage in complex
flow. The first step in obtaining a numerical solution using FDM is to
discretize the geometric solution (i.e. a numerical grid must variable
associated with it and must provide one algebraic equation).
The algebraic equation thus obtained is a relation between the
variable values at that point and at some of the neighboring points. It is
obtained by replacing each term of the PDE at the particular point by a
finite difference approximation. Also, the number of equations and
unknowns must be equal However, at boundary where variable values are
known, no equation is needed.
An introduction to techniques of this type is presented in this section:
1.2.1.Elliptic Equations [3]
The elliptic PDE that we consider is the Poisson equation
 2u  2u
( x , y )  (x , y )  f (x , y ) (1.2.1.1)
x 2 y 2

on R  {(x , y ) | a  x  b , g 1 (x )  y  g 2 (x )} , with u (x , y )  g (x , y ) for


(x , y )  S

Figure (1.2.1.1): The temperature within the region is determined by the


temperature distribution on the boundary of the region
where S denotes the boundary of R . If f and g are continuous on their
domains, then there is a unique solution to this equation. The method
used is an adaptation of the FDM for linear.

Figure (1.2.1.2):Partition the interval [a, b] and the interval [c, d]

Place a grid on the rectangle R by drawing vertical and horizontal lines


through the points with coordinates (x i , y j ) , where
x i  a  ih for each i  0,1, 2,..., n , and y j  c  jk for each j  0,1, 2,..., m

The lines x  x i and y  y j are grid lines, and their intersections are the
mesh points of the grid. For each mesh point in the interior of the grid,
(x i , y j ) ,for i  1, 2,..., n  1 and j  1, 2,..., m  1 , we use the Taylor series in

the variable x about x i to generate the centered-difference formula


 2u u (x i 1 , y j )  2u (x i , y j )  u (x i 1 , y j ) h 2  4u
(x i , y j )   (i , y j ) (1.2.1.2)
x 2 h2 12 x 4

where i  (x i 1 , x i 1 ) . We also use the Taylor series in the variable y


about y j to generate the centered-difference formula :

 2u u (x i , y j 1 )  2u (x i , y j )  u (x i , y j 1 ) k 2  4u
(x i , y j )   (x i , j ) (1.2.1.3)
y 2 k2 12 y 4
where  j  ( y j 1 , y j 1 )
By substituting these formulas in equation (1.2.1.1) allows us to
express the Poisson equation at the point, (x i , y j ) as

u (x i 1 , y j )  2 u (x i , y j )  u (x i 1 , y j ) u (x i , y j 1 )  2 u (x i , y j )  u (x i , y j 1 )

h2 k2
h 2  4u k 2  4u
 f (x i , y j )  ( , y )  ( x i , j ) (1.2.1.4)
12 x 4 12 y 4
i j

for each i  1, 2,..., n 1 and j  1, 2,..., m 1 , and the boundary conditions


as:
u (x 0 , y j )  g (x 0 , y j ) and u (x n , y j )  g (x n , y j ) for each j  0,1, 2,..., m

u (x i , y 0 )  g (x i , y 0 ) and u (x i , y m )  g (x i , y m ) for each i  0,1, 2,..., n

In difference equation form, this results in the FDM,


h2 h
2 [( 2
)  1] w i , j  (w i 1, j w i 1, j )  ( )2 (w i , j 1 w i , j 1 )  h 2f (x i , y j ) (1.2.1.5)
k k
for each i  1, 2,..., n 1 and j  1, 2,..., m 1 , and
w 0, j  g (x 0 , y j ) and w n , j  g (x n , y j ) for each j  0,1, 2,..., m
and w i ,m  g (x i , y m ) for each i  1, 2,..., n  1 , w i ,0  g (x i , y 0 )

where w i , j approximates u (x i , y j )

The typical equation in (1.2.1.5) involves approximates to u (x , y ) at the


points.
(x i 1 , y j ) , (x i , y j ) , (x i 1 , y j ) , (x i , y j 1 ) and (x i , y j 1 )
This produces an (n 1)(m 1)  (n 1)(m 1) linear system with the
unknowns being the approximations w i , j to u (x i , y j ) at the interior mesh
points. The linear system involving these unknowns is expressed for
matrix calculations more efficiently if a relabeling of the interior mesh
points is introduced. A recommended labeling of these points is to let
p l  (x i , y j ) and w l  w i , j where l  i  (m 1  j )(n 1) , for each
i  1,2,3,..., n 1 and j  1,2,3,...m 1 .

Example (1.2.1.1) [3]: Determine the steady-state heat distribution in a


thin square metal plate with dimensions 0.5m by 0.5 m using n = m = 4.
Two adjacent boundaries are held at 00 C and the heat on the other
boundaries 0.5 heat on the other boundaries increases linearly from 0°C
at one corner to 100°C where the sides meet.
Solution :- If we place the sides with the zero boundary conditions along
the x-axes and y-axes, the problem is expressed as
 2u  2u
( x , t )  (x , t )  0
t 2 t 2

for (x , y ) in the set R  {(x ,t ) | 0  x  0.5 , 0  t  0.5}, with the boundary


conditions u (0,t )  0, u (x ,0)  0, u (x ,0.5)  200x , u (0.5, t )  200t

If n  m  4 , the problem has the grid given in figure (1.2.3.1), and the
difference equation (1.2.1.5) is 4w i , j  w i 1, j  w i 1, j  w i , j 1  w i , j 1  0

for each i  1, 2,3 and j  1, 2,3 .


Figure (1.2.1.3): The heat distribution in a thin square metal plate with
dimensions 1 m by 1 m
Expressing this in terms of the relabeled interior grid points wi = u(Pi)
implies that the equations at the points Pi are:
P1 : 4w 1  w 2  w 4  w 0,3  w 1,4
P2 : 4w 2  w 3  w 1  w 5  w 2,4
P3 : 4w 3  w 2  w 6  w 4,3  w 3,4
P4 : 4w 4  w 5  w 1  w 7  w 0,2
P5 : 4w 5  w 6  w 4  w 2  w 8  0
P6 : 4w 6  w 5  w 3  w 9  w 4,2
P7 : 4w 7  w 8  w 4  w 0,1  w 1,0
P8 : 4w 8  w 9  w 7  w 5  w 2,0
P9 : 4w 9  w 8  w 6  w 3,0  w 4,1

where the right sides of the equations are obtained from the boundary
conditions. In fact, the boundary conditions imply that
w 1,0  w 2,0  w 3,0  w 0,1  w 0,2  w 0,3  0,
w 1,4  w 4,1  25, w 2,4  w 4,2  50, w 3,4  w 4,3  75,

So the linear system associated with this problem has the form
 4 1 0 1 0 0 0 0  w 1   25 
0
 1 4 1 0
 1 0 0 0 0  w 2   50 
 0 1 4 0 0 1 0 0 0  w 3  150 
    
 1 0 0 4 1 0 1 0 0  w 4   0 
 0 1 0 1 4 1 0 1 0  w 5    0 
    
 0 0 1 0 1 4 0 0 1 w 6   50 
 0 0 0 1 0 0 4 1 0  w 7   0 
    
0 0 0 0 1 0 1 4 1 w 8   0 
 0 0 0 0
 0 1 0 1 4  w 9   25 

The values of w 1 ,w 2 ,...,w 9 , found by applying the Gauss Seidel


method to this matrix, are given in Table (1.2.1.1)
Table (1.2.1.1): The values of FDM
i 1 2 3 4 5 6 7 8 9
wi 18.75 37.50 56.25 12.50 25 37.5 6.25 12.5 18.75

Example (1.2.1.2):[2]
To find the numerical solution to the steady state heat flow equation
U xx U tt  0 0x 2 , 0 y 2

with the initial and boundary conditions


U (x , 0)  300 , U (x , 2)  100 , 0x 2
U (0, y )  200 , U (2, y )  200 , 0 y 2
using h = k = 0.5

Figure (1.2.1.4): Numbering system for internal grid points


To set up the linear system, the nine interior grid points are labeled row
by row from w 1 ,w 2 ,...,w 9 starting from the left-top corner point as
shown in figure (1.2.1.2).
Table (1.2.1.2): The values of FDM
i 1 2 3 4 5 6 7 8 9
wi 166.271 164.286 191.071 200 200 2000 233.929 235.714 228.923

1.2.2. Hyperbolic Equations


The numerical solution to the wave equation is an example of a
hyperbolic partial differential equation. The wave equation is given by
the differential equation [3]

 2u 2  u
2
(x , t )   (x , t )  0, 0  x  l, t 0 (1.2.2.1)
t 2 x 2
subject to the conditions
u (0, t )  u (l , t )  0, for t 0
u
u (x ,0)  f (x ), and (x ,0)  g (x ), for 0x l
t
where α is a constant dependent on the physical conditions of the
problem. Select an integer m > 0 to define the x-axis grid points using
h = l/m. In addition, select a time-step size k > 0. The mesh points (xi ,tj )
are defined by xi = i h and tj = j k for each i = 0, 1, ... ,m and j = 0,1,…,n
At any interior mesh point (xi , tj ), the wave equation becomes
 2u 2  u
2
(x i , t j )   (x i , t j )  0 (1.2.2.2)
t 2 x 2
which leads to the difference equation
w i , j 1  2 w i , j w i , j 1 w i 1, j  2 w i , j w i 1, j
 2 0 (1.2.2.3)
k2 h2
k
Define   . Then we can write the difference equation as
h
w i , j 1  2 w i , j w i , j 1   2w i 1, j  2 2w i , j   2w i 1, j  0

and solve for wi,j+1, the most advanced time-step approximation, to obtain
w i , j 1  2(1   2 )w i , j   2 (w i 1, j w i 1, j ) w i , j 1 (1.2.2.4)

Example (1.2.2.1):[3] To find the numerical solution to the hyperbolic


problem
 2u  2u
( x , t )  4 (x , t )  0
t 2 x 2

with boundary conditions u (0,t )  u (1,t )  0, for t 0


and initial conditions
u
u (x ,0)  sin( x ), 0  x  1, and (x ,0)  0, 0  x 1
t
using h = 0.1 and k = 0.05. Compare the results with the exact solution
u (x ,t )  sin( x ) cos(2t )

solution: Choosing h = 0.1 and k = 0.05 gives λ = 1, m = 10, and n =20.


The results are shown in Table (1.3.3) and are correct to the places given.
Table (1.2.2.1):The value of FDM

xi wi.20

0 0

0.1 2.3292169944

0.2 2.5877852523

0.3 2.8292169944

0.4 2.9512565163

0.5 1

0.6 2.9512565163

0.7 2.8292169944

0.8 2.5877852523

0.9 2.3292169944

1 2
Introduction
The famous numerical method of spline has unique polynomials
between each two points. So the main polynomial of spline is the union of
these sub polynomials. Spline polynomial deals with usual basis.
The basis B-spline method is determined by knot vector with respect to
De Boor algorithm. A set of points called control plays a fantastic role for
finding main polynomial belong to the same data.
This chapter consists of three sections. Section one includes the basis
background of B-spline curves, the basis function of B-spline, knot
vectors and control points. Section two gives the numerical solution of
ODE's using B-spline. Section three gives the comparison between the
FDM and B-spline method for solving ODE's.

2.1. B-spline Curve Theory


2.1.1. B-spline Background [24]
A spline is a continuous piecewise curve use to calculate a solution of
a mathematical problem. A spline curve is dependent upon a relationship
between the basis function and the vertices of a defining polygon. The B-
spline curve has its own type of basis function, known as the B-spline
basis, to establish the relationship with the defining polygon.
C(t)isdefinedbytheequation
n
C (t )   B i N i , p (t ) , (2.1.1.1)
i 0
where B i the position vectors of C defining polygon vertices, n is the

number of control points and N i , p (t ) are the normalized basis functions.


The order k of the basis function results in a polynomial of degree p,
where p  k  1.One property of the B-spline curve is that it must lie
entirely within the convex hull of the defining polygon, as shown in
Figure (2.1.1.1).

Figure (2.1.1.1):B-spline function and defining polygon


Other types of splines are used in the mathematical and engineering
fields. Another popular type of spline, the Bezier spline, uses the
Bernstein basis function to establish the relationship. However, the B-
spline basis function has a few advantages over the Bernstein basis
function. One advantage is that the order k of the basis function can be
reduced resulting in a curve with a lower degree k - 1, without affecting
the approximations accuracy. This can be accomplished by changing the
number of vertices in the defining polygon with the addition of
intermediate points to the knot vector. Another advantage is that the B-
spline curves behave in a non-global manner, with each vertex, B i ,
associated to a unique basis function. This means that each vertex affects
only the shape of the curve over a range of values where the basis
function has a value greater than zero. That behavior is helpful when a
local refinement to the function is necessary.
2.1.2. B-spline Curve
In order to calculate B-spline curves three things are required
2.1.2.1. Knot vectors
The selection of the knot vectors is very important to the creation of
the B-spline. Their selection determines the order of the resulting
polynomial and the size of intervals that each B-spline basis function
represents, [4].
In addition, the smoothness of the curve is determined by the choice
of the knot vectors. The knot vectors chosen must provide sufficient
resolution to approximate the solution of the mathematical problem. In
this thesis, the open-uniform knot vectors are used exclusively to
calculate B-spline curves and basis functions. The number of control
points and basis functions when the open-uniform knot vector is used is
equal to (k+d), where k is the order and d is the number of internal points
in the knot vector, [18].
When there are no internal knot points, the B-spline basis reduces to
the Bernstein basis, rendering the smoothest curve. In this special case,
the resulting B-spline curve is a Bezier curve. For an open curve, they are
given by:
0 , j  p  1

tj j  p , p 1  j  n (2.1.2.1)
n  p  1 , j  n

Where 0  j  n  p  1 and the range of t is : 0  t  n  p  1 .


Some examples with the corresponding order k and number of internal
points in the knot vector d are:
[0 0 0 1 1 1] k=3 ,d=0 , h=6
[0 0 0 0 1/2 1 1 1 1] k=4, d=1 , h=9
[0 0 0 0 1/3 2/3 1 1 1 1] k=4, d=2 , h = 10
[6(0) 1/4 1/2 3/4 6(1)] k=6, d=3 , h = 15
2.1.2.2. Basis Functions
Once the knot vector has been selected, the B-spline basis function
can be calculated. The B-spline basis function N i , p (t ) is defined by a
recursive relationship that is known as the Cox-De Boor recursion
formula, [4].
If p  0
1 if t i  t  t i 1
N i ,0 (t )   (2.1.2.2)
0 otherwise

If p  0
t ti t i  p 1  t
N i , p (t )  N i , p 1 (t )  N i 1, p 1 (t ) (2.1.2.3)
ti p ti t i  p 1  t i 1
where

1- N i ,p  1 for t i  t  t i  p

2- N i ,p  0 for t0  t  ti , t i  p  t  t i n ,
n

3- N
i 0
i ,p 1 t  [t p 1 , t n 1 ] Normalizing property

The values of t i are elements of the predetermined knot vector that


satisfies the relationship t i  t i 1 . The basis functions and the knot

vector are defined in terms of the parameter t, which is a coordinate in


parametric space and may or may not coincide with any of the Cartesian

coordinates. The parameter t will vary from t min to t max along the B-
spline curve. Also during calculations, the convention of 0/0 = 0 (by
definition) must be adopted for the recursion to work. Their calculation
is completely driven by the predetermined knot vector.
Table (2.1.2.1) : B-Spline Basis Function
U = [0 0 0 1 1 1]
N 0,2  (1  t ) 2
N 1,2  2t  2t 2
N 2,2  t 2

U = [4(0) 1/2 4(1)]

0  t  1/ 2 1/ 2  t  1
N 0,3  0
N 0,3  (1  2t )3
N 1,3  2(t  1)3
N 1,3  2t (7t 2  9t  3)
N 2,3  2(t  1) 2 (4t  1)
N 2,3  2t 2
(3  4t )
N 3,3  14t 3  24t 2  12t  2
N 3,3  2t 3 N 4,3  (2t  1)3

U = [5(0) 5(1)]
N 0,4  (1  t ) 4
N 1,4  4t (1  t )3
N 2,4  6t 2 (1  t ) 2
N 3,4  4t 3 (1  t )
N 4,4  t 4

U = [7(0) 7(1)]
N 0,6  (1  t ) 6
N 1,6  3t (1  t ) 5
N 2,6  12t 2 (1  t ) 4
N 3,6  20t 3 (1  t )3
N 4,6  15t 4 (1  t ) 2
N 5,6  6t 5 (1  t )
N 6,6 t6

U = [ 8(0) 1/2 8(1) ]


1
0 t 
2
N 0,7  (1  2t ) 7
N 1,7  254t 7  882t 6  1302t 5  1050t 4  490t 3  126t 2  14t
N 2,7  240t 7  798t 6  1092t 5  770t 4  280t 3  42t 2
N 3,7  198t 7  588t 6  672t 5  350t 4  70t 3
N 4,7  128t 7  308t 6  252t 5  70t 4
N 5,7  58t 7  98t 6  42t 5
N 6,7  16t 7  14t 6
N 7,7  2t 7

1
t 1
2
N 0,7  0
N 1,7  2(1  t ) 7
N 2,7  16t 7  98t 6  252t 5  350t 4  280t 3  126t 2  28t  2
N 3,7  58t 7  308t 6  672t 5  770t 4  490t 3  168t 2  28t  2
N 4,7  128t 7  588t 6  1092t 5  1050t 4  560t 3  168t 2  28t  2
N 5,7  198t 7  798t 6  1302t 5  1120t 4  560t 3  168t 2  28t  2
N 6,7  240t 7  882t 6  1344t 5  1120t 4  560t 3  168t 2  28t  2
N 7,7  254t 7  896t 6  1344t 5  1120t 4  560t 3  168t 2  28t  2
N 8,7  (2t  1) 7
Figure(2.1.2.1) The Basis Functions for the Interval Figure(2.1.2.2) The Basis Functions for the Interval

0  t 1 U = [3(0) 3(1)] 0  t 1 U = [4(0) 1/2 4(1)]

Figure(2.1.2.4) The Basis Functions for the Interval Figure(2.1.2.3) The Basis Functions for the Interval

0  t 1 U = [7(0) 7(1)] 0  t 1 U = [5(0) 5(1)]

Figure(2.1.2.5) The Basis Functions for the Interval 0  t 1 U = [8(0) 1/2 8(1)]

2.1.2.3. Control Points


Once the knot vectors and basis functions have been determined, the
last remaining element needed to create the B-spline curve is the position

vector, B i .The coordinates that make up these vectors are referred to as


control points and they locate the vertices of the defining polygon. The
control points are selected in order to yield an accurate approximation to
the desired curve.
In summary to design a B-spline curve we need a set of control points,
a set of knots and a set of coefficients, one for each control point, so that
all curve segments are joined together satisfying certain continuity
condition.

Figure (2.1.2.6): Designing of B-spline curve

2.2. Numerical Solution of ODE's using B-spline method


The B-spline collocation method involves the determination of knot
vectors and control points such that the differential equation, or boundary
value problem, is satisfied to some tolerance at a finite set of collocation
points. These collocation points reside on the Cartesian abscissa axis.
In this chapter, a nodal type, called the Greville Abscissa approach
[14,15], has been adopted and the collocation points are located at the
Greville Abscissa points along the Cartesian abscissa axis.
Other methods are also available in the literature which will not be
considered here. Once the collocation method has been selected, the
solution is achieved by following procedure steps: [1]
1. Select the appropriate knot vector.
2. Calculate all required basis functions using equations (2.1.2.2) and
(2.1.2.3).
3. Calculate abscissa coordinates for the required control points, using the
Greville Abscissa equation
1
xi  (t i  t i 1  ...  t i  p 1 ) (2.2.1)
p
for i  0,1, 2,..., h  p ,
where p is the degree of the basis functions, and h is the total number of
knots in the knot vector.
4. Calculate the B-spline curve equation and the required B-spline curve
derivatives.

5. Use the boundary conditions to solve for end ordinate values of control
points.
6. Substitute B-spline curves and the derivatives into the differential
equation or boundary value problem.
7. Calculate the remaining interior ordinates of the control points by
evaluating the differential equation at the corresponding abscissa of the
collocation points.
The Root Mean Square Error is a technique used :
N
1
RMS 
N
 (f
i 1
i  g i )2 (2.2.2)
where f i is the approximation solution of B-spline and g i the exact
solution.
A reasonable baseline value for a successful approximation has been set
at RMS ≥ .
Example (1.3.1) :[1] solve y   5 y   36 y  0 (2.2.3)

where 0  t  1 with boundary condition y (0)  0 , y (1)  1 and the


exact solution is
119t
e 5 / 2 (sin( ))
y (t )  2
119
e 5t / 2 (sin( ))
2
Solution(1):
The knot vector U = [0 0 0 0 1/2 1 1 1 1]
Table (2.2.1): The Basis Functions in 0  t  1

0  t  1/ 2 1/ 2  t  1
N 0,3  0
N 0,3  (1  2t )3
N 1,3  2(t  1)3
N 1,3  2t (7t  9t  3)
2

N 2,3  2(t  1) 2 (4t  1)


N 2,3  2t (3  4t )
2
N 3,3  14t 3  24t 2  12t  2
N 3,3  2t 3
N 4,3  (2t  1)3

The basis functions are:


Figure (2.2.1): The Basis Functions for the
Interval 0  t  1

The abscissa coordinates for the control points are:


1
x 1  ( )(0  0  0)  0
3
1 1 1
x 2  ( )(0  0  ) 
3 2 6
1 1 1
x 3  ( )(0   1) 
3 2 2
1 1 5
x 4  ( )(  1  1) 
3 2 6
1
x 5  ( )(1  1  1)  1
3

Calculate the B-spline curve equations and the required B-spline curve
derivatives.
1
For the first interval 0 t 
2
3
y (t )   B i N i , p
i 0
3
y (t )   B i N i, p
i 0
3
y (t )   B i N i, p
i 0

y (t )  B 0 N 0,3  B1N 1,3  B 2N 2,3  B 3N 3,3

y (t )  B 0 N 0,3
  B1N 1,3
  B 2 N 2,3
  B 3N 3,3

y (t )  B 0 N 0,3
  B1N 1,3
  B 2 N 2,3
  B 3N 3,3


Hence
y (t )  B 0 (1  2t )3  B1[2t (7t 2  9t  3)]  B 2[2t 2 (3  4t )]  B 3[2t 3 ]
y (t )  (42B1  24B 0  24B 2  6B 3 ) t 2  (24B 0  36B1  12B 2 ) t  6B1  6B 0
y (t )  (84B1  48B 0  48B 2  12B 3 ) t  24B 0  36B1  12B 2
1
For the second interval: t 1
2

y (t )  B1N 1,3  B 2 N 2,3  B 3N 3,3  B 4 N 4,3


y (t )  B1N 1,3
  B 2 N 2,3
  B 3N 3,3
  B 4 N 4,3

y (t )  B1N 1,3


  B 2 N 2,3
  B 3N 3,3
  B 4N 4,3


and hence
y (t )  B 1[2(1  2t )3 ]  B 2 [2(t  1) 2 (4t  1)]
 B 3 [14t 3  24t 2  12t  2)]  B 4 [(2t  1)3 ]
y (t )  (24B 2  6B1  42B 3  24B 4 ) t 2  (12B1  36B 2  48B 3  24B 4 ) t
12B 2  6B1  12B 3  6B 4
y (t )  (12B1  12B 2  12B 3  12B 4 ) t  12B1  12B 2  12B 3  12B 4
By applying the boundary conditions to Equation (2.2.3)
y (0)  0 gives B0  0  y 0
y (1)  1 gives B4 1  y 5

Substitute the values of B 0 and B 4 in the differential equation and


solve at the internal ordinate coordinates:
1 1
At t  x 2  use the equation for 0  t 
6 2

(288B 0  504B1  288B 2  72B 3 ) t 3  (312B 0  438B1  96B 2  30B 3 ) t 2


(144B 0  120B1  12B 2  12B 3 ) t  30B 0  6B1  12B 2
The remaining internal ordinate coordinate is then calculated to be:
B1  y 2  12.734
1
At t  x 3  the equation for either range will do since the function or its
2
derivatives are continuous.
(72B1  228B 2  504B 3  288B 4 ) t 3  (186B1  528B 2  654B 3  312B 4 ) t 2
(168B1  300B 2  276B 3  144B 4 ) t  54B1  48B 2  60B 3  30B 4

B 2  y 3  2.7344
5 1
At t  x 4  use the equation for t 1
6 2

(72B1  228B 2  504B 3  288B 4 ) t 3  (186B1  528B 2  654B 3  312B 4 ) t 2


(168B1  300B 2  276B 3  144B 4 ) t  54B1  48B 2  60B 3  30B 4
B3  y 4  3.5156

Now that all of the coordinates for the control points have been
calculated, we can be substituted into the B-spline curve equation:
1
For the first interval 0  t 
2
y (t )  12.7344*[2t (7t 2  9t  3)]  2.7344*[2t 2 (3  4t )]  3.5156*[2t 3 ]
1
For the second interval: t 1
2

y (t )  12.7344 *[ 2(1  2t )3 ]  2.7344 *[2(t  1) 2 (4t  1)]


3.5156 *[ 14t 3  24t 2  12t  2)]  [(2t  1)3 ]
Plot results (Figure (2.2.2)) along with the exact solution and
compute the RMS.

Figure (2.2.2): Exact vs Approximate Solution at U = [0(4) ½ 1(4)]

Table (2.2.2): The collocation points for Example (2.2.1)


X y Approximation solution Exact
0 0.00 0.00 0.00
1/6 -12.734 -6.81 -8.59
1/2 2.7344 -0.94 -1.91
5/6 3.5156 2.52 2.03 RMS
1 1 1 1 1.2041
Solution(2.2.2):
1. The knot vector U = [0 (8) 1/2 1 (8)].
2. By following the same procedure in the above example, the
function y (t ) is computed for all ranges. The basis functions are
shown in Figure (2.2.3).

Figure(2.2.3): Basis Functions: U = [0(8) ½ 1(8)]


The comparison between the exact and approximate solutions are given in
Figure (2.2.4).

Figure (2.2.4): Exact vs Approximate Solution at U = [0(8) ½ 1(8)]


Table (2.2.3): The collocation points for Example (2.2.1)
Approximation
X y Exact
solution
2 2 2 2
0.07 -6.4259 -5.25 -5.25
0.21 -14.055 -8.91 -8.90
0.36 -8.0347 -6.29 -6.29
0.5 1.3504 -1.91 -1.91
0.64 2.9764 1.18 1.18
0.79 2.6800 2.11 2.11
0.93 1.5232 1.52 1.52 RMS
1 1 1 1 0.038

This last experiment concludes that a higher degree B-spline basis


functions gives best approximation and longer computation time.

Example(2.3.2) : To solve y   4 y  0 for 0  t 1

With boundary condition y (0)  0 and y (1)  1


which gives the following exact solution:
sin(2t )
y (t ) 
sin(2)
Solution:
The knot vector U = [ 9(0) 9(1)]
The solution results are depicted, along with the exact solution, in
Figure (2.2.5).

Table (2.2.4): The collocation points for Example (2.2.2)


x y Approximation Exact
0 0 0 0
0.125 0.2749 0.2721 0.2725
0.25 0.5499 0.5272 0.5272
0.375 0.7986 0.7496 0.7496
0.5 0.995 0.9254 0.9254
0.625 1.1181 1.0436 1.0436
0.75 1.1574 1.0970 1.0970
0.875 1.1144 1.0821 1.0821 RMS
1 1 1 1 1.4142*10 -4
Figure (2.2.5): Exact vs Approximate Solution at U=[9(0) 9(1)]

2.3.Comparison between B-spline method and FDM's of


ODE's
In this section, the comparison is held between the FDM's and B-
spline method for solving ODE's.The root mean square in B-spline that is
less of than the FDM's. The FDM is commonly used to solve ordinary
differential equations that have conditions imposed on the boundary
rather than at the initial point. The equations take the following form,
[32].

y   f (x , y , y )
y   g (x , y ) a  x b (2.3.1)
with boundary conditions y (a)  y a , y (b )  y b
dy d 2y
The approximation of the derivatives and at a node points
dx dx 2

by the central divided difference approximation


dy 1
 ( y i 1  y i ) (2.3.2)
dx h
2
d y 1
2
 2 ( y i 1  2 y i  y i 1 ) (2.3.3)
dx h
Where h  x i  x i 1
h is the discretization step size
Example (2.3.1): [1] To solve y   5 y   36 y  0 where 0  t 1

with boundary condition y (0)  0 y (1)  1 and the exact solution is

119t
e 5 / 2 (sin( ))
y  2
119
e 5t / 2 (sin( ))
2
Solution: (n = 10)
From the boundary condition at x = 0 , we obtain
n= 1: at x = 0, y1 = 0
n= 10: at x =1, y10 = 1

1 2 8
x2  , x 3  ,..., x 9 
9 9 9
For the rest of the nodes, the following FDM will be applied:
81y i 1  171y i  126 y i 1  0

yielding the following linear system in matrix form


1 0 0 0 0 0 0 0 0 0   y 1  0 
81 171 126
 0 0 0 0 0 0 0   y 2  0 
0 81 171 126 0 0 0 0 0 0   y 3  0 
    
0 0 81 171 126 0 0 0 0 0   y 4  0 
0 0 0 81 171 126 0 0 0 0   y 5  0 
     
0 0 0 0 81 171 126 0 0 0   y 6  0 
0 0 0 0 0 81 171 126 0 0   y 7  0 
    
0 0 0 0 0 0 81 171 126 0   y 8  0 
0 0 0 0 0 0 0 81 171 126   y 9  0 
    
 0 0 0 0 0 0 0 0 0 1   y 10  1 
and solving this linear system will give the resulte presented in table
(2.3.1)
Table (2.3.1): The values of FDM in example (2.3.1)

i 1 2 3 4 5 6 7 8 9 10

yi 0 -3.3121 -4.4950 -3.9712 -2.4998 -0.8397 0.4675 1.1742 1.2930 1

The RMS = 2.9697 but in the B-spline the RMS = 0.038 .


Al-Khafaji's [1], used the FDM with n = 1000 and solve this problem
with very small error,as it's shown in figure (2.3.1).
Finite Difference Solution at: 1000 nodes
4
finite difference solution
exact solution
2

-2
y

-4

-6

-8

-10
0 0.2 0.4 0.6 0.8 1
x

Figure (2.3.1) : solution of example (2.3.1) using the FDM with n=1000

Finite Difference Solution at: 1000 nodes


4
finite difference solution
exact solution
2

-2
y

-4

-6

-8

-10
0 0.2 0.4 0.6 0.8 1
x

Figure (2.3.2) FDM vs Exact Figure (2.3.3): B-spline vs Exact


solutions at n=1000 Solutions at U = [0(8) ½ 1(8)]

Example (2.3.2): To solve y   4 y  0 for 0  t 1

With boundary condition y (0)  0 and y (1)  1


which have the following exact solution:
sin(2t )
y (t ) 
sin(2)
Solution: for n=4
1 2
x1  0 , x 2  , x 3  , x 4 1
3 3
y   4 y  0
1 1
2
( y i 1  2 y i  y i 1 )  4 ( ( y i 1  y i ))  0
h h
9 y i 1  14 y i  9 y i 1  0

1 0 0 0   y 1  0
9 14 9
 0   y 2  0 

0 9 14 9   y 3  0 
    
0 0 0 1   y 4  1 

Table (2.3.2): The values of FDM in example (2.3.2)


i 1 2 3 4
yi 0 0.7043 1.0957 1

The RMS = 0.0181 but in the B-spline the RMS = 8.3317*10-4.


If n=10
n= 1: at x = 0, y1 = 0
n= 10: at x =1, y10 = 1
1 2 8
x2  , x3  ,... , x 9 
9 9 9
y   4 y  0
1 1
2
( y i 1  2 y i  y i 1 )  4( ( y i 1  y i ))  0
h h
81y i 1  158 y i  81y i 1  0
Table (2.3.2): solution of example (2.3.3) using the FDM.
i 1 2 3 4 5 6 7 8 9 10
yi 0 0.2433 0.4747 0.6825 0.8567 0.9886 1.0716 1.1018 1.0775 1
The RMS = 0.0020 but in the B-spline the RMS = 1.4142*10-4.

Figure (2.3.4) the exact and Figure (2.3.5) the exact and
numerical solutions of example numerical solutions of example
(2.3.2) using the FDM (2.3.2) using the B-spline method

CONCLUSIONS :
The B-spline method was further verified by comparing it with the
numerical Finite Difference Method. The targeted RMS ≥ was not
easily achievable by FDM despite the large number of nodes used (up to
1000 nodes) in the case of the example (2.3.1) and in example (2.3.2).
Another proof
to the superiority of the B-spline method.
Introduction
This chapter is connected with the solution of partial differential
equations PDE's using 2-dimensional B-spline method. Many examples
are examined to clarify the method.
For efficiency of the B-spline method, comparison with the FDM's is
made. The error found for the in B-spline is less than that in FDM.

3.1. Solution of Partial Differential Equations using B-spline


method
The two dimensional B-spline collocation method involves the
determination of knot vectors in two directions and control points such
that the differential equation is satisfied to some tolerance at a finite set of
collocation points along both axis. These collocation points will reside
on the Cartesian abscissa and ordinate axes. For this thesis, the
collocation points have been selected to be located at the Greville
Abscissa point along the abscissa and ordinate axis. In order to
approximate the solution of two dimensional problems, a few B-spline
curve components need to be made multi-directional involving the
concepts of directional parameters, knot vectors, basis functions and
derivatives.
The formula of two dimensional B-spline (surface) is represented as:
n m
S (t , r )   B i , j N i , p (t )M j ,q (r ) (3.1.1)
i 0 j 0

The multiple directions required to approximate a two dimensional


solution requires multiple basis functions. The Cox-de Boor recursion
formulas defining the basis functions for the B-spline surface become
U  [t 0 , t1 ,..., t h ] and W  [r0 , r1,..., rl ]
in the U-direction
If p  0
1 if t i  t  t i 1
N i ,0 (t )   (3.1.2)
0 otherwise

If p  0
t ti t i  p 1  t
N i , p (t )  N i , p 1 (t )  N i 1, p 1 (t ) (3.1.3)
ti p ti t i  p 1  t i 1
and in the W-direction
If q  0
1 if r j  r  r j 1
M j ,0 ( r )   (3.1.4)
0 otherwise

If q  0
r  rj rj q 1  r
M j ,q (r )  M j ,q 1 (r )  M j 1,q 1 (r ) (3.1.5)
r j q  r j rj q 1  ri 1

where

1- N i , p (t )M j ,q (r )  0 for all i , j , p , q , t , r
n m

2-  N
i 0 j 0
i ,p (t )M j ,q (r )  1 for all (t , r ) [0,1]  [0,1]

Finally, similar to B-spline curves, the derivatives of the B-spline


surfaces must be evaluated and substituted for the equivalent order
derivatives in the differential equation. For instance, the first derivative of
the B-spline surface with respect to t is:
n m
S t (t , r )   B i , j N i, p (t )M j ,q (r ) (3.1.6)
i 0 j 0

To illustrate the process, the first derivative with respect to t for p = 2


and q = 2 basis function will be summed. Once all of the terms are
accounted for, the derivative with respect to t will become:
 (t )[B 0,0 M 0,2 (r )  B 0,1M 1,2 (r )  B 0,2 M 2,2 (r )]
S t (t , r )  N 0,2
 (t )[B 1,0 M 0,2 (r )  B 1,1M 1,2 (r )  B 1,2 M 2,2 (r )]
 N 1,2
 (t )[B 2,0 M 0,2 (r )  B 2,1M 1,2 (r )  B 2,2 M 2,2 (r )]
 N 2,2

Similarly, the first derivative of the B-spline surface with respect to the
parameter r is:
n m
S r (t , r )   B i , j N i , p (t )M j ,q (r ) (3.1.7)
i 0 j 0

If the calculation of the first derivative with respect to both parameters


t and r is necessary, the differentiation results are
n m
S t r (t , r )   B i , j N i, p (t )M j ,q (r ) (3.1.8)
i 0 j 0

For higher order problems, the second derivatives can be calculated to


show that the derivatives with respect to t and r respectively are
n m
S tt (t , r )   B i , j N i, p (t )M j ,q (r ) (3.1.9)
i 0 j 0
n m
S rr (t , r )   B i , j N i , p (t )M j ,q (r ) (3.1.10)
i 0 j 0

The application of B-spline surface collocation method towards


solving a boundary value problem or differential equation has a few very
distinct steps. They are
1. Select the appropriate knot vectors for each direction.
2. Calculate all required basis functions, using equation (3.1.2), (3.1.3),
(3.1.4) and (3.1.5).
3. Calculate abscissa and ordinate coordinates for the required control
points,
1
xi  (t i  t i 1  ...  t i  p 1 ) (3.1.11)
p
for i  0,1, 2,..., h  p
1
y j  (r j  r j 1  ...  r j q 1 ) (3.1.12)
q
for j  0,1, 2,..., l  q
4. Calculate the B-spline surface equations and the required B-spline
surface derivatives.
5. If necessary, use the boundary conditions to solve for boundary
applied, or z coordinate values of the control points.
6. Substitute the B-spline surfaces and the derivatives into differential
equation or boundary value problem.
7. Calculate the remaining interior applied coordinates of the control
points by evaluation of the differential equation at the corresponding
abscissa and ordinates of the collocation points.
In order to quantify the approximation results, the error has been
calculated at each collocation point using the relative error formula:
N
1
RMS 
N
 (f
i 1
i  g i )2 , (3.1.13)

where fi is the values solution of B-spline and gi the values of exact


solution.
 2T  2T
Example (3.1.1 ):  2  (x 2  y 2 ) e xy where T is the temperature
x 2
y
change in the indicated direction, such that 0  x  1 and 0  y  1
Boundary condition T (0, y )  0 , T (x ,0)  x , T (1, y )  e y , T (x ,1)  x e 1 ,
and compare the exact solution is T (x , y )  e .
xy

Solution (1):
1-Select the appropriate knot vector that provides the resolution required
for the solution. Since the PDE's of the second order, the least U-vector
and W-vector to choose are of degree 4.
U = [5(0) 5(1)]
W = [5(0) 5(1)]

Figure (3.1.1): Plane Heat Transfer Problem


2-Calculate all required basis functions
Table (3.1.1) :basis functions of 2-direction U and W
U-direction W-direction
N 0,4  (1  t ) 4 M 0,4  (1  r ) 4
N 1,4  4t (1  t )3 M 1,4  4r (1  r )3
N 2,4  6t 2 (1  t ) 2 M 2,4  6r 2 (1  r ) 2
N 3,4  4t 3 (1  t ) M 3,4  4t 3 (1  t )
N 4,4  t 4 M 4,4  r 4

3- Calculate the abscissa and ordinate coordinates for the control points.
Since the Greville Abscissa approach has been chosen, use equations
(3.1.11) &(3.1.12) to calculate the Greville Abscissa for required control
points.
Table (3.1.2): Greville Abscissa of U-direction & W-direction
i xi j yj
1 2 1 2
2 1/4 2 1/4
3 1/2 3 1/2
4 3/4 4 3/4
5 1 5 1

4- Calculate the appropriate B-spline surface equations and the required


derivatives for the boundary conditions that need to be met. Since the
boundary conditions involve the B-spline surface, it must be calculated.
The B-spline surface must be calculated, by using equation (3.1.1).
4 4
T (t , r )   B i , j N i ,4 (t )M j ,4 (r )
i 0 j 0

T (t , r )  N 0,4 (t )[B 0,0 M 0,4 (r )  B 0,1M 1,4 (r )  B 0,2 M 2,4 (r )  B 0,3M 3,4 (r )  B 0,4 M 44 (r )]
 N 1,4 (t )[B 1,0 M 0,4 (r )  B 1,1M 1,4 (r )  B 1,2 M 2,4 (r )  B 1,3M 3,4 (r )  B 1,4 M 44 (r )]
 N 2,4 (t )[B 2,0 M 0,4 (r )  B 2,1M 1,4 (r )  B 2,2 M 2,4 (r )  B 2,3 M 3,4 (r )  B 2,4 M 44 (r )]
 N 3,4 (t )[B 3,0 M 0,4 (r )  B 3,1M 1,4 (r )  B 3,2 M 2,4 (r )  B 3,3 M 3,4 (r )  B 3,4 M 44 (r )]
 N 4,4 (t )[B 4,0 M 0,4 (r )  B 4,1M 1,4 (r )  B 4,2 M 2,4 (r )  B 4,3 M 3,4 (r )  B 4,4 M 44 (r )]
T (t , r )  (1  t ) 4 [B 0,0 *(1  r ) 4  B 0,1 *4r (1  r )3  B 0,2 *6r 2 (1  r ) 2  B 0,3 *4r 3 (1  r )  B 0,4 * r 4 ]
 4 t (1  t )3 [B1,0 *(1  r ) 4  B1,1 *4r (1  r )3  B 1,2 *6r 2 (1  r ) 2  B 1,3 4r 3 (1  r )  B 1,4 * r 4 ]
 6 t 2 (1  t )2 [B 2,0 *(1  r ) 4  B 2,1 *4r (1  r )3  B 2,2 *6r 2 (1  r ) 2  B 2,3 4r 3 (1  r )  B 2,4 * r 4 ]
 4 t 3 (1  t ) [B 3,0 *(1  r ) 4  B 3,1 *4r (1  r )3  B 3,2 *6r 2 (1  r ) 2  B 3,3 4r 3 (1  r )  B 3,4 * r 4 ]
 t 4 [B 4,0 *(1  r ) 4  B 4,1 *4r (1  r )3  B 4,2 *6r 2 (1  r ) 2  B 4,3 4r 3 (1  r )  B 4,4 * r 4 ]

Table (3.1.3) : The values the boundary of Plane Heat


i j t r Bi,j
2 2 2 2 0
1 2 1/4 2 -0.25
2 2 1/2 2 0.7222
3 2 3/4 2 -1.0833
4 2 1 2 1
2 1 2 1/4 0
2 2 2 1/2 0
2 3 2 3/4 0
2 4 2 1 2
4 1 1/4 1 -1.7629
4 2 1/2 1 2.6854
4 3 3/4 1 -3.1948
4 4 1 1 2.7183
1 4 1 1/4 -0.6796
2 4 1 1/2 1.9632
3 4 1 3/4 -2.9448

The first term of the differential equation involves the second


derivative in the parameter ' t 'direction. The second derivative of the B-
spline surface, with respect to the parameter ' t ' can be calculated using
equation (3.1.10).
4 4
T t t (t , r )   B i , j N i,4 (t )M j ,4 (r )
i 0 j 0
The second term of the differential equation involves the second
derivative in r direction. The second derivative of the B-spline surface,
with respect to r can be calculated using equation (3.1.11).

4 4
T r r (t , r )   B i , j N i ,4 (t )M j ,4 (r )
i 0 j 0

The boundary conditions to solve for boundary applicate values of


control points. Since the Greville Abscissa were used as control points,
the parametric coordinate t is constrained to the Cartesian coordinate x
and the parametric coordinate r is constrained to the Cartesian
coordinate y. The boundary conditions are T (0, r )  0 , T (t ,0)  t ,
T (1, r )  e r , T (t ,1)  t e 1 , when the B- spline surface
T (t , r )  (1  t ) 4 [ B 0,0 *(1  r ) 4  B 0,1 * 4r (1  r )3  B 0,2 *6r 2 (1  r ) 2  B 0,3 * 4r 3 (1  r )  B 0,4 * r 4 ]
4t (1  t )3[B 1,0 *(1  r ) 4  B 1,1 * 4r (1  r )3  B 1,2 *6r 2 (1  r ) 2  B 1,3 4r 3 (1  r )  B 1,4 * r 4 ]
6t 2 (1  t ) 2 [B 2,0 *(1  r ) 4  B 2,1 * 4r (1  r )3  B 2,2 *6r 2 (1  r ) 2  B 2,3 4r 3 (1  r )  B 2,4 * r 4 ]
4t 3 (1  t )[B 3,0 *(1  r ) 4  B 3,1 * 4r (1  r )3  B 3,2 *6r 2 (1  r ) 2  B 3,3 4r 3 (1  r )  B 3,4 * r 4 ]
t 4 [B 4,0 *(1  r ) 4  B 4,1 * 4r (1  r )3  B 4,2 *6r 2 (1  r ) 2  B 4,3 4r 3 (1  r )  B 4,4 * r 4 ]
is evaluated at the boundaries, the following external applicate values
are calculated to be :
Table (3.1.4): The values of the interior of Plane Heat
i j t r Bi,j
1 1 1/4 1/4 0.4084
2 1 1/2 1/4 -1.3014
3 1 3/4 1/4 1.8053
1 2 1/4 1/2 -0.6995
2 2 1/2 1/2 1.8536
3 2 3/4 1/2 -2.9662
1 3 1/4 3/4 0.6942
2 3 1/2 3/4 -2.3644
3 3 3/4 3/4 3.2176
T( t , r )=416.2990*t 4 * r 4  623.7544* t 3 * r 4  285.2651* t 2 * r 4  38.1479*t * r 4
737.5317* t 4 * r 3  (1.1052*103 )* t 3 * r 3  506.0981* t 2 * r 3  68.2864*t * r 3
455.9323*t 4 * r 2  683.8776*t 3 * r 2  313.6040*t 2 * r 2
42.3912*t * r 2  116.3711*t 2 * r  174.9552*t 3 * r
80.1701*t 2 * r  10.5344*t * r  10.6667*t 4  16*t 3  7.3333*t 2  t

Table (3.1.5): Exact vs Approximate Solution


Approximation Exact
t R
solution solution
2 2 2 1
1/4 1/4 -0.0204 1.0645
1/2 1/2 -0.0583 1.2840
3/4 3/4 -0.0621 1.7551 RMS
1 1 2.7183 2.7183 1.2067

Solution (2)
Select an appropriate knot vector that provides the resolution required
for the solution. Since the PDE's of second order, the least U-vector and
W-vector to choose are of degree 6.
U = [7(0) 7(1)]
W = [7(0) 7(1)]

Figure (3.1.4): Plane Heat Transfer Problem


Calculate all required basis functions :
Table (3.1.7): basis functions of 2-direction U and W
U-direction W-direction

N 0,6  (1  t ) 6 M 0,6  (1  r ) 6
N 1,6  6t (1  t )5 M 1,6  6r (1  r )5
N 2,6  15t 2 (1  t ) 4 M 2,6  15r 2 (1  r ) 4
N 3,6  20t 3 (1  t )3 M 3,6  20r 3 (1  r )3
N 4,6  15t 4 (1  t ) 2 M 4,6  15r 4 (1  r ) 2
N 5,6  6t 5 (1  t ) M 5,6  6r 5 (1  t )
N 6,6  t 6 M 6,6  r 6

Calculate the abscissa and ordinate coordinates for the control points.
Since the Greville Abscissa approach has been chosen, use equations
(3.1.11) & (3.1.12) to calculate the Greville Abscissa for required control
points.
Table (3.1.8): Greville Abscissa of U-direction & W-direction
i xi j yj

1 2 1 2
2 1/6 2 1/6

3 1/3 3 1/3

4 1/2 4 1/2

5 2/3 5 2/3

6 5/6 6 5/6

7 1 7 1

Calculate the appropriate B-spline surface equations and the required


derivatives for the boundary conditions that need to be met. Since the
boundary conditions involve the B-spline surface, it must be calculated.
The B-spline surface must be calculated, by using equation (3.1.1).
6 6
T (t , r )   B i , j N i ,6 (t )M j ,6 (r )
i 0 j 0

The boundary conditions to solve for boundary applicate values of


control points. Since the Greville Abscissa were used as control points,
the parametric coordinate t is constrained to the Cartesian coordinate x
and the parametric coordinate r is constrained to the Cartesian
coordinate y. The Boundary Conditions are T (0, r )  0 , T (t ,0)  t ,
T (1, r )  e r , T (t ,1)  t e 1 , When the B-spline surface
Table (3.1.9): The values the boundary of Plane Heat
I J t r Bi,j

2 2 2 2 2

1 2 1/6 2 -0.1667

2 2 1/3 2 0.58

3 2 1/2 2 -1.1350

4 2 2/3 2 1.5133

5 2 5/6 2 -1.45

6 2 1 2 1

2 1 2 1/6 0

2 2 2 1/3 0

2 3 2 1/2 0

2 4 2 2/3 0

2 5 2 5/6 0

2 6 2 1 0

6 1 1 1/6 -1.9030

6 2 1 1/3 3.0899

6 3 1 1/2 -4.2203
6 4 1 2/3 4.6937

6 5 1 5/6 -4.1082

6 6 1 1 2.7183

1 6 1/6 1 -0.4531

2 6 1/3 1 1.5766

3 6 1/2 1 -3.0853

4 6 2/3 1 4.1137

5 6 5/6 1 -3.9415

The substitute B-spline surface and the derivatives into the differential
equation,
 2T  2T
 2  (x 2  y 2 ) e xy Tt t (t , r ) T r r (t , r )  (t 2  r 2 ) e t r
x 2
y

Table (3.1.10) : The values of the interior of Plane Heat


i j t R Bi,j

1 1 1/6 1/6 0.6872

2 1 1/3 1/6 -0.8024

3 1 1/2 1/6 3.4621

4 1 2/3 1/6 -2.5054

5 1 5/6 1/6 -1.1525

1 2 1/6 1/3 -0.2668

2 2 1/3 1/3 3.7227

3 2 1/2 1/3 -3.1184

4 2 2/3 1/3 10.31

5 2 5/6 1/3 -16.4647

1 3 1/6 1/2 1.9151

2 3 1/3 1/2 -2.0605


3 3 1/2 1/2 9.5239

4 3 2/3 1/2 -6.3369

5 3 5/6 1/2 -4.1943

1 4 1/6 2/3 -0.9159

2 4 1/3 2/3 7.3258

3 4 1/2 2/3 -6.4909

4 4 2/3 2/3 23.2773

5 4 5/6 2/3 -32.0468

1 5 1/6 5/6 1.1762

2 5 1/3 5/6 -2.2893

3 5 1/2 5/6 6.5238

4 5 2/3 5/6 -6.5418

5 5 5/6 5/6 2.6360

T( t , r ) = (2.6159*104 )*t 6 * r 6  (6.3845*104 )*t 5 * r 6  (5.8444*104 )*t 4 * r 6  (2.5518*104 )*t 3 * r 6


 (5.4034*103 )*t 2 * r 6  430*t * r 6  (6.9904*104 )*t 6 * r 5  (1.7182*105 )*t 5 * r 5  (1.5834*105 )*t 4 * r 5
 (6.9256*104 )*t 3 * r 5  (1.4608*104 )*t 2 * r 5  (1.1116*103 )*t * r 5  (7.1717*104 )*t 6 * r 4  (1.7754*105 )*t 5 * r 4
 (1.6484*105 )*t 4 * r 4  (7.2265*104 )*t 3 * r 4  (1.5147*10 4 )*t 2 * r 4  (1.1666*103 )*t * r 4  (3.6867*104 )*t 6 * r 3
 (9.1284*104 )*t 5 * r 3  (8.4930*104 )*t 4 * r 3  (3.7291*104 )*t 3 * r 3  (7.7698*103 )*t 2 * r 3  (587.12)*t * r 3  (1*104 )*t 6 * r 2
 (2.4991*104 )*t 5 * r 2  (2.3287*104 )*t 4 * r 2  (1.0224*10 4 )*t 3 * r 2  (2.1259*103 )*t 2 * r 2  (161.178)*t * r 2
 (1.0744*103 )*t 6 * r  (2.9979*103 )*t 5 * r  (3.0397*103 )*t 4 * r  (1.3434*103 )*t 3 * r  (274.899)*t 2 * r  (30.2748)*t * r
 64.8*t 6  162*t 5  153*t 4  (67.5)*t 3  13.7*t 2  t

Table (3.1.11): Approximation vs Exact solution


Approximation
t r Exact solution
solution

2 2 2 2

1/6 1/6 0.2732 0.1969

1/3 1/3 0.9387 0.4652

1/2 1/2 0.9588 0.8244

2/3 2/3 - 0.9920 1.2985

5/6 5/6 -2.1504 1.9175 RMS

1 1 2.7183 2.7183 1.9568

Solution (3)
Select an appropriate knot vector that provides the resolution required
for the solution. Since the PDE's of second order, the least U-vector and
W-vector to choose are of degree 8.
U = [9(0) 9(1)]
W = [9(0) 9(1)]
Calculate all required basis functions
Table (3.1.13): Basis functions of 2-direction U and W
U-direction W-direction

N 0,8  (1  t )8 M 0,8  (1  r )8
N 1,8  8t (1  t ) 7 M 1,8  8r (1  r ) 7
N 2,8  28t 2 (1  t ) 6 M 2,8  28r 2 (1  r ) 6
N 3,8  56t 3 (1  t ) 5 M 3,8  56r 3 (1  r ) 5
N 4,8  70t 4 (1  t ) 4 M 4,8  70r 4 (1  r ) 4
N 5,8  56t 5 (1  t ) 3 M 5,8  56r 5 (1  r )3
N 6,8  28t 6 (1  t ) 2 M 6,8  28r 6 (1  r ) 2
N 7,8  8t 7 (1  t ) M 7,8  8r 7 (1  r )
N 8,8 t8 M 8,8  r 8

Calculate the abscissa and ordinate coordinates for the control points.
Since the Greville Abscissa approach has been chosen, use equations
(3.1.11) & (3.1.12) to calculate the Greville Abscissa for required control
points.
Table (3.1.14): Greville Abscissa of U-direction & W-direction
i xi J yj
1 2 1 2
2 1/8 2 1/8
3 1/4 3 1/4
4 3/8 4 3/8
5 1/2 5 1/2
6 5/8 6 5/8
7 3/4 7 3/4
8 7/8 8 7/8
9 1 9 1

Calculate the appropriate B-spline surface equations and the required


derivatives for the boundary conditions that need to be met. Since the
boundary conditions involve the B-spline surface, it must be calculated.
The B-spline surface must be calculated, by using equation (3.1.1).
8 8
T (t , r )   B i , j N i ,8 (t )M j ,8 (r )
i 0 j 0

Table (3.1.15): The values of the boundary of Plane Heat


i j t r Bi,j
2 2 2 2 2
1 2 1/8 2 -0.1250
2 2 1/4 2 0.4908
3 2 3/8 2 -1.1303
4 2 1/2 2 1.8573
5 2 5/8 2 -2.3216
6 2 3/4 2 2.2607
7 2 7/8 2 -1.7179
8 2 1 2 0
2 1 2 1/8 0
2 2 2 1/4 0
2 3 2 3/8 0
2 4 2 1/2 0
2 5 2 5/8 0
2 6 2 3/4 0
2 7 2 7/8 0
2 8 2 1 2
1 8 1/8 1 -0.3398
2 8 1/4 1 1.3342
3 8 3/8 1 -3.0726
4 8 1/2 1 5.0486
5 8 5/8 1 -6.3108
6 8 3/4 1 6.1451
7 8 7/8 1 -4.6697
8 8 1 1 1
8 1 1 1/8 -2.0576
8 2 1 1/4 3.5948
8 3 1 3/8 -5.3942
8 4 1 1/2 6.9059
8 5 1 5/8 -7.4411
8 6 1 3/4 6.6360
8 7 1 7/8 -4.7947

The first term of the differential equation involves the second


derivative in t direction. The second derivative of the B-spline surface,
with respect to t can be calculated using equation (3.1.10).
8 8
T t t (t , r )   B i , j N i,8 (t )M j ,8 (r )
i 0 j 0

The second term of the differential equation involves the second


derivative in r direction. The second derivative of the B-spline surface,
with respect to the parameter ' r ' can be calculated using equation
(3.1.11).
8 8
T r r (t , r )   B i , j N i ,8 (t )M j ,8 (r )
i 0 j 0
The boundary conditions to solve for boundary applicate values of
control points. Since the Greville Abscissa were used as control points,
the parametric coordinate t is constrained to the Cartesian coordinate x
and the parametric coordinate r is constrained to the Cartesian
coordinate y. The Boundary Conditions are T (0, r )  0 , T (t , 0)  t ,
T (1, r )  e r , T (t ,1)  t e 1 , is evaluated at the boundaries, the following
external applicate values are calculated to be :
Table (3.1.16) :The values of the interior of Plane Heat
i j t r Bi,j
1 1 1/8 1/8 0.2704
2 1 1/4 1/8 -1.0677
3 1 3/8 1/8 2.4483
4 1 1/2 1/8 -3.9826
5 1 5/8 1/8 5.0550
6 1 3/4 1/8 -4.6193
7 1 7/8 1/8 3.2050
1 2 1/8 1/4 -0.5194
2 2 1/4 1/4 1.9427
3 2 3/8 1/4 -4.5491
4 2 1/2 1/4 7.2515
5 2 5/8 1/4 -9.3942
6 2 3/4 1/4 8.5244
7 2 7/8 1/4 -4.7713
1 3 1/8 3/8 0.7140
2 3 1/4 3/8 -2.8547
3 3 3/8 3/8 6.5631
4 3 1/2 3/8 -10.6196
5 3 5/8 3/8 13.5192
6 3 3/4 3/8 -11.7901
7 3 7/8 3/8 7.5612
1 4 1/8 1/2 -1.0704
2 4 1/4 1/2 3.9618
3 4 3/8 1/2 -9.3220
4 4 1/2 1/2 14.6218
5 4 5/8 1/2 -19.3478
6 4 3/4 1/2 16.4586
7 4 7/8 1/2 -7.2406
1 5 1/8 5/8 1.5235
2 5 1/4 5/8 -5.3982
3 5 5/8 5/8 12.0529
4 5 1/2 5/8 -19.7847
5 5 5/8 5/8 25.0540
6 5 3/4 5/8 -28.4682
7 5 7/8 5/8 22.7331
1 6 1/8 3/4 -1.3005
2 6 1/4 3/4 4.6488
3 6 3/8 3/4 -10.1968
4 6 1/2 3/4 17.2016
5 6 5/8 3/4 -21.0937
6 6 3/4 3/4 26.4342
7 6 7/8 3/4 -24.4447
1 7 1/8 7/8 0.6217
2 7 1/4 7/8 -2.3827
3 7 3/8 7/8 5.4931
4 7 1/2 7/8 -8.9919
5 7 5/8 7/8 11.3316
6 7 3/4 7/8 -11.2367
7 7 7/8 7/8 8.4833

Table (3.1.17): Approximation vs Exact solution


t r Approximation Exact
solution solution
2 2 0 1
1/8 1/8 -0.0091 1.0157
1/4 1/4 -0.0091 1.0157
3/8 3/8 -0.0926 1.1510
1/2 1/2 -0.1961 1.2840
5/8 5/8 -0.1806 1.4779
3/4 3/4 0.4459 1.7551
7/8 7/8 0.7311 2.1503 RMS
1 1 2.7183 2.7183 1.2164

Example (3.1.2): The governing equation for a two dimensional heat


transfer problem with no heat generation is the Laplace Equation,
 2T  2T
  0 where T is the temperature change in the indicated
x 2 y 2
direction, such that 0  x  1 and 0  y  1
Boundary condition T (0, y )  0 , T (x ,0)  0
T (1, y )  y , T (x ,1)  x
And compare the exact solution T (x , y )  xy .
Solution (1): Select the appropriate knot vector that provides the
resolution required for the solution. Since the PDE's of second order, the
least U-vector and W-vector to choose are of degree 4.
U = [5(0) 5(1)]
W = [5(0) 5(1)]

Figure (3.1.5): Plane Heat Transfer Problem

Calculate all required basis functions


Table (3.1.19): Basis functions of 2-direction U and W
U-direction W-direction
N 0,4  (1  t ) 4 M 0,4  (1  r ) 4
N 1,4  4t (1  t )3 M 1,4  4r (1  r )3
N 2,4  6t 2 (1  t ) 2 M 2,4  6r 2 (1  r ) 2
N 3,4  4t 3 (1  t ) M 3,4  4r 3 (1  r )
N 4,4  t 4 M 4,4  r 4

The Greville abscissa of x and y are:


Table (3.1.20): Greville Abscissa of U-direction & W-direction
I xi J yj
1 2 1 2
2 1/4 2 1/4
3 1/2 3 1/2
4 3/4 4 3/4
5 1 5 1

Calculate the appropriate B-spline surface equations and the required


derivatives for the boundary conditions that need to be met. Since the
boundary conditions involve the B-spline surface, it must be calculated.
The B-spline surface must be calculated, by using equation (3.1.1).
4 4
T (t , r )   B i , j N i ,4 (t )M j ,4 (r )
i 0 j 0

T (t , r )  N 0,4 (t )[B 0,0 M 0,4 (r )  B 0,1M 1,4 (r )  B 0,2 M 2,4 (r )  B 0,3M 3,4 (r )  B 0,4 M 44 (r )]
 N 1,4 (t )[B 1,0 M 0,4 (r )  B 1,1M 1,4 (r )  B 1,2 M 2,4 (r )  B 1,3M 3,4 (r )  B 1,4 M 44 (r )]
 N 2,4 (t )[B 2,0 M 0,4 (r )  B 2,1M 1,4 (r )  B 2,2 M 2,4 (r )  B 2,3 M 3,4 (r )  B 2,4 M 44 (r )]
 N 3,4 (t )[B 3,0 M 0,4 (r )  B 3,1M 1,4 (r )  B 3,2 M 2,4 (r )  B 3,3 M 3,4 (r )  B 3,4 M 44 (r )]
 N 4,4 (t )[B 4,0 M 0,4 (r )  B 4,1M 1,4 (r )  B 4,2 M 2,4 (r )  B 4,3 M 3,4 (r )  B 4,4 M 44 (r )]

T (t , r )  (1  t ) 4 [ B 0,0 * (1  r ) 4  B 0,1 * 4r (1  r ) 3  B 0,2 * 6r 2 (1  r ) 2  B 0,3 * 4 r 3 (1  r )  B 0,4 * r 4 ]


4t (1  t )3[ B 1,0 * (1  r ) 4  B 1,1 * 4r (1  r )3  B 1,2 * 6r 2 (1  r ) 2  B 1,3 4r 3 (1  r )  B 1,4 * r 4 ]
6t 2 (1  t ) 2 [B 2,0 * (1  r ) 4  B 2,1 * 4r (1  r )3  B 2,2 * 6r 2 (1  r ) 2  B 2,3 4r 3 (1  r )  B 2,4 * r 4 ]
4t 3 (1  t )[ B 3,0 * (1  r ) 4  B 3,1 * 4r (1  r )3  B 3,2 * 6r 2 (1  r ) 2  B 3,3 4r 3 (1  r )  B 3,4 * r 4 ]
t 4 [B 4,0 * (1  r ) 4  B 4,1 * 4r (1  r )3  B 4,2 * 6r 2 (1  r ) 2  B 4,3 4r 3 (1  r )  B 4,4 * r 4 ]

The first term of the differential equation involves the second


derivative in the parameter ' t 'direction. The second derivative of the B-
spline surface, with respect to the parameter ' t ' can be calculated using
equation (3.1.10) .
4 4
T t t (t , r )   B i , j N i,4 (t )M j ,4 (r )
i 0 j 0

The second term of the differential equation involves the second


derivative in the parameter r direction. The second derivative of the B-
spline surface, with respect to the parameter r can be calculated using
equation (3.1.11).
4 4
T r r (t , r )   B i , j N i ,4 (t )M j ,4 (r )
i 0 j 0
The boundary conditions to solve for boundary applicate values of
control points. Since the Greville Abscissa were used as control points,
the parametric coordinate t is constrained to the Cartesian coordinate ’x’
and the parametric coordinate r is constrained to the Cartesian
coordinate y. The Boundary Conditions are T (0, r )  0 , T (t , 0)  0 ,
T (1, r )  r , T (t ,1)  t , When the B- spline surface
T (t , r )  (1  t ) 4 [B 0,0 *(1  r ) 4  B 0,1 * 4r (1  r )3  B 0,2 *6r 2 (1  r ) 2  B 0,3 * 4r 3 (1  r )  B 0,4 * r 4 ]
4t (1  t )3[B 1,0 *(1  r ) 4  B 1,1 * 4r (1  r )3  B 1,2 *6r 2 (1  r ) 2  B 1,3 4r 3 (1  r )  B 1,4 * r 4 ]
6t 2 (1  t ) 2 [B 2,0 *(1  r ) 4  B 2,1 * 4r (1  r )3  B 2,2 *6r 2 (1  r ) 2  B 2,3 4r 3 (1  r )  B 2,4 * r 4 ]
4t 3 (1  t )[B 3,0 *(1  r ) 4  B 3,1 * 4r (1  r )3  B 3,2 *6r 2 (1  r ) 2  B 3,3 4r 3 (1  r )  B 3,4 * r 4 ]
t 4 [B 4,0 *(1  r ) 4  B 4,1 * 4r (1  r )3  B 4,2 *6r 2 (1  r ) 2  B 4,3 4r 3 (1  r )  B 4,4 * r 4 ]
is evaluated at the boundaries, the following external applicate values
are calculated to be :
Table (3.1.21) :The values the of boundary of Plane Heat
i j t r Bi.j
2 2 2 2 2
1 2 1/4 0 -0.1250
2 2 1/2 2 0.3611
3 2 3/4 2 -0.5417
4 2 1 2 0.5
2 1 2 1/4 -0.1250
2 2 2 1/2 0.3611
2 3 2 3/4 -0.5417
2 4 2 1 0.5
4 1 1 1/4 -0.7917
4 2 1 1/2 1.0833
4 3 1 3/4 -1.2083
4 4 1 1 1
1 4 1/4 1 -0.7917
2 4 1/2 1 1.0833
3 4 3/4 1 -1.2083

The substitute B-spline surface and the derivatives into the differential
equation,
 2T  2T
 0 Tt t (t , r ) T r r (t , r )  0
x 2 y 2

i j t r Bi.j
1 1 1/4 1/4 0.7756
2 1 1/2 1/4 -1.7878
3 1 3/4 1/4 1.3312
1 2 1/4 1/2 -1.7610
2 2 1/2 1/2 3.4854
3 2 3/4 1/2 -2.3629
1 3 1/4 3/4 2.4614
2 3 1/2 3/4 -5.2667
3 3 3/4 3/4 3.0170
Table (3.1.22) :The values of the interior of Plane Heat
T ( t , r ) = (113.7781)*t 4 * r 4  (170.6688)*t 3 * r 4  (78.2245)*t 2 * r 4  (10.6672)*t * r 4
(170.6688)*t 4 * r 3  256*t 3 * r 3  (117.3408)*t 2 * r 3  16*t * r 3
(78.2245)*t 4 * r 2  (117.3408)*t 3 * r 2  (53.7840)*t 2 * r 2  (7.3344)*t * r 2
(10.6672)*t 4 * r  16*t 3 * r  (7.3344)*t 2 * r  t * r
Table (3.1.23) : Approximation vs Exact solution
Approximatio Exact
t r
n solution solution
2 2 2 2
1/4 1/4 -0.0177 0.0625
1/2 1/2 -0.0916 0.25
3/4 3/4 -0.0466 0.5625 RMS
1 1 1 1 0.2767
Solution (2)
Select the appropriate knot vector that provides the resolution required
for the solution. Since the PDE's of second order, the least U-vector and
W-vector to choose are of degree 8.
U = [9(0) 9(1)]
W = [9(0) 9(1)]

Calculate all required basis functions


Table (3.1.30) : Basis functions of 2-direction U and W
U-direction W-direction
N 0,8  (1  t )8 M 0,8  (1  r )8
N 1,8  8t (1  t ) 7 M 1,8  8r (1  r ) 7
N 2,8  28t 2 (1  t ) 6 M 2,8  28r 2 (1  r ) 6
N 3,8  56t 3 (1  t )5 M 3,8  56r 3 (1  r )5
N 4,8  70t 4 (1  t ) 4 M 4,8  70r 4 (1  r ) 4
N 5,8  56t 5 (1  t )3 M 5,8  56r 5 (1  r )3
N 6,8  28t 6 (1  t ) 2 M 6,8  28r 6 (1  r ) 2

N 7,8  8t 7 (1  t ) M 7,8  8r 7 (1  r )

N 8,8  t 8 M 8,8  r 8

Calculate the abscissa and ordinate coordinates for the control points.
Since the Greville Abscissa approach has been chosen, use equations
(3.1.11) &(3.1.12) to calculate the Greville Abscissa for required control
points.
Table (3.1.31): Greville Abscissa of U-direction & W-direction
i xi j yj
1 2 1 2
2 1/8 2 1/8
3 1/4 3 1/4
4 3/8 4 3/8
5 1/2 5 1/2
6 5/8 6 5/8
7 3/4 7 3/4
8 7/8 8 7/8
9 1 9 1

Calculate the appropriate B-spline surface equations and the required


derivatives for the boundary conditions that need to be met. Since the
boundary conditions involve the B-spline surface, it must be calculated.
The B-spline surface must be calculated, by using equation (3.1.1).
8 8
T (t , r )   B i , j N i ,8 (t )M j ,8 (r )
i 0 j 0

Table (3.1.32): The values of the boundary of Plane Heat


i j t r Bi,j
2 2 2 2 0
1 2 1/8 2 0
2 2 1/4 2 0
3 2 3/8 2 0
4 2 1/2 2 0
5 2 5/8 2 0
6 2 3/4 2 0
7 2 7/8 2 0
8 2 1 2 0
2 1 2 1/8 0
2 2 2 1/4 0
2 3 2 3/8 0
2 4 2 1/2 0
2 5 2 5/8 0
2 6 2 3/4 0
2 7 2 7/8 0
2 8 2 1 0
1 8 1/8 1 -0.1250
2 8 1/4 1 0.4908
3 8 3/8 1 -1.1303
4 8 1/2 1 1.8573
5 8 5/8 1 -2.3216
6 8 3/4 1 2.2607
7 8 7/8 1 -1.7179
8 8 1 1 1
8 1 1 1/8 -0.1250
8 2 1 1/4 0.4908
8 3 1 3/8 -1.1303
8 4 1 1/2 1.8573
8 5 1 5/8 -2.3216
8 6 1 3/4 2.2607
8 7 1 7/8 -1.7179
The first term of the differential equation involves the second
derivative in the parameter ' t 'direction. The second derivative of the B-
spline surface, with respect to the parameter ' t ' can be calculated using
equation (3.1.10) .
8 8
T t t (t , r )   B i , j N i,8 (t )M j ,8 (r )
i 0 j 0
The second term of the differential equation involves the second
derivative in the parameter ' r ' direction. The second derivative of the B-
spline surface, with respect to the parameter ' r ' can be calculated using
equation (3.1.11).
8 8
T r r (t , r )   B i , j N i ,8 (t )M j ,8 (r )
i 0 j 0
The boundary conditions to solve for boundary applicate values of
control points. Since the Greville Abscissa were used as control points,
the parametric coordinate ‘ t ’ is constrained to the Cartesian coordinate
’x’ and the parametric coordinate ' r ' is constrained to the Cartesian
coordinate ’y’. The Boundary Conditions are T (0, r )  0 , T (t , 0)  0 ,
T (1, r )  r , T (t ,1)  t , When the B- spline surface is evaluated at the
boundaries, the following external applicate values are calculated to be :
Table (3.1.33) :The values of the interior of Plane Heat
i j t R Bi,j
1 1 1/8 1/8 0.0197
2 1 1/4 1/8 -0.0794
3 1 3/8 1/8 0.1795
4 1 1/2 1/8 -0.2824
5 1 5/8 1/8 0.3769
6 1 3/4 1/8 -0.2725
7 1 7/8 1/8 0.1118
1 2 1/8 1/4 -0.0832
2 2 1/4 1/4 0.2965
3 2 3/8 1/4 -0.7063
4 2 1/2 1/4 1.0910
5 2 5/8 1/4 -1.4666
6 2 3/4 1/4 1.2337
7 2 7/8 1/4 -0.4051
1 3 1/8 3/8 0.1537
2 3 1/4 3/8 -0.6194
3 3 3/8 3/8 1.4230
4 3 1/2 3/8 -2.2869
5 3 5/8 3/8 2.9350
6 3 3/4 3/8 -2.4292
7 3 7/8 3/8 1.4097
1 4 1/8 1/2 -0.2968
2 4 1/4 1/2 1.0901
3 4 3/8 1/2 -2.5724
4 4 1/2 1/2 4.0098
5 4 5/8 1/2 -5.3462
6 4 3/4 1/2 4.4629
7 4 7/8 1/2 -1.7483
1 5 1/8 5/8 0.4753
2 5 1/4 5/8 -1.6842
3 5 5/8 5/8 3.7605
4 5 1/2 5/8 -6.1729
5 5 5/8 5/8 7.8169
6 5 3/4 5/8 -8.8821
7 5 7/8 5/8 7.0928
1 6 1/8 3/4 -0.4295
2 6 1/4 3/4 1.5438
3 6 3/8 3/4 -3.3965
4 6 1/2 3/4 5.7203
5 6 5/8 3/4 -7.0230
6 6 3/4 3/4 8.6777
7 6 7/8 3/4 -7.9536
1 7 1/8 7/8 0.2217
2 7 1/4 7/8 -0.8523
3 7 3/8 7/8 1.9647
4 7 1/2 7/8 -3.2177
5 7 5/8 7/8 4.0508
6 7 3/4 7/8 -4.0076
7 7 7/8 7/8 -3.0281

Table (3.1.34) : Approximation vs Exact solution


Approximation Exact
t r
solution solution
2 2 2 0
1/8 1/8 -0.0012 0.0156
1/4 1/4 -0.0012 0.0156
3/8 3/8 -0.0166 0.1406
1/2 1/2 -0.0431 0.25
5/8 5/8 -0.0384 0.3906
3/4 3/4 0.1607 0.5625
7/8 7/8 0.2417 0.7656 RMS
1 1 1 1 0.2844

3.2. The Comparison between B-spline method and FDM's of


PDE's
In this section, the comparison is held between the finite difference
methods (FDM) and B-spline method of partial differential equations.The
Root mean square in B-spline that is less of than the finite difference
method. The FDM is commonly used to solve partial differential
equations that have conditions imposed on the boundary conditions and
two initial conditions. As stated in section (1.2) for a way finite
differences method. We will solve the examples and the values RMS
between FDM and B-spline.

 2T  2T
Example (3.2.1):  2  (x 2  y 2 ) e xy where T is the temperature
x 2
y
change in the indicated direction, such that 0  x  1 and 0  y  1
Boundary condition T (0, y )  0 , T (x ,0)  x , T (1, y )  e y , T (x ,1)  x e 1 ,
and compare the exact solution T (x , y )  e .
xy

1
Solution: If n  m  3 , h  k  , for each i  1, 2 and j  1, 2 . and
2
where l  i  (m 1  j )(n 1) for each i  1, 2 and j  1, 2

Then the equation of FDM is:


1
4 w i , j  w i 1, j  w i 1, j  w i , j 1  w i , j 1  
y
x e j
2 i
h

Expressing this in terms of the relabeled interior grid points wi = u(Pi)


implies that the equations at the points Pi are:
2
1 1
P1 : 4 w 1 w 2 w 0,2 w 3 w 1,3   * *e 3
16 4
2
1 2
P2 : 4 w 2 w 3,2 w 1 w 4 w 2,3   * *e 3
9 3
1 1 1
P3 : 4 w 3 w 4 w 0,1 w 1,0 w 1   * *e 3
9 3
1 2 13
P4 : 4 w 4 w 3,1 w 3 w 2,0 w 2   * *e
9 3

1
w 1,0  , w 2,0  2 , w 0,1  w 0,2  w 0,3  0,
3 3
2
1 1 2 1
w 1,3  e , w 2,3  e , w 3,1  e , w 3,2  e 3
1

3 3
Table (4.2.1): The values of FDM
i 1 2 3 4
wi 0.478225 0.9562 0.1227 -0.269025

The comparison of RMS between B-spline and Finite difference method:

RMS of B-spline
RMS of FDM
Order 5
1.2067 2.3641

1
If n  m  4 , h  k  , for each i  1, 2,3 and j  1, 2,3 . And where
4

l  i  (m  1  j )(n 1) for each i  1, 2,3 and j  1, 2, 3

Then the equation of FDM is:

1
4 w i , j w i 1, j w i 1, j w i , j 1 w i , j 1  
yj
x i e
h2
Expressing this in terms of the relabeled interior grid points wi = u(Pi)
implies that the equations at the points Pi are:

1 1 34
P1 : 4w 1 w 2 w 4 w 0,3 w 1,4   * *e
16 4
1 1 34
P2 : 4w 2 w 3 w 1 w 5 w 2,4   * *e
16 2
1 3 34
P3 : 4w 3 w 2 w 6 w 4,3 w 3,4   * *e
16 4
1 1 12
P4 : 4w 4 w 5 w 1 w 7 w 0,2   * *e
16 4
1
1 1
P5 : 4w 5  w 6  w 4  w 2  w 8   * *e 2
16 2
1
1 3
P6 : 4w 6  w 5  w 3  w 9  w 4,2   * *e 2
16 4
1
1 1
P7 : 4w 7  w 8  w 4  w 0,1  w 1,0   * *e 4
16 4
1
1 1
P8 : 4w 8  w 9  w 7  w 5  w 2,0   * *e 4
16 2
1
1 3
P9 : 4w 9  w 8  w 6  w 3,0  w 4,1   * *e 4
16 4

1
w 1,0  , w 2,0  1 , w 3,0 
3
4 2 4
w 0,1  w 0,2  w 0,3  0,
1 1 1 1 3 1
w 1,4  e , w 2,4  e , w 3,4  e
4 2 4
1 1 3
w 4,1  e 4
, w 4,2  e 2
, w 4,3  e 4

The values of w 1 ,w 2 ,...,w 9 are found by applying the Gauss Seidel


method to it's matrix, and given in Table (4.2.3):
Table (4.2.2): The values of FDM
i 1 2 3 4 5 6 7 8 9
wi 0.4382 0.7106 0.4181 0.3298 0.5607 0.7842 0.3460 0.4697 0.4319

The comparison of RMS between B-spline and Finite difference method:

RMS of B-spline
RMS of FDM
order 9
1.2164 2.7478
Example (3.2.2): The governing equation for a two dimensional heat
transfer problem with no heat generation is the Laplace Equation,
 2T  2T
  0 where T is the temperature change in the indicated
x 2 y 2
direction, such that 0  x  1 and 0  y 1

Boundary condition T (0, r )  0 , T (t , 0)  0


T (1, r )  r , T (t ,1)  t
And compare with the exact solution T (x , y )  xy .

Solution
1
If n  m  4 ,, h  k  , for each i  1, 2,3 and j  1, 2,3 . And where
4

l  i  (m  1  j )(n 1) for each i  1, 2,3 and j  1, 2,3

Then the equation of FDM is:

4 w i , j w i 1, j w i 1, j w i , j 1 w i , j 1  0

Expressing this in terms of the relabeled interior grid points wi = u(Pi)


implies that the equations at the points Pi are:

P1 : 4w 1  w 2  w 4  w 0,3  w 1,4
P2 : 4w 2  w 3  w 1  w 5  w 2,4
P3 : 4w 3  w 2  w 6  w 4,3  w 3,4
P4 : 4w 4  w 5  w 1  w 7  w 0,2
P5 : 4w 5  w 6  w 4  w 2  w 8  0
P6 : 4w 6  w 5  w 3  w 9  w 4,2
P7 : 4w 7  w 8  w 4  w 0,1  w 1,0
P8 : 4w 8  w 9  w 7  w 5  w 2,0
P9 : 4w 9  w 8  w 6  w 3,0  w 4,1

w 1,0  w 2,0  w 3,0  w 0,1  w 0,2  w 0,3  0,


1 1 3
w 1,4  w 4,1  , w 2,4  w 4,2  , w 3,4  w 4,3  ,
4 2 4
The values of w 1 ,w 2 ,...,w 9 are found by applying the Gauss Seidel
method to it's matrix, and given in Table (4.2.5):
Table (4.2.3): The values of FDM
i 1 2 3 4 5 6 7 8 9
wi 2.1781 2.3312 2.4156 2.1313 2.2313 2.3312 2.1156 2.1313 2.1781

The comparison of RMS between B-spline and Finite difference method:

RMS of B-spline
RMS of FDM
Order 5
0.2767 0.7161
1
If n  m  5 ,, h  k  , for each i  1, 2,3, 4 and j  1, 2,3, 4 . And where
5

l  i  (m  1  j )(n 1) for each i  1, 2,3, 4 and j  1, 2,3, 4

Then the equation of FDM is:

4 w i , j w i 1, j w i 1, j w i , j 1 w i , j 1  0

w 1,0  w 2,0  w 3,0  w 4,0  w 0,1  w 0,2  w 0,3  w 0,4  0,


w 1,5  w 5,1  0.2, w 2,5  w 5,2  0.4, w 3,5  w 5,3  0.6,
w 4,5  w 5,4  0.8

The values of w 1 ,w 2 ,...,w 16 are found by applying the Gauss Seidel


method to it's matrix, and given in Table (4.2.5).
Table (4.2.3): The values of FDM
i wi
1 0.16
2 0.08
3 0.16
4 0.24
5 0.32
6 0.04
7 0.08
8 0.12
9 0.16
12 0.32
11 0.48
12 0.64
13 0.12
14 0.24
15 0.36
16 0.48

The comparison of RMS between B-spline and Finite difference method:

RMS of B-spline
RMS of FDM
Order 5
0.2767 0.5582
The Program of Basis Function of B-Spline By the
porgram's "Visual Studio ".
Public Class Form1

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button2.Click
End
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button1.Click

Dim k, kx, imax, m, pmax, i, p As Byte


Dim x As Single
k = Val(InputBox(" Order ‫ادخل الرتبة‬ "))
kx = Val(InputBox(" ‫))" ادخل عدد النقاط‬
Dim km0(kx), km1(kx), p1, p2 As Single
m = 2 * k + kx
pmax = k - 1
imax = m - pmax - 1
Dim u(m), N(m, m) As Single
For i = 0 To pmax
u(i) = 0
Next
For i = k + kx To m - 1
u(i) = 1
Next
For i = pmax + 1 To k + kx - 1
u(i) = Val(InputBox(" ‫ادخل رقم النقطة‬ " & i - k))
Next
x = Val(InputBox(" ‫))" ادخل قيمة النقطة للحساب‬
Label1.Text = ""
Label1.Text = "i= " & imax & " " & "p= " & pmax & " " &
"m= " & m
Label1.Text = Label1.Text & vbNewLine
For i = 0 To m - 1
Label1.Text = Label1.Text & u(i) & " "
Next
Label1.Text = Label1.Text & vbNewLine & vbNewLine
For p = 0 To pmax
For i = 0 To imax - 1

If p = 0 Then
If u(i) <= x And x <= u(i + 1) Then
N(i, 0) = 1
Else
N(i, 0) = 0
End If
Else

If (u(i + p) - u(i)) = 0 Then


p1 = 0
Else
p1 = ((x - u(i)) / (u(i + p) - u(i))) * N(i, p -
1)
End If
If (u(i + p + 1) - u(i + 1)) = 0 Then
p2 = 0
Else
p2 = ((u(i + p + 1) - x) / (u(i + p + 1) - u(i + 1))) * N(i + 1, p -
1)

End If
N(i, p) = p1 + p2
End If
Label1.Text = Label1.Text & " N(" & i & "," & p & ") = " & N(i, p)
& " "
Next
Label1.Text = Label1.Text & vbNewLine
Next

End Sub
End Class
In this thesis, the expansion of the solution of ordinary
differential equations was studied, where the one dimensional
equations is expanding to more. This work is achieved via the
interpolation B-spline.
For detecting the powerful of B-spline method, the
comparison with update method of Finite Difference Method is
implanted.
The test examples show that the amount of errors in B-
spline is less than that of the Finite difference Method.
1- Approximations of surface through B-spline.

2-Numarical solution of partial differential equations in


three dimensional space.

3-Applications of B-spline surface in image proceedings


References
[1] Al-Khafaji, Shahad Adel," Analysis of B-spline Method
With Applications", M.sc. thesis, University of Kufa, the Faculty of
Mathematics and Computer Science, (2012).

[2] Anaclet Bizimungu & Rukundo Janvier Ndahimana," Finite


Difference Method for the Resolution of some Partial Differential
Equations aMatlab approach",2009.

[3] Burden, R.L. and Faires, J.D; "Numerical Analysis", sixth edition, An
International Thomson publishing company(ITP), 2010.

[4] C. de Boor "A Practical Guide to Splines", vol. 27, Springer, New
York, NY, USA. 30, (2001).

[5] C. Deng, X. Yang (2007). "A Local Fitting Algorithm for Converting
Planar Curves to B-splines", Department of Mathematics, Zhejiang
University Publications.

[6] C. Fuhrer and A. Schroll,"Numerical Analysis – An Introduction" 3rd

Edition, Numerical Analysis, Center for Mathematical Sciences, Lund

University,2002.

[7] C. K. Ingram, MSc Thesis (2003). "A Geometric B-Spline Over the
Triangular Domain" , University of Waterloo. Ontario, Canada.

[8] C. K. Shene (1997-2011), Department of Computer Science,


Michigan Technological University, "Introduction to Computing with
Geometry, Lecture Notes".
[9] C.O.E. Burg and S,S. Nandihalli (2003 ). "Approximation of Surfaces
and Solution of Partial Differential Equations Using B-Splines",
American Institute of Aeronautics and Astronautics, Mississippi State
University,USA.

[10] F.Andersson, M.sc Thesis (2003). "Bézier and B-spline Technology",


Umeå University, Sweden.

[11] F.Auricchio, L Veiga, T.J.R. Hughes, A. Reali, G. Sangalli (2010).


"Isogeometric Collocation Methods", Mathematical Models and Methods
in Applied Sciences, Vol. 20, No. 11, pp.2075-2107.

[12] Farlow, S.J., "Partial Differential Equations for Scientists and


Engineers", New York,1989.

[13] G.D. Smith," Numerical Solution of Partial Differential Equations:


Finite Difference Methods",Clarendon Press, 1987.

[14] G.Farin," Curves and Surfaces for CAGD – A Practical Guide", 5th
Edition. San Diego CA: Academic Press, 2002.

[15] G. Fairweather and D. Meade, "A Survey of Spline Collocation


Methods for the Numerical Solution of Differential Equations",
Mathematics for Large Scale Computing 120, 297 341,1989.

[16] H. Jeffreys and B.S. Jeffreys,"Lagrange's Interpolation Formula",


Methods of Mathematical Physics, 3rd ed. Cambridge England:
Cambridge University Press,1988.
[17] Jana Proch´azkov´a, "Derivative of B-spline function", Konference O
Geometrii A Poˇcita ˇcov´e Grafice, 25.
[18] Jator, Samuel and Zachariah Sinkala,"A Higher Order B-spline
Collocation Method for Linear Boundary Value Problems",Applied
Mathematics and Computations,vol. 191,2007.

[19] J. Goh, A.A. Majid and A.I.M. Ismail (2010). "A Comparison of
Some Splines-Based Methods for the One-dimensional Heat Equation",
World Academy of Science, Engineering and Technology 70. pp.858-
861, Pinang, Malaysia.``

[20] J. Goh, A.A. Majid and A.I.M. Ismail (2012). "Cubic B-Spline
Collocation Method for One-dimensional Heat and Advection-Diffusion
Equations", World Academy of Science, Engineering and Technology,
Pinang, Malaysia.

[21] Kadalbajoo, M.K., Vikas Gupta and Ashish Awasthi. A Uniformly


Convergent B-spline Collocation Method on a Nonuniform Mesh for
Singularly Perturbed One-Dimensional Time-Dependant Linear
Convection-Diffusion Problem. Journal of Computational and Applied
Mathematics ,220 ,2008.

[22] K-L Chung, W-E Yan, (1994). A Fast Algorithm for Cubic B-spline
Curve Fitting, Computer & Graphics, Vol.18, No.3, pp.327-334

[23] Lin, Bin, Kaitai Li and Zhengxing Cheng," B-spline Solution of a


Singularly Perturbed Boundary Value Problem Arising in Biology",
Chaos, Solitons and Fractals ,42,2009.

[24] Magoon, Jason," Application of the B-spline Collocation Method to


a Geometrically Non-Linear Beam Problem",M.S.C.thesis, Rochester
Institute of Technology, Department of Mechanical Engineering,
Rochester, NY 14623,2010.
[25] M. Dosti and A. Nazemi (2011). "Septic B-spline Collocation
Method for Solving One-dimensional Hyperbolic Telegraph Equation",
International Journal of Engineering and Natural Sciences 5:3.

[26] N. Caglar, H. Caglar, and D.Dundar (2012). "B-spline Solution of


Linear Hyperbolic Partial Differential Equations", Istanbul Kultur
University.
[27] R. J. Cripps, (2007). "Quality Surface Construction", Journal of
Prime Research in Mathematics Vol. 3, 129-139.
[28] R.W. Johnson, M. D. Landon (1999). "A B-Spline-Based
Collocation Method to Approximate the Solutions to the Equations of
Fluid Dynamics", Proceedings of the: 3rd ASME/JSME Joint Fluids
Engineering Conference, July 18–23, San Francisco, California.

[29] T. Lyche and K. Morken, "Spline Methods".University of Oslo,


(2008).

[30] Timothy Irwin Mueller, PhD Thesis (1986). "Geometric Modelling


with Multivariate B-splines”, The University of Utah, Utah.

[31] V.Dabral, S.Kapoor S.Dhawan, (2011). "Numerical Simulation of


one dimensional Heat Equation: B-Spline Finite Element Method", Indian
Journal of Computer Science and Engineering (IJCSE),Vol.2 No.2

[32] Widjaja, Ronny, Andrew Ooi, Li Chen and Richard Manasseh,


"Computational Aeroacoustics Using the B-spline Collocation Method",
C. R.Mechanique 333,2005.

[33] Y. Gupta and P.K. Srivastava. (2011). "Application of B-Spline to


Numerical Solution of a System of Singularly Perturbed Problems",
Mathematica Aeterna, Vol. 1, No. 06, 405-415.
‫‪[34] J.L. Randall ,"Finite Difference Methods For Ordinary and Partial‬‬
‫‪Differential Equations", Society for Industrial and Applied‬‬
‫‪Mathematics, 2007‬‬

‫]‪ [35‬الدلفي ‪ ،‬حسن مجيد حسون ومشكور ‪ ،‬محمود عطا هللا ‪ ,,‬التحليل الهندسي‬
‫والعددي التطبيقي ‪ ،،‬الجامعة التكنولوجية ‪ ،‬بغداد ‪.(1999) ،‬‬
‫[‪ ]36‬ترجمة عطا هللا ثامر العاني ‪ ,,‬المعادالت التفاضلية الجزئية للكليات العلمية‬
‫والهندسية ‪ ،،‬جامعة بغداد ‪ ،‬بيت الحكمة‪. )3891( ،‬‬
‫املستخلص‬
‫واحد من بين مخططات السيطرة األقوى واألكثر تنوعا‬ ‫‪ -B‬سبالين‬ ‫يعد‬
‫في اندراج‬ ‫‪ -B‬سبالين‬ ‫لتصميم ونمذجة المنحنيات والسطوح و يمكن استخدام‬
‫البيانات الذي واحد من أهم مواضيعه وكذلك في حل المعادالت االعتيادية والجزئية‪.‬‬

‫إن األهداف الرئيسة لهذه الرسالة هي حل المعادلة التفاضلية الجزئية بطريقة ‪ -B‬سبالين‬
‫وتنفيذها في بعض التطبيقات‪ .‬فتناولت الرسالة نبذة مختصرة عن المعادالت الجزئية وحلها‬
‫بطريقة الفروق المنتهية‪ .‬وتناولت مفهوم ‪ -B‬سبالين و تتقصى خواص دواله األساسية‬
‫ومنحنياته ‪ .‬وقد أجرت الرسالة تحليالتها عن طريق حل معادالت كوكس‪ -‬دي بور ورسم‬
‫النتائج للدالة األساس في مختلف الدرجات وتكوين متجهات‪ U-‬كما اجرت التحليل في أنواع‬
‫منحنيات ‪ -B‬سبالين من خالل حل المعادالت ذات الصلة وعن طريق استخدام فرض لقيم‬
‫متجهات ‪ U-‬ونقاط السيطرة‪ .‬ولذلك فقد وردت النتائج بهيأة رسوم بيانية واستخدمت خوارزمية‬
‫دي بور في إنجاز هذه المهمة‪ .‬فبرزت فكرة من الدراسة تم تطبيقها لتوليد تصاميم منحنى عن‬
‫طريق التالعب بمواقع نقاط السيطرة‪.‬‬
‫واعتمدت طريقة تجميع ‪ –B‬سبالين بصورة تقريبية لحل مسائل القيمة الحدية للمعادالت‬
‫التفاضلية االعتيادية والجزئية‪ .‬ان حل المعادلة التفاضلية الجزئية يكمن مع الشروط الحدودية‬
‫واثنين من الشروط االبتدائية على شكل لوحة معدنية معينة بين ‪ 0‬و ‪ 3‬على ِكال المحورين‪ .‬وقد‬
‫تمت المقارنة مع طريقة الفروقات المحدودة لحل المعادالت التفاضلية االعتيادية والجزئية من‬
‫هو أقل من‬ ‫اجل المزيد من التحقق‪ .‬ومن خالل االمثلة لوحظ إن مقدار الخطأ في ‪ -B‬سبالين‬
‫طريقة الفروق المنتهية‪.‬‬
‫مجهورية الع اق‬

‫وزارة التعلي الع يل والبُث العلمي‬

‫ج معة الكرروفرة‬

‫كلية الرتِية للبن ت‬

‫إندراج ط يرة ‪ -B‬سبالي حلل‬


‫قرس ال ي ضير ت‬

‫املع دالت التف ضلية‬


‫رس ر ر لة‬

‫مُررردمة إىل جملس كليررة الرتِيررة للبن ر ت‪ /‬جر ر معة الكرروفة كجز م ر‬

‫متطلب ر ت ني ررل درجررة امل جستي ر يف علوم ال ي ضير ر ت‬

‫تردم هب‬

‫علي عبد احلسني إِ اهي زي رة‬

‫إشــــراف‬

‫ا‪.‬م‪.‬د‪ .‬ع دل حممد حس ال م حي‬

‫‪ 1434‬هـ‬ ‫‪ 2213‬م‬

‫‪View publication stats‬‬

You might also like