SlideShare a Scribd company logo
International Journal of Trend in Scientific Research and Development (IJTSRD)
Volume 3 Issue 5, August 2019 Available Online: www.ijtsrd.com e-ISSN: 2456 – 6470
@ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2266
Errors in the Discretized Solution of a Differential Equation
Wai Mar Lwin1, Khaing Khaing Wai2
1Faculty of Computing, 2Department of Information Technology Support and Maintenance
1,2University of Computer Studies, Mandalay, Myanmar
How to cite this paper: Wai Mar Lwin |
Khaing Khaing Wai "Errors in the
Discretized Solution of a Differential
Equation" Published
in International
Journal of Trend in
Scientific Research
and Development
(ijtsrd), ISSN: 2456-
6470, Volume-3 |
Issue-5, August
2019, pp.2266-2272,
https://doi.org/10.31142/ijtsrd27937
Copyright © 2019 by author(s) and
International Journal ofTrend inScientific
Research and Development Journal. This
is an Open Access article distributed
under the terms of
the Creative
Commons Attribution
License (CC BY 4.0)
(http://creativecommons.org/licenses/by
/4.0)
ABSTRACT
We study the error in the derivatives of an unknown function. We construct
the discretized problem. The local truncation and global errors are discussed.
The solution of discretized problem is constructed. The analytical and
discretized solutions are compared. The two solution graphs aredescribed by
using MATLAB software.
KEYWORDS: Differential Equations, MATLAB, Heat Equation
1. INTRODUCTION
1.1. Measuring Errors
In order to discuss the accuracy of a numerical solution, it is necessary to
choose a manner of measuring that error.Itmayseemobviouswhatis meant by
the error, but as we will see there are often many different ways tomeasurethe
error which can sometimes gives quite different impressions as totheaccuracy
of an approximate solution.
1.1.1. Errors in a Scalar Value
First we consider a problem in which the answer is a single value Rz .
Consider, for example, the scalar ODE
 )0()),(()( utuftu (1.1)
and suppose we aretrying to compute the solution at someparticular time T, so
z=u( T). Denote the computed solution by
zˆ . Then the error in this computed solution is
zzE  ˆ (1.2)
1.1.2. Absolute Error
A natural measure of this error would be the absolute value
of E,
zzE  ˆ (1.3)
This is called the absolute error in the approximation.
1.1.3. Relative Error
The error defined by
z
zz ˆ is called relative error.
1.1.4. “Big-oh” and “little-oh” notation
In discussing the rate of convergence of a numerical method
we use the notation )( p
O  , the so-called “big-oh”notation.If
)(f and )(g are two functions of  then we say that
))(()(  gOf  as 0 .
If there is some constant C such that C
g
f

)(
)(

 for all 
sufficiently small, or equivalently, if we can bound
)()(  gCf  for all  sufficiently small.
It is also sometimes convenient to use the “little-oh”
notation ))(()(  gOf  as 0 . This means that 0
)(
)(



g
f as
0 . This is slightly stronger than the previous statement,
and means that )(f decays to zero faster than )(g . If
))(()(  gof  then ))(()(  gOf  though theconversemay
not be true. Saying that )1()( of  simply means that the
0)( f as 0 .
Examples 1.1.1
)(2 23
 O as 0 , since 12
2
2
3
 

 for all
2
1
 .
)(2 23
 o as 0 , since 02  for all
2
1
 .
)()sin(  O as 0 ,since 

  ...
53
)sin(
53
for all
0 .
)()sin(  o as 0 , since   )(
)sin( 2



O
 .
1.1.5. Taylor Expansion
Each of the function values of u can be expanded in a Taylor
series about the point x, as e.g.,
)()(
6
1
)(
2
1
)()()( 432
 Oxuxuxuxuxu  (1.4)
)()(
6
1
)(
2
1
)()()( 432
 Oxuxuxuxuxu  (1.5)
1.2. Finite Difference Approximations
Our goal is to approximate solutions to differential equation,
i.e. to find a function (or some discrete approximation to this
function) which satisfies a given relationship between
IJTSRD27937
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2267
various of its derivatives on some given region of space and/
or time along with someboundaryconditionsalongtheedges
of this domain. A finite difference method proceeds by
replacing thederivativesinthedifferentialequationsbyfinite
difference approximations. This gives a large algebraic
system of equations to be solve in place of the differential
equation, something that is easily solved on a computer.
We first consider the more basic question of how we can
approximate the derivatives of a known function by finite
differenceformulas based only onvaluesofthefunctionitself
at discrete points. Besides providing a basis for the later
development of finite difference methods for solving
differential equations, this allows us to investigate several
key concepts such as the order of accuracy of an
approximation in the simplest possible setting.
Let u(x) represent a function of one variable that will always
be assumed to be smooth, defined bounded function over an
interval containing a particular point of interest x,
1.2.1. First Derivatives
Suppose wewant to approximate )(xu by a finitedifference
approximation based only onvalues of u at a finitenumberof
points near x. One choice would be to use



)()(
)(
xuxu
xu


)()(
2
1
)( 2
 Oxuxu  (1.6)
for some small values of . It is known as forward
difference approximation.
Another one-sided approximation would be



)()(
)(


xuxu
xu
)()(
2
1
)( 2
 Oxuxu  (1.7)
for two different points.It is known as backward difference
approximation.
Another possibility is to use the centered difference
approximation



2
)()(
)(0


xuxu
xu
)]()([
2
1
xuxu   
)(
6
1
)( 42
 Ouxu  (1.8)
1.2.2. Second Order Derivatives
The standard second order centered approximation is
given by
2
2 )()(2)(
)(





xuxuxu
xu (1.9)
)()(
12
1
)( 42
 Oxuxu 
)()( 2
Oxu 
1.2.3. Higher Order Derivatives
Finite difference approximations to higher order derivatives
can be obtained.
)]()(3)(3)2([
1
)( 3
2


  xuxuxuxuxu (1.10)
)()(
2
1
)( 2
 Oxuxu 
)()( Oxu 
The first one equation (1.10) is un-centered and first order
accurate:
)]2()(2)(2)2([
2
1
)( 30 

  xuxuxuxuxu (1.11)
)()(
4
1
)( 42
 Oxuxu 
)()( 2
Oxu 
This second equation (1.12) is second order accurate.
2. Comparison Of Analytical and Discretized Solution
Of Heat Equation
2.1 Solutions for the Heat Equation
2.1.1. Finite Difference Method
We will derive a finite difference approximation of the
following initial boundary value problem:
xxt uu  for 0),1,0(  tx
0),1(),0(  tutu for 0t (2.1)
)()0,( xfxu  for )1,0(x
Let 0n be a given integer, and define the grid spacinginthe
x-direction by
)1(
1


n
x 
The grid points in the x-direction are given by
j=xj for j=0,1,…,n+1. Similarly, we define tm=mh for
integers 0m , where th  denotes the time step. Then, we
let
m
jv denote an approximation of u(xj,tm). We have the
following
approximations
)(
),(),(
),( hO
h
txuhtxu
txut 

 (2.2)
and
)(
),(),(2),(
),( 2
2



O
txutxutxu
txuxx 

 (2.3)
These approximations motivate the following scheme:
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2268
2
11
1
2

m
j
m
j
m
j
m
j
m
j vvv
h
vv 




for j=1,…,n, 0m (2.4)
By using the boundary conditions of (2.1), we have
00 m
v and 01 
m
nv , for all 0m .
The scheme is initialized by
)(0
jj xfv 
, for j=1,…,n.
Let
2

h
r 
. Then the scheme can be rewritten in a more
convenient form
m
j
m
j
m
j
m
j rvvrrvv 11
1
)21( 


, j=1,…,n, 0m (2.5)
When the scheme is written in this form, we observe that the
values on the time level tm+1 are computed using only the
values on the previous time level tm and we have to solve a
tridiagonal system of linear equations.
2.1.2 Approximate Solution
The first step in our discretized problem is to derive a family
of particular solutions of the following problem:
2
11
1
2

m
j
m
j
m
j
m
j
m
j vvv
h
vv 




for j=1,…,n, 0m (2.6)
with the boundary conditions
00 m
v
and
01 
m
nv
, for all 0m . (2.7)
The initial data will be taken into account later. We seek
particular solutions of the form
mj
m
j TXv 
for j=1,…,n, 0m (2.8)
Here X is a vector of n components, independent of m, while
0}{ mmT is a sequence of real numbers. By inserting (2.8)
into (2.6), we get
2
111 2

mjmjmjmjmj TXTXTX
h
TXTX  


Since we are looking only for nonzero solutions, we assume
that
0mjTX
, and thus we obtain
j
jjj
m
mm
X
XXX
hT
TT
2
111
2





.
The left-hand side only depends on mandtheright-handside
only depends on j. Consequently, both expressions must be
equal to a common constant, say )(  , and we get the
following two difference equations:
j
jjj
X
XXX



 
2
11 2
, for j=1,…,n, (2.9)
m
mm
T
h
TT

1
for 0m . (2.10)
We also derive from the boundary condition (2.7) that
010  nXX (2.11)
We first consider the equation (2.10). We define T0=1 and
consider the difference equation
mm ThT )1(1  for 0m . (2.12)
Some iterations of (2.12)
mm ThT )1(1 
1
2
)1(  mTh
.
.
.
0
1
)1( Th m
 
1
)1( 
 m
h
Clearly indicate that the solution is
m
m hT )1(  for 0m . (2.13)
This fact is easily verified by induction on m. Next we turn
our attention to the problem (2.9) with boundary condition
(2.11). In fact this is equivalent to the eigenvalue problem.
Hence, weobtain thattheneigenvalues n ,...,, 21 aregiven
by
)cos(
22
22


 k
))cos(1(
2
2



)
2
(sin2
2 2
2



)
2
(sin2
4 2
2


 k
for n,...,1 (2.14)
and the corresponding eigenvectors
,),...,,( ,2,1,
n
nk RXXXX   n,...,1
have components given by
)sin(,  jX j 
)sin(, jj jxX  
, j=1,…,n.
It can be easily verified that
1,2,21,2,
121
 

 jjjj XXXAX 

))1(sin(
1
)sin(
2
))1(sin(
1
222






 jjj
)sin(
1
)sin(
2
))sin(
1
222






 jjj









)sin()cos()cos()sin(
)sin(2)sin()cos()cos()sin(1
2


 jj
jjj
))cos(1)(sin(
2
2


 j
))
2
(sin2)(sin(
2 2
2



j
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2269
)sin()
2
(sin
4 2
2



j
jX ,
Hence, we obtain particular solutions
m
jv ,
of the form
)sin()1(, j
mm
j xhv  
(2.15)
Wehavederivedafamilyofparticularsolutions
n
v 1}{  with
values
m
jv ,
at the grid point (xj,tm). Next, we observe that
any linear combination of particular solutions


n
vv
1

, (  is scalar)
is also a solution of (2.6) and (2.7). Finally, we determine the
coefficients {  } by using the initial condition
)(0
jj xfv 
, for j=1,…,n.
Since  Xv  at t=0 , we want to determine {  } such that
)(
1
, j
n
j xfX 

, for j=1,…,n. (2.16)
Hence, it follows from


n
jj xxf
1
)sin()(

 
h
n
jjhjsj xsxxfX 

1
sin,sin)(,

 
that


n
j
jj Xxf
1
,)(2  
for n,...,1
2.1.3. Exact Solution
To find a solution of the initial-boundaryvalueproblem(2.1),
assume that
)()(),( tTxXtxu  (2.17)
Using boundary conditions we get
X(0) = X(1) = 0
If we insert the (2.17) in the equation (2.1), we have
)(
)(
)(
)(
tT
tT
xX
xX 


(2.18)
Now we observe that the left hand side is a function of x ,
while the right hand side just depends on t. Hence, both have
to be equal to the same constant R  . This yields the
eigenvalue problem for x
XX  , X(0) = X(1) = 0 (2.19)
Nontrivial solutions only exist for special values of 
They are so-called the eigenfunctions. In this special case we
have the eigenvalues
2
)(  for ,.....2,1 (2.20)
with the eigenfunctions
)sin()( xxX   for ,.....2,1 (2.21)
Further,the solutionof TT 
isgivenby
t
etT
2
)(
)( 


 for
,.....2,1 (2.22)
Finally, weuse the superpositionprincipletoasolutiontothe
initial-boundary value problem (2.1), and we get




1
)()(),(

 xXtTctxu
)sin(),(
1
)( 2
xectxu t








The unknown coefficients can be determined from the initial
condition such that
)sin()(
1
xcxf 





(2.23)
The solution of the continuous problem is given by
)sin(),(
1
xectxu t










(2.24)
where
2
)(  fourier coefficient

1
0
)sin()(2 dxxxfc 
(2.25)
2.2. Comparison of Analytical and DiscretizedSolution
2.2.1. We want to comparethisanalyticalsolutionwith
the discretized solution given by


n
j
mm
j xhv
1
)sin()1(

 
(2.26)
where







2
sin
4 2
2



(2.27)
and


n
j
jj xxf
1
)sin()(2  
for n,...,1 (2.28)
In order to comparethe analytical and discretizedsolutionat
a grid point (xj,tm), we define
),( mj
m
j txuu 
, i.e,
)sin(
1
j
tm
j xecu m










(2.29)
Our aim is to prove
m
j
m
j uv 
under appropriateconditionsonthemeshparameters  and
h. To avoid technicalities, we consider a fixed grid point
(xj,tm) where
ttm  for t >0 independent of the mesh
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2270
parameters. Furthermore, we assumethattheinitialfunction
f is smooth and satisfies the boundary conditions, i.e. f(0)
=f(1) =0. Finally we assume that the mesh parameters h and
 are sufficiently small.
In order to compare
m
ju
and
m
jv
, we note that
)sin(),(
1
j
t
mj xectxu m










)sin()sin(
11
j
n
t
j
n
t
xecxec mm















Here we want to show that
0)sin(
1




j
n
t
xec m





(2.30)
Since f is smooth, it is also bounded and then the Fourier
coefficients c are bounded for all  .
Obviously, we have
1)sin( jx
and
)sin()sin(
11
j
n
t
j
n
t
xecxec mm
















1





1
)( 2
max
n
tm
ec




 




1
,
2
n
m
t
tteC



    


 




...
21 22 n
t
n
t
eeC 
   ...1
222
2
1
 

 tt
n
t
eeeC 
  t
n
t
e
eC 2
2
1
11







0 , for large value of n.
Since we have verified (2.30) it follow that
)sin(
1
j
n
tm
j xecu m








(2.31)
Now we want to compare the finite sums (2.26) and (2.31):


n
j
mm
j xhv
1
)sin()1(

 
Motivated by the derivation of the solutions, we try to
compare the two sums termwise. Thus wekeep  fixed,and
we want to compare
)sin( j
t
xec m



and
)sin()1( j
m
xh   
.
Sincethe sine part here is identical, itremainstocomparethe
Fourier coefficients c and  , andthetime-dependentterms
mt
e 
and
m
h )1(  .
2.2.2. Comparison of Fourier coefficient c and
coefficient 
Westart by consideringtheFouriercoefficients,andnotethat
 is a good approximation of c because

n
j
jj xxf
1
)sin()(2 
is the trapezoidal-rule approximation of

1
0
)sin()(2 dxxxf 
In fact we have
 

1
0 1
)sin()(2)sin()(2
n
j
jj xxfdxxxfc 
   
 
n
j
n
j
jjjjj xxfxxfxf
1 1
1 )sin()(2)sin()()(
2
2 

 

n
j
jjj xxfxf
1
)sin()()( 








n
j
jjjjj xxfxfxfxf
1
2
)sin()(...)(
2
)()( 


)sin(...)(
2
)(
1
3
2
j
n
j
jj xxfxf 

















n
j
jj xfxf
1
3
2
...)(
2
)(


)( 2
O , for f sufficiently smooth.
2.2.3 Comparison of the Terms
m
h )1(  and
mt
e 
We will compare the term
m
h )1(  approximates the term
mt
e 
, we simplify the problem a bit by choosing a fixed time
tm , say tm=1 and we assume that 2
2

h
. As a consequence,
we want to compare the terms

 
 e (2.32)
and
h
h
1
)1(    (2.33)
Since both  and  are very small for large values of  , it
is sufficient to compare them for small  . In order to
compare  and  for small values of  , we start by
recalling that
)()sin( 3
yOyy 
Thus, we get
2
2
5
5
2
3
3
2
...
!5
2
)(
!3
2
)(
2
2
2
sin2




































hh
hh


International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2271
 
22
42
2
...
!5
2
)(
!3
2
)(
1
2
2



























hh
h


 
2
2
2 h

, for h sufficiently small
h22

By using these facts, we derive
h
h
1
)1(   
h
h
1
2
2
)
2
(sin
4
1 








h
h
1
2
2
sin21
















 
h
h
1
22
)1(  
h
hh
hh
h
h
1
2222222
)(...)(
!2
1
11
)(
1
1  








h
h
h
1
2222222
)(...)(
2
1
1  


22

 e , for h sufficiently small

 e
  
This shows that also the time dependent term
mt
e 
is well
approximated by its discrete
m
h )1(  .
2.3 Consistency
Lemma 2.3.1.
The finite difference scheme (2.6) is consistentoforder(2,1).
Proof:
Local truncation error of the finite difference scheme (2.6) is
given by
 m
j
m
j
m
j
m
j
m
jm
j uuu
h
uu
l 112
1
2
1






 m
j
m
j
m
j
m
j
m
j
m
j uuu
h
uuhl 112
1
2 


























...),(
24
),(
6
),(
2
),(),(),(2...),(
24
),(
6
),(
2
),(),(
),(
...),(
6
),(
2
),(),(
432
4
32
2
32
mjxxxxmjxxxmjxx
mjxmjmjmjxxxx
mjxxxmjxxmjxmj
mj
mjtttmjttmjtmj
txutxutxu
txutxutxutxu
txutxutxutxu
h
txu
txu
h
txu
h
txhutxu














...),(
12
),(
...),(
2
),(
4
2
2
2
mjxxxxmjxx
mjttmjt
txutxu
h
txu
h
txhu



...),(
12
),(...),(
2
),(
2
 mjxxxxmjxxmjttmjt
m
j txutxutxu
h
txul

...),(
12
),(
2
),(),(
2
 mjxxxxmjttmjxxmjt txutxu
h
txutxu

...),(
12
),(
2
2
 mjxxxxmjtt txutxu
h 
),( 2
hO 
The finite difference scheme (2.6) is consistent of order
(2,1).
Example 2.3.1
Solve the IVP
xxt uu  for )1,0(x , t > 0
0),1(),0(  tutu for 0t (2.34)
)()0,( xfxu  for )1,0(x .
The exact solution is given by
xeu t

sin
2


Approximate solution and exact solution are
illustrated by 2.1.
Figure2.1: Comparison of Exact and Approximate
Solutions
MATLAB codes for Figure 2.1
N=100 ; x=zeros (N,1) ;
g= zeros (N,1) ;
v=zeros (N,N) ;
%delta x=h, delta t=p
%f (x)=cos (2*pi*x) ;
H=1/(N+1) ;
P=1/(N+1) ;
for j = 1:N
x ( j )=j*h ;
end
%for m=1:N
% t ( m )=m*p ;
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2272
%end
%gamma k
for k=1:N
sum=0 ;
for j=1:N
term=2*h*sin ( 2*pi*x ( j ))*sin (k*pi*x ( j ));
sum=sum+term ;
end
g ( k )=sum ;
end
%vk
for k=1 : N
for j = 1 : N
v ( k , j )=p*(4/h^2)*(sin(k*pi*h/2))^2)*sin(k*pi*x(j)) ;
end
v ( k , : ) ;
end
sum 1 =0 ;
for k= 1 : N
term1=g ( k ) . *v ( k , :) ;
sum1=sum1+term1 ;
s =sum1 ;
end
%%%Approximate solution
plot ( x , s , ‘ – ‘) ; hold on
%%%%%%Exact solution
Plot ( x ,-exp (-*pi^2*0.01 )*sin(pi*x) ) ;
3. CONCLUSION
The aim of this research paper describe the Errors between
Analytical solution and Discretized solution of Differential
equations.
4. REFERENCES
[1] R. J. LeVeque, Finite difference methods for differential
equations, Washington, 2006.
[2] J. W. Thomas, Numerical partial differential equation:
Finite difference methods, Springer-Verlag, New York,
1995.

More Related Content

PDF
Fixed Point Theorem of Compatible of Type (R) Using Implicit Relation in Fuzz...
PDF
Common fixed theorems for weakly compatible mappings via an
PDF
Two parameter entropy of uncertain variable
PDF
Stability analysis for nonlinear impulsive optimal control problems
PDF
Fixed Point Theorem in Fuzzy Metric Space
PDF
The Multivariate Gaussian Probability Distribution
PDF
Semicompatibility and fixed point theorem in fuzzy metric space using implici...
PDF
Approaches to the numerical solving of fuzzy
Fixed Point Theorem of Compatible of Type (R) Using Implicit Relation in Fuzz...
Common fixed theorems for weakly compatible mappings via an
Two parameter entropy of uncertain variable
Stability analysis for nonlinear impulsive optimal control problems
Fixed Point Theorem in Fuzzy Metric Space
The Multivariate Gaussian Probability Distribution
Semicompatibility and fixed point theorem in fuzzy metric space using implici...
Approaches to the numerical solving of fuzzy

What's hot (14)

PDF
Stereographic Circular Normal Moment Distribution
PDF
International Journal of Computational Engineering Research(IJCER)
PDF
Fixed points of contractive and Geraghty contraction mappings under the influ...
PDF
On fixed point theorem in fuzzy metric spaces
PDF
DISCRETIZATION OF A MATHEMATICAL MODEL FOR TUMOR-IMMUNE SYSTEM INTERACTION WI...
PDF
A generalized bernoulli sub-ODE Method and Its applications for nonlinear evo...
PDF
PDF
Conditional expectation on extended positive part of crossed
PDF
Simple Comparison of Convergence of GeneralIterations and Effect of Variation...
PDF
Solution homework2
PDF
Solution of second order nonlinear singular value problems
PDF
Some new exact Solutions for the nonlinear schrödinger equation
PDF
APPROXIMATE CONTROLLABILITY RESULTS FOR IMPULSIVE LINEAR FUZZY STOCHASTIC DIF...
Stereographic Circular Normal Moment Distribution
International Journal of Computational Engineering Research(IJCER)
Fixed points of contractive and Geraghty contraction mappings under the influ...
On fixed point theorem in fuzzy metric spaces
DISCRETIZATION OF A MATHEMATICAL MODEL FOR TUMOR-IMMUNE SYSTEM INTERACTION WI...
A generalized bernoulli sub-ODE Method and Its applications for nonlinear evo...
Conditional expectation on extended positive part of crossed
Simple Comparison of Convergence of GeneralIterations and Effect of Variation...
Solution homework2
Solution of second order nonlinear singular value problems
Some new exact Solutions for the nonlinear schrödinger equation
APPROXIMATE CONTROLLABILITY RESULTS FOR IMPULSIVE LINEAR FUZZY STOCHASTIC DIF...
Ad

Similar to Errors in the Discretized Solution of a Differential Equation (20)

PDF
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
PDF
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
PDF
Fitted Operator Finite Difference Method for Singularly Perturbed Parabolic C...
PDF
A current perspectives of corrected operator splitting (os) for systems
PDF
On estimating the integrated co volatility using
PDF
Numerical Solution of Stochastic Differential Equations in Finance
PDF
APPROXIMATE CONTROLLABILITY RESULTS FOR IMPULSIVE LINEAR FUZZY STOCHASTIC DIF...
PDF
Semicompatibility and fixed point theorem in fuzzy metric space using implici...
PDF
KAUST_talk_short.pdf
PDF
Axisymmetric finite element convergence results
PDF
A Tau Approach for Solving Fractional Diffusion Equations using Legendre-Cheb...
DOCX
stochastic notes
PDF
Am26242246
PDF
Existence of Solutions of Fractional Neutral Integrodifferential Equations wi...
PDF
Stochastic Schrödinger equations
PDF
A05920109
PDF
Complete l fuzzy metric spaces and common fixed point theorems
PDF
A common fixed point theorem in cone metric spaces
PDF
Problems and solutions statistical physics 1
PDF
On fixed point theorems in fuzzy 2 metric spaces and fuzzy 3-metric spaces
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
Fitted Operator Finite Difference Method for Singularly Perturbed Parabolic C...
A current perspectives of corrected operator splitting (os) for systems
On estimating the integrated co volatility using
Numerical Solution of Stochastic Differential Equations in Finance
APPROXIMATE CONTROLLABILITY RESULTS FOR IMPULSIVE LINEAR FUZZY STOCHASTIC DIF...
Semicompatibility and fixed point theorem in fuzzy metric space using implici...
KAUST_talk_short.pdf
Axisymmetric finite element convergence results
A Tau Approach for Solving Fractional Diffusion Equations using Legendre-Cheb...
stochastic notes
Am26242246
Existence of Solutions of Fractional Neutral Integrodifferential Equations wi...
Stochastic Schrödinger equations
A05920109
Complete l fuzzy metric spaces and common fixed point theorems
A common fixed point theorem in cone metric spaces
Problems and solutions statistical physics 1
On fixed point theorems in fuzzy 2 metric spaces and fuzzy 3-metric spaces
Ad

More from ijtsrd (20)

PDF
A Study of School Dropout in Rural Districts of Darjeeling and Its Causes
PDF
Pre extension Demonstration and Evaluation of Soybean Technologies in Fedis D...
PDF
Pre extension Demonstration and Evaluation of Potato Technologies in Selected...
PDF
Pre extension Demonstration and Evaluation of Animal Drawn Potato Digger in S...
PDF
Pre extension Demonstration and Evaluation of Drought Tolerant and Early Matu...
PDF
Pre extension Demonstration and Evaluation of Double Cropping Practice Legume...
PDF
Pre extension Demonstration and Evaluation of Common Bean Technology in Low L...
PDF
Enhancing Image Quality in Compression and Fading Channels A Wavelet Based Ap...
PDF
Manpower Training and Employee Performance in Mellienium Ltdawka, Anambra State
PDF
A Statistical Analysis on the Growth Rate of Selected Sectors of Nigerian Eco...
PDF
Automatic Accident Detection and Emergency Alert System using IoT
PDF
Corporate Social Responsibility Dimensions and Corporate Image of Selected Up...
PDF
The Role of Media in Tribal Health and Educational Progress of Odisha
PDF
Advancements and Future Trends in Advanced Quantum Algorithms A Prompt Scienc...
PDF
A Study on Seismic Analysis of High Rise Building with Mass Irregularities, T...
PDF
Descriptive Study to Assess the Knowledge of B.Sc. Interns Regarding Biomedic...
PDF
Performance of Grid Connected Solar PV Power Plant at Clear Sky Day
PDF
Vitiligo Treated Homoeopathically A Case Report
PDF
Vitiligo Treated Homoeopathically A Case Report
PDF
Uterine Fibroids Homoeopathic Perspectives
A Study of School Dropout in Rural Districts of Darjeeling and Its Causes
Pre extension Demonstration and Evaluation of Soybean Technologies in Fedis D...
Pre extension Demonstration and Evaluation of Potato Technologies in Selected...
Pre extension Demonstration and Evaluation of Animal Drawn Potato Digger in S...
Pre extension Demonstration and Evaluation of Drought Tolerant and Early Matu...
Pre extension Demonstration and Evaluation of Double Cropping Practice Legume...
Pre extension Demonstration and Evaluation of Common Bean Technology in Low L...
Enhancing Image Quality in Compression and Fading Channels A Wavelet Based Ap...
Manpower Training and Employee Performance in Mellienium Ltdawka, Anambra State
A Statistical Analysis on the Growth Rate of Selected Sectors of Nigerian Eco...
Automatic Accident Detection and Emergency Alert System using IoT
Corporate Social Responsibility Dimensions and Corporate Image of Selected Up...
The Role of Media in Tribal Health and Educational Progress of Odisha
Advancements and Future Trends in Advanced Quantum Algorithms A Prompt Scienc...
A Study on Seismic Analysis of High Rise Building with Mass Irregularities, T...
Descriptive Study to Assess the Knowledge of B.Sc. Interns Regarding Biomedic...
Performance of Grid Connected Solar PV Power Plant at Clear Sky Day
Vitiligo Treated Homoeopathically A Case Report
Vitiligo Treated Homoeopathically A Case Report
Uterine Fibroids Homoeopathic Perspectives

Recently uploaded (20)

PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Classroom Observation Tools for Teachers
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Cell Structure & Organelles in detailed.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
master seminar digital applications in india
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Pre independence Education in Inndia.pdf
PDF
Insiders guide to clinical Medicine.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Pharma ospi slides which help in ospi learning
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Classroom Observation Tools for Teachers
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Cell Structure & Organelles in detailed.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
FourierSeries-QuestionsWithAnswers(Part-A).pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Final Presentation General Medicine 03-08-2024.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
master seminar digital applications in india
TR - Agricultural Crops Production NC III.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Institutional Correction lecture only . . .
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pre independence Education in Inndia.pdf
Insiders guide to clinical Medicine.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx

Errors in the Discretized Solution of a Differential Equation

  • 1. International Journal of Trend in Scientific Research and Development (IJTSRD) Volume 3 Issue 5, August 2019 Available Online: www.ijtsrd.com e-ISSN: 2456 – 6470 @ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2266 Errors in the Discretized Solution of a Differential Equation Wai Mar Lwin1, Khaing Khaing Wai2 1Faculty of Computing, 2Department of Information Technology Support and Maintenance 1,2University of Computer Studies, Mandalay, Myanmar How to cite this paper: Wai Mar Lwin | Khaing Khaing Wai "Errors in the Discretized Solution of a Differential Equation" Published in International Journal of Trend in Scientific Research and Development (ijtsrd), ISSN: 2456- 6470, Volume-3 | Issue-5, August 2019, pp.2266-2272, https://doi.org/10.31142/ijtsrd27937 Copyright © 2019 by author(s) and International Journal ofTrend inScientific Research and Development Journal. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (CC BY 4.0) (http://creativecommons.org/licenses/by /4.0) ABSTRACT We study the error in the derivatives of an unknown function. We construct the discretized problem. The local truncation and global errors are discussed. The solution of discretized problem is constructed. The analytical and discretized solutions are compared. The two solution graphs aredescribed by using MATLAB software. KEYWORDS: Differential Equations, MATLAB, Heat Equation 1. INTRODUCTION 1.1. Measuring Errors In order to discuss the accuracy of a numerical solution, it is necessary to choose a manner of measuring that error.Itmayseemobviouswhatis meant by the error, but as we will see there are often many different ways tomeasurethe error which can sometimes gives quite different impressions as totheaccuracy of an approximate solution. 1.1.1. Errors in a Scalar Value First we consider a problem in which the answer is a single value Rz . Consider, for example, the scalar ODE  )0()),(()( utuftu (1.1) and suppose we aretrying to compute the solution at someparticular time T, so z=u( T). Denote the computed solution by zˆ . Then the error in this computed solution is zzE  ˆ (1.2) 1.1.2. Absolute Error A natural measure of this error would be the absolute value of E, zzE  ˆ (1.3) This is called the absolute error in the approximation. 1.1.3. Relative Error The error defined by z zz ˆ is called relative error. 1.1.4. “Big-oh” and “little-oh” notation In discussing the rate of convergence of a numerical method we use the notation )( p O  , the so-called “big-oh”notation.If )(f and )(g are two functions of  then we say that ))(()(  gOf  as 0 . If there is some constant C such that C g f  )( )(   for all  sufficiently small, or equivalently, if we can bound )()(  gCf  for all  sufficiently small. It is also sometimes convenient to use the “little-oh” notation ))(()(  gOf  as 0 . This means that 0 )( )(    g f as 0 . This is slightly stronger than the previous statement, and means that )(f decays to zero faster than )(g . If ))(()(  gof  then ))(()(  gOf  though theconversemay not be true. Saying that )1()( of  simply means that the 0)( f as 0 . Examples 1.1.1 )(2 23  O as 0 , since 12 2 2 3     for all 2 1  . )(2 23  o as 0 , since 02  for all 2 1  . )()sin(  O as 0 ,since     ... 53 )sin( 53 for all 0 . )()sin(  o as 0 , since   )( )sin( 2    O  . 1.1.5. Taylor Expansion Each of the function values of u can be expanded in a Taylor series about the point x, as e.g., )()( 6 1 )( 2 1 )()()( 432  Oxuxuxuxuxu  (1.4) )()( 6 1 )( 2 1 )()()( 432  Oxuxuxuxuxu  (1.5) 1.2. Finite Difference Approximations Our goal is to approximate solutions to differential equation, i.e. to find a function (or some discrete approximation to this function) which satisfies a given relationship between IJTSRD27937
  • 2. International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470 @ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2267 various of its derivatives on some given region of space and/ or time along with someboundaryconditionsalongtheedges of this domain. A finite difference method proceeds by replacing thederivativesinthedifferentialequationsbyfinite difference approximations. This gives a large algebraic system of equations to be solve in place of the differential equation, something that is easily solved on a computer. We first consider the more basic question of how we can approximate the derivatives of a known function by finite differenceformulas based only onvaluesofthefunctionitself at discrete points. Besides providing a basis for the later development of finite difference methods for solving differential equations, this allows us to investigate several key concepts such as the order of accuracy of an approximation in the simplest possible setting. Let u(x) represent a function of one variable that will always be assumed to be smooth, defined bounded function over an interval containing a particular point of interest x, 1.2.1. First Derivatives Suppose wewant to approximate )(xu by a finitedifference approximation based only onvalues of u at a finitenumberof points near x. One choice would be to use    )()( )( xuxu xu   )()( 2 1 )( 2  Oxuxu  (1.6) for some small values of . It is known as forward difference approximation. Another one-sided approximation would be    )()( )(   xuxu xu )()( 2 1 )( 2  Oxuxu  (1.7) for two different points.It is known as backward difference approximation. Another possibility is to use the centered difference approximation    2 )()( )(0   xuxu xu )]()([ 2 1 xuxu    )( 6 1 )( 42  Ouxu  (1.8) 1.2.2. Second Order Derivatives The standard second order centered approximation is given by 2 2 )()(2)( )(      xuxuxu xu (1.9) )()( 12 1 )( 42  Oxuxu  )()( 2 Oxu  1.2.3. Higher Order Derivatives Finite difference approximations to higher order derivatives can be obtained. )]()(3)(3)2([ 1 )( 3 2     xuxuxuxuxu (1.10) )()( 2 1 )( 2  Oxuxu  )()( Oxu  The first one equation (1.10) is un-centered and first order accurate: )]2()(2)(2)2([ 2 1 )( 30     xuxuxuxuxu (1.11) )()( 4 1 )( 42  Oxuxu  )()( 2 Oxu  This second equation (1.12) is second order accurate. 2. Comparison Of Analytical and Discretized Solution Of Heat Equation 2.1 Solutions for the Heat Equation 2.1.1. Finite Difference Method We will derive a finite difference approximation of the following initial boundary value problem: xxt uu  for 0),1,0(  tx 0),1(),0(  tutu for 0t (2.1) )()0,( xfxu  for )1,0(x Let 0n be a given integer, and define the grid spacinginthe x-direction by )1( 1   n x  The grid points in the x-direction are given by j=xj for j=0,1,…,n+1. Similarly, we define tm=mh for integers 0m , where th  denotes the time step. Then, we let m jv denote an approximation of u(xj,tm). We have the following approximations )( ),(),( ),( hO h txuhtxu txut    (2.2) and )( ),(),(2),( ),( 2 2    O txutxutxu txuxx    (2.3) These approximations motivate the following scheme:
  • 3. International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470 @ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2268 2 11 1 2  m j m j m j m j m j vvv h vv      for j=1,…,n, 0m (2.4) By using the boundary conditions of (2.1), we have 00 m v and 01  m nv , for all 0m . The scheme is initialized by )(0 jj xfv  , for j=1,…,n. Let 2  h r  . Then the scheme can be rewritten in a more convenient form m j m j m j m j rvvrrvv 11 1 )21(    , j=1,…,n, 0m (2.5) When the scheme is written in this form, we observe that the values on the time level tm+1 are computed using only the values on the previous time level tm and we have to solve a tridiagonal system of linear equations. 2.1.2 Approximate Solution The first step in our discretized problem is to derive a family of particular solutions of the following problem: 2 11 1 2  m j m j m j m j m j vvv h vv      for j=1,…,n, 0m (2.6) with the boundary conditions 00 m v and 01  m nv , for all 0m . (2.7) The initial data will be taken into account later. We seek particular solutions of the form mj m j TXv  for j=1,…,n, 0m (2.8) Here X is a vector of n components, independent of m, while 0}{ mmT is a sequence of real numbers. By inserting (2.8) into (2.6), we get 2 111 2  mjmjmjmjmj TXTXTX h TXTX     Since we are looking only for nonzero solutions, we assume that 0mjTX , and thus we obtain j jjj m mm X XXX hT TT 2 111 2      . The left-hand side only depends on mandtheright-handside only depends on j. Consequently, both expressions must be equal to a common constant, say )(  , and we get the following two difference equations: j jjj X XXX      2 11 2 , for j=1,…,n, (2.9) m mm T h TT  1 for 0m . (2.10) We also derive from the boundary condition (2.7) that 010  nXX (2.11) We first consider the equation (2.10). We define T0=1 and consider the difference equation mm ThT )1(1  for 0m . (2.12) Some iterations of (2.12) mm ThT )1(1  1 2 )1(  mTh . . . 0 1 )1( Th m   1 )1(   m h Clearly indicate that the solution is m m hT )1(  for 0m . (2.13) This fact is easily verified by induction on m. Next we turn our attention to the problem (2.9) with boundary condition (2.11). In fact this is equivalent to the eigenvalue problem. Hence, weobtain thattheneigenvalues n ,...,, 21 aregiven by )cos( 22 22    k ))cos(1( 2 2    ) 2 (sin2 2 2 2    ) 2 (sin2 4 2 2    k for n,...,1 (2.14) and the corresponding eigenvectors ,),...,,( ,2,1, n nk RXXXX   n,...,1 have components given by )sin(,  jX j  )sin(, jj jxX   , j=1,…,n. It can be easily verified that 1,2,21,2, 121     jjjj XXXAX   ))1(sin( 1 )sin( 2 ))1(sin( 1 222        jjj )sin( 1 )sin( 2 ))sin( 1 222        jjj          )sin()cos()cos()sin( )sin(2)sin()cos()cos()sin(1 2    jj jjj ))cos(1)(sin( 2 2    j )) 2 (sin2)(sin( 2 2 2    j
  • 4. International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470 @ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2269 )sin() 2 (sin 4 2 2    j jX , Hence, we obtain particular solutions m jv , of the form )sin()1(, j mm j xhv   (2.15) Wehavederivedafamilyofparticularsolutions n v 1}{  with values m jv , at the grid point (xj,tm). Next, we observe that any linear combination of particular solutions   n vv 1  , (  is scalar) is also a solution of (2.6) and (2.7). Finally, we determine the coefficients {  } by using the initial condition )(0 jj xfv  , for j=1,…,n. Since  Xv  at t=0 , we want to determine {  } such that )( 1 , j n j xfX   , for j=1,…,n. (2.16) Hence, it follows from   n jj xxf 1 )sin()(    h n jjhjsj xsxxfX   1 sin,sin)(,    that   n j jj Xxf 1 ,)(2   for n,...,1 2.1.3. Exact Solution To find a solution of the initial-boundaryvalueproblem(2.1), assume that )()(),( tTxXtxu  (2.17) Using boundary conditions we get X(0) = X(1) = 0 If we insert the (2.17) in the equation (2.1), we have )( )( )( )( tT tT xX xX    (2.18) Now we observe that the left hand side is a function of x , while the right hand side just depends on t. Hence, both have to be equal to the same constant R  . This yields the eigenvalue problem for x XX  , X(0) = X(1) = 0 (2.19) Nontrivial solutions only exist for special values of  They are so-called the eigenfunctions. In this special case we have the eigenvalues 2 )(  for ,.....2,1 (2.20) with the eigenfunctions )sin()( xxX   for ,.....2,1 (2.21) Further,the solutionof TT  isgivenby t etT 2 )( )(     for ,.....2,1 (2.22) Finally, weuse the superpositionprincipletoasolutiontothe initial-boundary value problem (2.1), and we get     1 )()(),(   xXtTctxu )sin(),( 1 )( 2 xectxu t         The unknown coefficients can be determined from the initial condition such that )sin()( 1 xcxf       (2.23) The solution of the continuous problem is given by )sin(),( 1 xectxu t           (2.24) where 2 )(  fourier coefficient  1 0 )sin()(2 dxxxfc  (2.25) 2.2. Comparison of Analytical and DiscretizedSolution 2.2.1. We want to comparethisanalyticalsolutionwith the discretized solution given by   n j mm j xhv 1 )sin()1(    (2.26) where        2 sin 4 2 2    (2.27) and   n j jj xxf 1 )sin()(2   for n,...,1 (2.28) In order to comparethe analytical and discretizedsolutionat a grid point (xj,tm), we define ),( mj m j txuu  , i.e, )sin( 1 j tm j xecu m           (2.29) Our aim is to prove m j m j uv  under appropriateconditionsonthemeshparameters  and h. To avoid technicalities, we consider a fixed grid point (xj,tm) where ttm  for t >0 independent of the mesh
  • 5. International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470 @ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2270 parameters. Furthermore, we assumethattheinitialfunction f is smooth and satisfies the boundary conditions, i.e. f(0) =f(1) =0. Finally we assume that the mesh parameters h and  are sufficiently small. In order to compare m ju and m jv , we note that )sin(),( 1 j t mj xectxu m           )sin()sin( 11 j n t j n t xecxec mm                Here we want to show that 0)sin( 1     j n t xec m      (2.30) Since f is smooth, it is also bounded and then the Fourier coefficients c are bounded for all  . Obviously, we have 1)sin( jx and )sin()sin( 11 j n t j n t xecxec mm                 1      1 )( 2 max n tm ec           1 , 2 n m t tteC                 ... 21 22 n t n t eeC     ...1 222 2 1     tt n t eeeC    t n t e eC 2 2 1 11        0 , for large value of n. Since we have verified (2.30) it follow that )sin( 1 j n tm j xecu m         (2.31) Now we want to compare the finite sums (2.26) and (2.31):   n j mm j xhv 1 )sin()1(    Motivated by the derivation of the solutions, we try to compare the two sums termwise. Thus wekeep  fixed,and we want to compare )sin( j t xec m    and )sin()1( j m xh    . Sincethe sine part here is identical, itremainstocomparethe Fourier coefficients c and  , andthetime-dependentterms mt e  and m h )1(  . 2.2.2. Comparison of Fourier coefficient c and coefficient  Westart by consideringtheFouriercoefficients,andnotethat  is a good approximation of c because  n j jj xxf 1 )sin()(2  is the trapezoidal-rule approximation of  1 0 )sin()(2 dxxxf  In fact we have    1 0 1 )sin()(2)sin()(2 n j jj xxfdxxxfc        n j n j jjjjj xxfxxfxf 1 1 1 )sin()(2)sin()()( 2 2      n j jjj xxfxf 1 )sin()()(          n j jjjjj xxfxfxfxf 1 2 )sin()(...)( 2 )()(    )sin(...)( 2 )( 1 3 2 j n j jj xxfxf                   n j jj xfxf 1 3 2 ...)( 2 )(   )( 2 O , for f sufficiently smooth. 2.2.3 Comparison of the Terms m h )1(  and mt e  We will compare the term m h )1(  approximates the term mt e  , we simplify the problem a bit by choosing a fixed time tm , say tm=1 and we assume that 2 2  h . As a consequence, we want to compare the terms     e (2.32) and h h 1 )1(    (2.33) Since both  and  are very small for large values of  , it is sufficient to compare them for small  . In order to compare  and  for small values of  , we start by recalling that )()sin( 3 yOyy  Thus, we get 2 2 5 5 2 3 3 2 ... !5 2 )( !3 2 )( 2 2 2 sin2                                     hh hh  
  • 6. International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470 @ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2271   22 42 2 ... !5 2 )( !3 2 )( 1 2 2                            hh h     2 2 2 h  , for h sufficiently small h22  By using these facts, we derive h h 1 )1(    h h 1 2 2 ) 2 (sin 4 1          h h 1 2 2 sin21                   h h 1 22 )1(   h hh hh h h 1 2222222 )(...)( !2 1 11 )( 1 1           h h h 1 2222222 )(...)( 2 1 1     22   e , for h sufficiently small   e    This shows that also the time dependent term mt e  is well approximated by its discrete m h )1(  . 2.3 Consistency Lemma 2.3.1. The finite difference scheme (2.6) is consistentoforder(2,1). Proof: Local truncation error of the finite difference scheme (2.6) is given by  m j m j m j m j m jm j uuu h uu l 112 1 2 1        m j m j m j m j m j m j uuu h uuhl 112 1 2                            ...),( 24 ),( 6 ),( 2 ),(),(),(2...),( 24 ),( 6 ),( 2 ),(),( ),( ...),( 6 ),( 2 ),(),( 432 4 32 2 32 mjxxxxmjxxxmjxx mjxmjmjmjxxxx mjxxxmjxxmjxmj mj mjtttmjttmjtmj txutxutxu txutxutxutxu txutxutxutxu h txu txu h txu h txhutxu               ...),( 12 ),( ...),( 2 ),( 4 2 2 2 mjxxxxmjxx mjttmjt txutxu h txu h txhu    ...),( 12 ),(...),( 2 ),( 2  mjxxxxmjxxmjttmjt m j txutxutxu h txul  ...),( 12 ),( 2 ),(),( 2  mjxxxxmjttmjxxmjt txutxu h txutxu  ...),( 12 ),( 2 2  mjxxxxmjtt txutxu h  ),( 2 hO  The finite difference scheme (2.6) is consistent of order (2,1). Example 2.3.1 Solve the IVP xxt uu  for )1,0(x , t > 0 0),1(),0(  tutu for 0t (2.34) )()0,( xfxu  for )1,0(x . The exact solution is given by xeu t  sin 2   Approximate solution and exact solution are illustrated by 2.1. Figure2.1: Comparison of Exact and Approximate Solutions MATLAB codes for Figure 2.1 N=100 ; x=zeros (N,1) ; g= zeros (N,1) ; v=zeros (N,N) ; %delta x=h, delta t=p %f (x)=cos (2*pi*x) ; H=1/(N+1) ; P=1/(N+1) ; for j = 1:N x ( j )=j*h ; end %for m=1:N % t ( m )=m*p ;
  • 7. International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470 @ IJTSRD | Unique Paper ID – IJTSRD27937 | Volume – 3 | Issue – 5 | July - August 2019 Page 2272 %end %gamma k for k=1:N sum=0 ; for j=1:N term=2*h*sin ( 2*pi*x ( j ))*sin (k*pi*x ( j )); sum=sum+term ; end g ( k )=sum ; end %vk for k=1 : N for j = 1 : N v ( k , j )=p*(4/h^2)*(sin(k*pi*h/2))^2)*sin(k*pi*x(j)) ; end v ( k , : ) ; end sum 1 =0 ; for k= 1 : N term1=g ( k ) . *v ( k , :) ; sum1=sum1+term1 ; s =sum1 ; end %%%Approximate solution plot ( x , s , ‘ – ‘) ; hold on %%%%%%Exact solution Plot ( x ,-exp (-*pi^2*0.01 )*sin(pi*x) ) ; 3. CONCLUSION The aim of this research paper describe the Errors between Analytical solution and Discretized solution of Differential equations. 4. REFERENCES [1] R. J. LeVeque, Finite difference methods for differential equations, Washington, 2006. [2] J. W. Thomas, Numerical partial differential equation: Finite difference methods, Springer-Verlag, New York, 1995.