Semi-Analytic Method For Solving High Order Ordinary Differential Equations With Initial Condition Luma. N. M. Tawfiq and Heba. A. Abd - Al-Razak Baghdad University , College of Education ( Ibn Al - Haitham ) , Department of Mathematics .
Abstract The aim of this paper is to present method for solution high order ordinary differential equations with initial condition using semi-analytic technique with constructing polynomial solutions. The original problem is concerned using two-point osculatory interpolation with the fit equal numbers of derivatives at the end points of an interval [0 , 1] and give example illustrate suggested method and accuracy, easily implemented . The accuracy of the method is confirmed by compared with conventional methods (Runga-Kutta (RK4), RK-Butcher ,Differential Transformation method (DTM) ) . The sensitivity of solutions high order ordinary differential equations with initial condition is discussed .
1. Introduction The ordinary differential equation (ODE) problems are encountered in many practical applications such as physics, engineering design, fluid dynamics and other scientific applications. The exact solutions of ODE are practically difficult due to its dynamical nature, so the need to approximate the solution arises. In this regard we have numerical algorithms like Euler , Improved Euler , Runge – kutta, Adams Bashforth ,Finite Difference [1] ,Differential Transform Methods ,shooting methods [2] and collocation method [3] . Today some of the most interesting methods are introduce in [4]. Since in various application use the analytic and approximation methods together so, these methods is said to be a semi-analytic method. In 2003, R.E.Grundy investigate the feasibility of using Hermite interpolation as a practical tool for constructing polynomial approximations to initial -boundary value problems for partial differential equations, also in 2005[5] he examine the feasibility of using two points Hermite interpolation as a systematic tool in the analysis of initial-boundary value problems for nonlinear diffusion equations. In 2006 R.E.Grundy analyses initial - boundary value problems involving nonlocal nonlinearities using two points Hermite interpolation, also, in 2006 show how two-points Hermite interpolation can be used to construct polynomial representations of solutions to some initial-boundary value problems for the inviscid Proudman-Johnson equation. In 2009, Mohammed [6] investigate the feasibility of using osculatory interpolation to solve two points second order boundary value problems .
1
In this paper a semi-analytic method used which mixed the analytic and approximation methods for constructing polynomial solutions of high order ordinary differential equations with initial condition using two-points osculatory interpolation, in the present paper we concentrate on the development of the application to ordinary differential equations with the advent of modern symbolic computational facilities it has become possible to implement many techniques which were hitherto computationally and algebraically inaccessible. Thus an important feature of the paper is the use of the symbolic computational package MATLAB in the process of implementation together with its IVP and BVP library codes as a checking device. The main purpose is to demonstrate the general superiority of our preferred method vis-à-vis conventional methods. We note that Grundy in 2005[5] say such methods by semi-analytic method since, solving the problems by analytic method but the solution of problems contain the error : truncation error ( local truncation error mean error made in advancing one step ,and global truncation error mean maximum error in the interval [a ,b] ) and rounding error .
2. Interpolation Theory In this paper, we shall consider the interpolatory approximation .From Weierstrass Approximation Theorem[7] ,it follows that one can always find a polynomial that is arbitrarily close to a given function on some finite interval. This means that the approximation error is bounded and can be reduced by the choice of the adequate polynomial. Unfortunately Weierstrass Approximation Theorem is not a constructive one, i.e. it does not present a way how to obtain such a polynomial. i.e. the interpolation problem can also be formulated in another way, viz. as the answer to the following question: How to find a .good. representative of a function that is not known explicitly, but only at some points of the domain of interest .In this paper we use Osculatory Interpolation since has high order with the same given points in the domain .
2.1. Osculatory Interpolation [7] Given the data {xi}, i = 0,1, . . .,n and values fi(0), . . . , fi(mi ) ,where mi are nonnegative integers and fi = f(xi ).We want to construct a polynomial P(x) such that : P(j)(xi) = fi(j)
……………
For each i = 0, 1, . . . , n and j = 0, . . . , mi .
2
(1)
i.e. the osculating polynomial approximating a function f Cm [a , b], where m = max {m0 , m1 , … , mn } and xi [a , b], for each i = 0, 1, . . . , n . Such a polynomial is said to be an osculatory interpolating polynomial of a function f . Remark [7] n
The degree of P(x) is at most M =
m i 1
n
conditions to be satisfied is
m i 1
i
i
n , since the number of
(n + 1), and a polynomial of degree M has M + 1
coefficients that can be used to satisfy these conditions . There exist various form for osculatory interpolation , but all of these differed only in formula ,the following theorem illustrate this : Theorem 1 [8] ,[ 9] Given the nodes {xi}, i = 0, . . . , n and values { fi(j) } , j = 0, . . . , mi , there exists a unique polynomial satisfying ( 1 ). In this paper we use two-point osculatory interpolation [10]. The idea is to approximate a function y(x) by a polynomial P(x) in which values of y(x) and any number of its derivatives at given points are fitted by the corresponding function values and derivatives of P(x) ,we are particularly concerned with fitting function values and derivatives at the two end points of a finite interval, say [0 , 1] , a useful and succinct way of writing osculatory interpolant P2n+1(x) of degree 2n + 1 was given for example by Phillips [11] as : n
P2n+1(x) =
j 0
{ y ( j ) (0) q j (x) + (-1)
n s s
j
y ( j ) (1) q j (1-x) }
………….(2)
n j
q j (x) = ( x j / j!)(1-x) n 1
xs = Q j (x) / j!
...………..( 3)
s 0
so that ( 2 ) with ( 3 ) satisfies : ( j)
( j)
y ( j ) (0) = P2 n 1 (0) , y ( j ) (1) = P2 n 1 (1) ,
3
j = 0, 1, 2,…, n .
implying that P2n+1(x) agrees with the appropriately truncated Taylor series for y(x) about x = 0 and x = 1. The error on [0, 1] is given by : R2n+1 = y(x)-P2n+1(x) = ( 2 n 2)
(1) n 1 x ( n 1) (1 x) n 1 y ( 2 n 2 ) ( ) where ε (0, 1) and y ( 2n 2)!
is assumed to be continuous. The osculatory interpolant for P2n+1(x) may converge to y(x) in [0 , 1]
irrespective of whether the intervals of convergence of the constituent series intersect or are disjoint .The important consideration here is whether R 2n+1 → 0 as n→ ∞ for all x in [0 ,1]. We observe that (2) fits an equal number of derivatives at each end point but it is possible and indeed sometimes desirable to use polynomials which fit different numbers of derivatives at the end points of an interval . Finally we observe that ( 2 ) can be written directly in terms of the Taylor coefficients ai and bi about x = 0 and x = 1 respectively, as : n
P2n+1(x) =
j 0
{ a j Q j (x) + (-1) j b j Q j (1-x) } ….
(4)
3. Solution Of Higher-Order Equation With Initial Condition A general mth-order initial value problem : y(m) = f( x , y, y', y", ... , y(m-1) ) , a x b
……(5)
With initial conditions : y (a ) 1 , y ( a ) 2 ,..., y ( m1) ( a ) m
………. (6)
The system of m first-order differential equations ( meaning that only the first derivative of y appears in the equation and no higher derivatives ) have the form : y'1 = f1 ( x , y1 , …, ym ) y'2 = f2 ( x , y1 , …, ym ) . . y'm = fm( x, y1, y2, …, ym ) (7 a) with initial conditions : y1(a) = α1 , y2(a) = α2 , … , ym(a) = αm
…….(7b)
It is easy to see that (7) can represent either an mth-order differential equation, a system of equations of mixed order but with total order of m , or system of m first -order equations. This section contains an introduction to the semi - analytic solution of higher-order differential equations subject to initial conditions (equations (5) and (6) ) The techniques we discuss are limited to those that transform a higher-order equation 4
into system of first-order differential equations in the form equation (7) . The object is to find m functions y1, … ,ym that satisfy each of the differential equations together with all the initial conditions . New techniques are not required for solving these problems ; by relabeling the variables, can reduce a higher-order differential equation into a system of first-order differential equations and then apply semi-analytic technique . A general mth-order initial value problem (5) with initial conditions (6) can be converted into a system of equations in form ( 7 ) by the following : ( m 1) ( x ) . This produces the Let u1 ( x ) y ( x ), u 2 ( x ) y ' ( x ),..., and u m ( x) y
first-order system : du1 dy u2 dx dx du 2 dy ' u3 dx dx du m 1 dy ( m 2 ) um dx dx
And du m dy ( m 1) y ( m ) f ( x, y , y ' ,..., y ( m 1) ) f ( x, u1 , u 2 ,..., u m ), dx dx
With initial conditions : u1 (a) y (a) 1 , u 2 (a) y ' (a) 2 ,..., u m (a ) y ( m 1) (a) m
then solving by apply semi-analytic technique as the following : first we discuss the method where m = 2 , i.e. : y1' = dy1 / dx = f1( x, y1, y2 ) y2' = dy2 / dx = f2( x, y1, y2 ) ,
……..
( 8a )
For 0 x 1 , with the initial conditions : y1(0) = a0 , y2(0) = b0 ,
…….
( 8b )
where fi , i = 1, 2 are in general nonlinear functions of their arguments . The simple idea behind the use of two-point polynomials is to replace y(x) in problem ( 8a ) – ( 8b ), or an alternative formulation of it, by P 2n+1 which enables any unknown derivatives of y(x) to be computed . The first step therefore is to construct the P2n+1 . To do this we need the Taylor coefficients of y 1(x) and y2(x) respectively about x = 0 :
5
y1 = a 0 + a 1 x +
y2 = b 0 + b 1 x +
ai xi
….….
( 9a )
bi xi
……..
( 9b )
i 2
i 2
where y1(0) = a0 , y1'(0) = a1 , … , y1(i)(0) / i! = ai , i = 2, 3, …… and y2(0) = b0 , y2'(0) = b1 , … , y2(i)(0) / i! = bi , i = 2, 3, …… then insert the series forms (9a) and (9b) respectively into (8a) and equate coefficients of powers of x . Also ,we need Taylor coefficients of y1(x) and y2(x) about x = 1, respectively :
y1 = c 0 + c 1 (x-1) +
y2 = d 0 + d 1 (x-1) +
i 2
ci (x-1)i
……..
( 10a )
di (x-1)i
……..
( 10b )
i 2
where y1(1) = c0 , y1'(1) = c1 , … , y1(i)(1) / i! = ci , i = 2, 3, …… and y2(1) = d0 , y2'(1) = d1 , … , y2(i)(1) / i! = di , i = 2, 3, …… then insert the series forms (10a) and (10b) respectively into (8a) and equate coefficients of powers of ( x – 1 ) . The resulting system of equations can be solved using MATLAB version 7.9 to obtain ai , bi , ci and di for all i ≥ 2, we see that ciۥs and diۥs coefficients depend on indicated unknowns c0 and d0 . The algebraic manipulations needed for this process .We are now in a position to ~
construct a P2n+1(x) and 2 n1 (x) from (9) and (10) of the form ( 2) by the following : n
P2n+1(x) =
{ ai Qi(x) + (-1)i ci Qi(1-x) }
i 0
………….(11a)
and ~ 2 n1 (x) =
n
{ bi Qi(x) + (-1)i di Qi(1-x) } …………(11b)
i 0
Where Qi(x) defined in ( 3 ) , We see that ( 11 ) have only two unknowns c0 and d0 . Now, integrate equation ( 8a ) to obtain : 1
c0 – a0 =
f1( x, y1, y2 ) dx
……….
(12a)
0
1
d0 – b0 =
f2( x, y1, y2 ) dx
……….
0
6
(12b)
~ use P2n+1 and 2 n 1 as a replacement of y1 and y2 respectively in ( 12 ) .
Since we have only the two unknowns c 0 and d0 to compute for any n we only need to generate two equations from this procedure as two equations are already supplied by (12) and initial condition (8b). Then solve this system of algebraic equations using MATLAB version 7.9 to obtain c 0 and d0 ,so insert it into (11) thus (11) represent the solution of (8) . Extensive computations have shown that this generally provides a more accurate polynomial representation for a given n . Use the same manner to solve in general the system of more than two equation . Now consider the following example illustrate suggested method where the results are presented in tables and figures for comparison solutions and errors between P9 and exact, also, between P9 , exact , RK4 , RK- Butcher , DTM ( Differential Transformation method ) to assign the effectiveness and accuracy of the suggested method .
Example Consider the following I.V.P of 4 rth order linear ODE's : y y ' ' ( x) y ( x) exp( x)( x 3) , 0 ≤ x ≤ 1 , with I .C's : y(0) = 1, y'(0) = 0 , y (0) = -1 , y(0) = -2 The exact solution given in [12 ] : y = (1-x) exp(x) Rewrite the four order IVP as a system of first order differential equations : ( 4)
y'1 = y2 y1(0) = 1 y'2 = y3 y2(0) = 0 y'3 = y4 y3(0) = -1 y'4 = y3 + y1 + ex ( x – 3 ) y4(0) = -2 Then from equations (5) and (6) , we have : P9 = –0.0000392857 x9 – 0.00013532401 x8 –0.0012310308 x7– 0.0069233067 x6 – 0.03333772256 x5 – 0.125 x4 – 0.33333333335 x3 – 0.5 x2 + 1.0 ~ P 9 = –0.000043892 x9 – 0.0001560564 x8 –0.0014337298 x7 –0.0083099704 x6 –0.0416715166 x5 – 0.1666666667 x4 – 0.5 x3 – 1.0 x2 – 1.0 x T9 = –0.000048499 x9– 0.0001767843x8 –0.00163644324 x7– 0.00969661557 x6 – 0.0500053193x5 – 0.2083333333 x4 – 0.66666666667 x3 – 1.5 x2 – 2.0 x –1.0 ~ 9 8 7 6 T 9 = –0.0000531926 x –0.000197125 x – 0.00183981549 x – 0.0110827546 x 5 4 3 2 – 0.0583392712 x – 0.25 x – 0.833333333 x – 2.0 x – 3.0 x – 2.0 The results for n = 4 are presented in table ( 1 ) ,figures for comparison solutions : errors between P9 and exact given in figure (1) and between P9 , exact , RK4 , RK-Butcher and DTM given in figure (2) to assign the effectiveness and accuracy . 7
Results are summarized in table (2) that represents the comparison between solution and errors for using the above methods where, the results of each other methods are given in [12 ] . Table 1 : The result of the method for n = 4 of example ~ P 9
P9
T9
~ T 9
b10
-0.00000000309880672
--0.00000000309880672
-0.00000000309880672
-0.0000000030988
b20 b30 b40 X
-2.718281832018528
-2.718281832018528
-2.718281832018528
-2.7182818320185
-5.436563661441717
-5.436563661441717
-5.436563661441717
-5.4365636614417
-8.154845491722615
-8.154845491722615
-8.154845491722615
-8.1548454917226
Y1:exaxt
T9
~ T
0.1
0.9946538
0.994653826241637
-0.110517091836780
-1.21568800991527
-2.3208589279
0.2
0.9771222
0.977122206046732
-0.244280552163793
-1.46568331037614
-2.6870860686
0.3
0.9449012
0.944901163365262
-0.404957644413171
-1.75481645220224
-3.1046752601
0.4
0.8950948
0.895094814618110
-0.596729883437111
-2.08855458152660
-3.5803792799
0.5
0.8243606
0.824360630068972
-0.824360641182930
-2.47308191251370
-4.1218031843
0.6
0.7288475
0.728847515080301
-1.09327128584539
-2.91539008691674
-4.7375088887
0.7
0.6041257
0.604125808368537
-1.40962689952503
-3.42337960764866
-5.4371323167
0.8
0.4451081
0.445108182787217
-1.78043274605366
-4.00597367521804
-6.2315146053
0.9
0.2459601
0.245960308323947
-2.21364280320798
-4.67324591515718
-7.1328490280
~ P 9
P9
The solution at n=2
1
y1 P9
0.9
0.8
y
0.7 0.6 0.5 0.4 0.3 0.2 0.1
0.2
0.3
0.4
0.5 x
0.6
0.7
0.8
0.9
Figure 1 : Comparison between the exact solution y1 and the solution obtained from semi-analytic method p9 .
Table 2 : A comparison between semi-analytic method P9 and other methods .
Xi
Y1:exact
RK4 solution
RK_Butcher 8
DTM solution
P9 by using
9
solution 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
0.9946538 0.9771222 0.9449012 0.8950948 0.8243606 0.7288475 0.6041257 0.4451081 0.2459601
0.9946542 0.977123 0.9449024 0.8950967 0.8243633 0.7288511 0.6041306 0.4451143 0.2459681
Xi
Y1:exact
RK4 error
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
0.9946538 0.9771222 0.9449012 0.8950948 0.8243606 0.7288475 0.6041257 0.4451081 0.2459601
3.576E-07 7.748E-07 1.251E-06 1.907E06 2.682E0-6 3.635E-06 4.827E-06 6.258E-06 8.016E-06
1
Osculatory 0.9946536 0.9771218 0.9449 0.895093 0.8243582 0.7288443 0.6041222 0.4451046 0.2459573
RK-Butcher error
DTM error
4.351E-06 1.788139 E-07 6.967E-05 4.172325 E-07 3.592E-04 1.132488 E-06 1.158E-03 1.8477 44E-06 2.890E-03 2.384186 E-06 6.126 E-03 3.159046 E-06 1.160 E-02 3.516674 E-06 2.026 E-02 4.457069 E-06 3.322 E-02 2.846122 E-06 S.S.E1=6.540886821358780e-014
The solution at n=4 y1 P9 RK4 RKB DTM
0.9 0.8
2
P9 by using Osculatory error 2.624163697451110e-008 6.046731892972446e-009 3.663473802095751e-008 1.461811005576408e-008 3.006897197899150e-008 1.508030100794144e-008 1.083685370328880e-007 8.278721697063673e-008 2.0832394001524e-007
The solution at n=4 T9 RK4 ABM
3
4
0.7 0.6
y
y
0.994653826241637 0.977122206046732 0.944901163365262 0.895094814618110 0.824360630068972 0.728847515080301 0.604125808368537 0.445108182787217 0.245960308323947
0.9946581 0.9771916 0.94526 0.8962532 0.8272503 0.7349727 0.6157312 0.4653665 0.279182
0.5
5
6
0.4 7
0.3 0.2 0
0.5 x
8 0
1
0.5 x
Figure 2 : Comparison between different methods
4. Sensitivity Of Solution To The Data
9
1
In our study of IVP (5), we have been guided by the four questions : Does IVP (5) have any solution ? how many ? What are they ? How do solutions respond to changes in the data ? If the function f and f / y are continuous in some region R in the xy-plane and ( x o , y o ) is a point of R , we gave satisfactory answers to the first, second, and third questions . In this section we show that these same simple conditions on the data also lead to a satisfactory answer to the last question . Loosely phrased, the question amounts to this: Is it always possible to find bands on the determination of the data
f (x,
y) and y0 in IVP (5) which will guarantee that
the corresponding solution will be within prescribed error bounds over a given xinterval ? If this question can be answered in the affirmative, one consequence is that any “ small ” enough change in the data of an IVP produces only a “small ” change in the solution . In addressing the last question, it would be extremely helpful to have a formula for the solution of IVP (5) in which the data appear explicitly . But for general nonlinear differential equations, there rarely is a solution formula for IVP(5) in which the data appear explicitly . To estimate the change in the solution to IVP(5)as the data
f (x
,y) and y0 are
modified, we give the following theorem about perturbation estimate :
Theorem 2 [13] Let the function f in IVP(5) be continuous with f / y in a rectangle R described by the inequalities : x 0 x x 0 a, y y 0 b .
Suppose that g ( x, y ) and g ( x, y ) / y are also continuous functions on R and that on some common interval : x0 x x0 C , which C a , the solution y(x) of IVP(5) and the solution y(x) of the “ perturbed ” IVP : y ' f ( x, y ) g ( x, y ), y ( x 0 ) ~ y0
…. (13)
Both have solution curves which lie in R, then we have the estimate : y ( x) ~ y ( x) y 0 ~ y 0 e L ( x x0 )
M L ( x x0 ) e 1 , x0 x x0 C … (14) L
Where L and M are any numbers such that :
10
M g ( x, y ) , L
f , all ( x, y ) in R y
Now, in a position to answer that last of the basic questions , we give the following theorem about continuity in the data .
Theorem 3 [13] let f , f / y ,g and g / y be continuous functions of x and y on the rectangle R defined by :
x0 x x0 a, y y0 b.
Let ε > 0 be a given error tolerance. Then there exist positive constants H b and C
a such that the respective solution y(x) and
~ y (x)
of the system of IVP :
( a ) y f ( x, y ) , y ( xo ) y0 .......... (3.6) …………(15) (b) y f ( x, y ) g ( x, y ) y ( x0 ) ~ yo Satisfy the inequality : y ( x) ~ y ( x ) , x0 x x0 c ....(3.7) …………(16)
y o for which For any choice of ~
yo ~ yo H
5. Conclusions A remarkable advantage of the semi-analytic technique for solving high order ordinary IVP is that it is easily implemented and gives a result with high accuracy. The high accuracy of the method is confirmed by example and the suggested method compared with conventional methods via example and is shown to be that seems to converge faster and more accurately than the conventional methods . Another advantage of suggested method is that it gives the approximate solution on the continuous finite domain whereas other numerical techniques provide the solution on discrete only.
References [1] D. Houcque , 2006 , Ordinary Differential Equations , Northwestern University. [2] R. Bronson, 2003 , Differential Equations, Second Edition .
11
[3] A. Junaid, M. A. Z. Raja, and I. M. Qureshi ,"Evolutionary Computing Approach for the Solution of Initial value Problems in Ordinary differential Equations", World Academy of Science, Engineering and Technology J. , 55, 2009 . [4] A. Dhurandhar and A. Dobra , "Semi-Analytical Method for Analyzing Models and Model Selection Measures Based on Moment Analysis", TKDD0301-02 ACMTRANSACTION on Knowledge Discovery from Data, University of Florida,Vol. 3, No.1, 2009. [5] R. E. Grundy , "The application of Hermite interpolation to the analysis of non-linear diffusive initial-boundary value problems", IMA Journal of Applied Mathematics 70, pp.814-838, 2005. [6] K.M. Mohammed , "On Solution of Two Point Second Order Boundary Value Problems By using Semi-Analytic Method" ,M.Sc. thesis , University of Baghdad , College of Education – Ibn – Al- Haitham , 2009 . [7]
L. R. Burden and J. D. Faires , 2001, Numerical Analysis , Seventh Edition .
[8] J. Fiala , 2008, An algorithm for Hermite - Birkhoff interpolation, Applications of Mathematics ,Vol.18, No.3, pp.167-175 . [9] B. Shekhtman, 2005, Case Study in bivariate Hermite interpolation , Journal of Approximation Theory , Vol.136 , pp.140-150 . [10] V. Girault and L. R. Scott, 2002, Hermite Interpolation of Non smooth Functions Preserving Boundary Conditions, Mathematics of Computation, Vol.71, No.239 , pp.1043-1074 . [11] G .M.Phillips , 1973, Explicit forms for certain Hermite approximations, BIT 13 , pp. 177-180 . A. J. Mohamad - Jawad , 2010, Reliability and Effectiveness of the Differential [12] Transformation Method for Solving Linear and Non-Linear Fourth Order IVP, Eng.& . Tech. Journal ,Vol. 28 , No. 1 [13] L.B. Robert and S. C. Courtney ,"Differential Equations A Modeling perspective" , United States of America , 1996 .
الطريقة شـــبه التحـلـيلية لحــــل المعادلت التفاضلية الـعـتيادية ذات الرتب العالية مع الشروط البتدائية 12
أ.م.د .لمـى ناجـي محـمـد توفـيق و هـبة عـواد عبد الرزاق المسـتخلص الهدف من هذا البحث عرض طريقة لحل معادل ت تفاضلية اعتيادية ذا ت رتب عالية لمسائل القيم التبتدائية تباستخدام التقنية شبه التحليلية مع تكوين الحل كمتعددة حدود ,أصل المسالة يتعلق تباستخدام الدندراج التماسي ذو النقطتين والذي يتفق مع الدالة ومشتقاتها عند دنقطتي دنهاية الفترة ][1 , 0 المعرفة عليها . كذلك تم مناقشة التحسس للمعادل ت التفاضلية العتيادية .
13
14