Solution of Some Second Order Ordinary Differential Equations Using a Derived Algorithm ()
1. Introduction
Numerical methods are methods that are constructed through a given interval. The methods start with an initial point and then take a short step forward in time to find the next solution point. The process then continues with subsequent steps to map out the solution. There are two main numerical methods of solving initial value problems of ordinary differential equations. They are single step methods, also known as one step method and multistep methods. The single-step methods are the method that uses information about the solution at one point xn, to advance it to the next point xn+1. The single step methods have certain advantages which include, being self-starting and having the flexibility to change step size from one step to the next.
Various numerical methods have been developed for the solution of some initial value problems of ordinary differential equations. Some of the numerical analysts who have worked extensively on the development on numerical methods are: [1] [2] [3] [4] [5] . Development of a scheme for solving some initial value problem of ordinary differential equations with a particular basis function was carried out by [1] which was improved upon by [2] for solving related problems. [4] and [5] worked extensively in other to improve upon schemes developed by [1] and [2] and better methods were produced. The efficiency of all these contributed efforts in numerical analysis had been measured and tested for their stability, accuracy, convergence and consistency properties [6] [7] [8] . The accuracy properties of different methods are usually compared by considering the order of convergence as well as the truncation error coefficients of the various methods. Research has shown that for a method to be suitable for solving any sets of initial value problems (ivps) in ordinary differential equations (ODEs), it must have all the mentioned characteristics.
Recently [9] developed a scheme in which standard finite difference schemes were developed. Similarly, [4] also worked on some approximation techniques which were used to derive qualitatively stable non-standard finite difference schemes.
In this paper, a new one-step numerical method is developed with the above mentioned characteristics in mind to solve some initial value problems of ordinary differential equations which were based on the local representation of the theoretical solution to initial value problem of the form
In the interval
by interpolating function
,
and b are real undetermined coefficients and
are complex parameters. But in this paper, we shall be using the same assumptions but different interpolating functions such as:
, where
and b are real undetermined coefficients and
are complex parameters.
2. Methodogy
Considering an interpolating function:
(1)
where
and b are real undetermined coefficients and
are complex parameters.
Since k and μ are complex parameters, then we have:
(2)
Also,
, where
, therefore putting this together with (2) in (1), we have the Interpolating function to be:
(3)
Let us define
and
as follows:
(4)
Putting (4) in (3), we have:
(5)
By assumption,
is a numerical estimate to the theoretical solution
and also
. Let our mesh points (self length) be define as follows:
(6)
Imposing the following constraints on the interpolating function (5), we have:
1) The interpolating function must coincide with the theoretical solution at
and
. This required that:
(7)
That is,
and
(8)
It implies that
.
2) The first, second, third and fourth derivatives with respect to x of the interpolating function respectively coincide with the differential equation as well as its first, second, third and fourth derivatives with respect to x at xn, i.e.
(9)
From Equation (9) implies:
(10)
where
(11)
(12)
Putting (11) & (12) in (10) we have:
(13)
That is,
(14)
where
(15)
Since
Putting (15) in (14)
(16)
(17)
(18)
(19)
From (17), we have:
(20)
Putting (19) in (20), we have:
(21)
Let:
(22)
Then, (21) becomes:
(23)
From (16), we have:
(24)
Putting (19) and (23) in (24) we have:
(25)
From (13) we have:
(26)
Putting (19), (23) and (25) in (26), we have:
(27)
For preservative of the scheme, then we can write the new scheme in a more compact form as:
Putting
and
as derived above, we arrived at a new scheme. But to test the scheme, we shall proceed to write a programme which will command the scheme to solve some firs order differential equations.
3. Implementation of the Scheem
PROBLEM 1. A spring with a mass of 2 kg has natural length m. A force of 5N is required to maintain it stretched to a length of m. If the spring is stretched to a length of m and then released with initial velocity 0, find the position of the mass at any time.
(1)
So,
. (2)
Using this value of the spring constant k, together with m = 2 then, we have
(3)
(4)
(5)
Since the initial velocity is given as
, we have
and so the solution is
(6)
The result compared favourably with the theoretical solutions.
PROBLEM 2:
Suppose that the spring of Problem 1 is immersed in a fluid with damping constant. Find the position of the mass at any time if it starts from the equilibrium Position and is given a push to start it with an initial velocity of m/s.
Mathematical Interpretation of the Problem
From Problem 1, the mass is
and the spring constant is
, so the differential Equation (3) becomes
(7)
or
(8)
(9)
We are given that
,
. Differentiating, we get
(10)
So
(11)
Since
, this gives
or
. Therefore
(12)
The result compares favourably with the theoretical solutions.
The result compares favourably with the theoretical solutions.
4. Conclusions
The procedure for development and implementation of a numerical algorithm has been examined in this work. The method employed a basis function for approximation. The scheme that formed the derived method was implemented to test the accuracy. The method gave a numerical algorithm capable of solving second order problems of ordinary differential equations. The new numerical algorithm scheme was employed to solve second order initial value problems of ordinary differential equations problems. The computations were carried out in computer codes. Tables 1-4 represent the numerical results of the examples at various values of step size (H). From the tables, it could be concluded that a smaller value of H, gives a better result. Figures 1-4 readily show the comparison of the newly derived method and the theoretical solution. Since the results obtained compare favorably with the theoretical, this shows the accuracy of the new method and so can be said to be approximately correct.
Table 1. Numerical results of problem 1 at H = 0.01.
Figure 1. Graphical presentation of problem 1.
Table 2. Numerical results of problem 1 at H = 0.001.
Figure 2. Graphical presentation of problem 1.
Table 3. Numerical results of problem 2 at H = 0.001.
Figure 3. Graphical presentation of problem 2.
Table 4. Numerical results of problem 2 at H = 0.0001.
Figure 4. Graphical presentation of problem 2.
In our subsequent research, we shall pay more attention on the implementation of this new scheme to solve some higher order initial value problems of ordinary differential equation and also compare the results with the existing methods and thereafter we examine the characteristics properties such as the stability, convergence, accuracy and consistency of the scheme.