The Approximation Error of Ordinary Differential Equations Based on the Moved Node Method

Abstract

One of the central issues in solving differential equations by numerical methods is the issue of approximation. The standard way of approximating differential equations by numerical methods (particularly difference methods) is to question the degree of approximation in the form O(hp). Here h is the grid step. In this case we have an implicit approximation. Based on the difference equation approximating the differential equation, the order of approximation is obtained using the Taylor series. However, it is possible to calculate the approximation error at nodal points based on the method of moving nodes. The method of moving nodes allows obtaining an approximate analytical expression. On the basis of the approximate form, it is possible to calculate the approximation error. The analytical form of the approximation makes it possible to efficiently calculate this error. On the other hand, the property of this error allows the construction of new improved circuits. In addition, based on these types of errors, you can create a differential analog of the difference equation that gives an exact approximation.

Share and Cite:

Umurdin, D. and Dilfuza, H. (2022) The Approximation Error of Ordinary Differential Equations Based on the Moved Node Method. Journal of Applied Mathematics and Physics, 10, 2450-2458. doi: 10.4236/jamp.2022.108166.

1. Introduction

There are various approximate analytical methods for solving differential equations. For example, in the works [1] [2] new approaches are presented.

The methods of numerical solution of differential equations are based on the transformation of a differential problem into a difference problem, called approximation. In simple words: to solve differential equations, you need to know the approximation of differential equations. Approximation of a differential equation by a difference—approximation of a differential equation by a system of algebraic equations with respect to the values of the desired functions on some grid. [3] [4]

On the basis of the movable node, an approximate analytical expression for the difference solution of the differential problem [5] was obtained. In [6], the moving nodes method was used to construct the control volume method. In work [5] it is possible to increase the accuracy based on a combination of the moving nodes method with the ideas of Richardson’s extrapolation. Some questions of monotonicity of difference scheme with the help of a movable node are described in [6]. The application of the moving nodes method to some applied problems is reflected in [7].

This paper describes the application of the moving nodes method to the calculation of the approximation error. When a two-point boundary value problem is solved by difference methods, the question of the degree of approximation usually appears. For the closeness of the exact and approximation of the solution, and the quality of the difference scheme are evaluated based on the degree of this parameter. With such an analysis, other parameters (the coefficients of the differential equation) are not explicitly involved in the approximation error expression. Obtaining an explicit expression for the approximation error makes it possible to analyze it.

Consider the simplest ordinary differential equation with boundary conditions

d 2 u d x 2 = C , u ( 0 ) = 0 , u ( 1 ) = 1 (1)

where C—const.

Create a uniform grid on segments [0, 1] with step h. A uniform grid on a segment x [ 0 , 1 ] with step h has the form:

ω ¯ h = { x k = h k , k = 0 , 1 , , N , h N = 1 }

Let us replace the second-order derivative by the difference relation:

U i + 1 2 U i + U i 1 h 2 = C , 1 i N 1 , U 0 = 0 , U N = 1 (2)

Difference scheme (2) traditionally has order O ( h 2 ) [8]. However, if we solve system (2) by the Tomas algorithm [8] [9], we obtain a numerical solution that coincides with the exact analytical solution for any grid steps h at the grid nodes. So. scheme (2) approximates (1) exactly.

Figure 1 shows graphs of exact and numerical solutions for case C = 1 . (The solid line is the exact solution; the circles are the numerical solution obtained using the Thomas algorithm). It can be seen from the figure that, regardless of the choice of grid, the exact and approximate solutions are the same.

Figure 1. Comparison of the exact and numerical solution: on the left, the internal node 1; right 3.

Based on this example, we can conclude that the standard indicator of the proximity of the differential and difference equations O ( h p ) does not reflect complete information. We note an important fact that, regardless of the number of grid steps, the exact and numerical solutions coincide. An attempt is made here to efficiently calculate this error.

2. Methodology

Let we have a differential equation

L u = f , (3)

where L is a differential operator, f is a known function, and u is an unknown function. (3) the equation is considered in some domain D with appropriate boundary conditions. The differential Equation (3) is replaced by the difference equation:

L h u h = f h , (4)

where Lh is the difference operator, uh is the unknown grid function, and fh is the approximation of the function f at the grid nodes.

Usually, the approximation error is given as [6] [7]:

Q h = L h [ u ] h f h , (5)

where [ u ] h is the exact solution of (3) at the grid nodes. Using the Taylor series, from (5) one obtains that, Q h = O ( h m ) , where h is the grid step and m is the degree of approximation.

You can determine an explicit approximation error if you use the method of a moving node, which allows you to extend the definition to the entire area D. This allows you to introduce an approximation error like this:

R h = L h { u } h f h . (6)

Here { u } h is a predefined continuous function by means of a moveable node. Approximate calculation of the approximation error of type (6) is demonstrated using simple examples.

3. Results and Discussion

As an application of the above approach, consider examples.

3.1. Simple Boundary Value Problem

Consider a simple boundary value problem:

d 2 u d x 2 = f ( x ) , u ( 0 ) = u a , u ( 1 ) = u b (7)

Let’s build a non-uniform grid on segments [ 0 ; 1 ] :

ω ¯ h = { 0 = x 0 < x 1 < < x N 1 < x N = 1 , k = 0 , 1 , , N }

In the non-uniform grid, we replace (7) with the difference problem:

2 x i + 1 x i 1 ( U i + 1 U i x i + 1 x i U i U i 1 x i x i 1 ) = f ( x i ) , i = 1 , 2 , , N 1. (8)

Here U i is the grid solution of the problem. From here

U i = U i + 1 ( x i x i 1 ) + U i 1 ( x i + 1 x i ) x i + 1 x i 1 1 2 f ( x i ) ( x i x i 1 ) ( x i + 1 x i ) , i = 1 , 2 , , N 1. (9)

We redefine the value of the function at non-nodal points as follows. To do this, we consider in (9) x i + 1 , x i 1 , U i 1 , U i + 1 , to be fixed, and x i to be moved, and the function f ( x ) to be smooth. Thus, we will complete the grid function on each segment ( ( x i 1 + x i ) / 2 , ( x i + 1 + x i ) / 2 ) . From (9) we get

U i ( x i ) = 1 2 f ( x i ) ( x i + 1 x i ) ( x i x i 1 ) f ( x i ) ( x i + 1 + x i 1 2 x i ) + f ( x i ) (10)

Then the approximation error for the nodal points looks like this:

R h ( x i ) = 1 2 f ( x i ) ( x i + 1 x i ) ( x i x i 1 ) f ( x i ) ( x i + 1 + x i 1 2 x i ) (11)

If the grid is uniform for the approximation error, we obtain the expression

R h ( x i ) = 1 2 f ( x i ) h 2 , i = 1 , 2 , , N 1. (12)

If on the segments ( x i 1 , x i + 1 ) the function constant approximation error is identically equal to zero and we get the exact solution.

Based on expression (10), the following conclusion can be drawn.

Given a two-point boundary value problem

d 2 u d x 2 = f * ( x ) , u ( 0 ) = u a , u ( 1 ) = u b

and f * ( x ) can be represented as

f * ( x i ) = 1 2 f ( x i ) ( x i + 1 x i ) ( x i x i 1 ) f ( x i ) ( x i + 1 + x i 1 2 x i ) + f ( x i )

then the difference scheme

2 x i + 1 x i 1 ( U i + 1 U i x i + 1 x i U i U i 1 x i x i 1 ) = f ( x i ) , i = 1 , 2 , , N 1 ,

gives a grid solution coinciding with the exact solution at the nodal points.

If there is only one internal node point (the node being moved is one), then an approximate analytical solution can be obtained. Indeed, if we rewrite scheme (8) for one moving node, we have

2 ( U b U ( x ) 1 x U ( x ) U a x ) = f ( x ) . (13)

From here we obtain an approximate analytical solution:

U ( x ) = U b x + U a ( 1 x ) x i + 1 x i 1 1 2 f ( x ) ( 1 x ) x . (14)

In this case, (14) represents the exact solution of the problem (7)

if we put

f * ( x ) = 1 2 f ( x ) ( 1 x ) x f ( x ) ( 1 2 x ) + f ( x ) .

The form of the approximation error (11) allows the construction of new schemes of the collocation type. Indeed, if in problem (8) we replace the right side by the expression

f ( x i ) + A ( x i x i 1 ) ( x i + 1 x i ) .

Here A is still an unknown constant. Parameter A is determined so that the approximation error (11) for a uniform step at node x i is equal to zero, i.e. collocation type scheme. Then we have

A = 1 4 f ( x i ) .

3.2. Convection and Diffusion Equation

Consider a stationary equation in which only convection and diffusion are present without a source.

ε v + v = 0 , (15)

with boundary conditions v ( 0 ) = 0 , v ( 1 ) = 1 .

There are various schemes for the difference solution (15) [6] [7]. Based on the moving node technique [1] [2], it is possible to explicitly express local errors in the approximation of differential equations. Using the moving node method [1], we will show the efficient calculation of local approximation errors for the model problem (15).

3.2.1. Scheme with Central-Difference Approximation

Scheme with central-difference approximation of the convective term. Take a segment and any point. Consider the grid analog (15)

2 ε x i + 1 x i 1 ( u i + 1 u x i + 1 x u u i 1 x x i 1 ) + ( u i + 1 u i 1 x i + 1 x i 1 ) , (16)

At, we have a central difference approximation. Here, is the approximate value of the solution at the point x.

From (16) we find

u = ( x x i 1 ) ( 2 ε + x i + 1 x ) u i + 1 + ( x I + 1 x ) ( 2 ε x + x i 1 ) u i 1 2 ε ( x i + 1 x i 1 ) , (17)

From here we get,

u = 2 ε + x i + 1 + x i 1 2 x 2 ε u i + 1 u i i x i + 1 x i 1 , (18)

u = 1 ε u i + 1 u i i x i + 1 x i 1 , (19)

If the difference solution at nodal points is known, then formula (17) makes it possible to determine the unknown at points that are not nodal.

Using formulas (18) and (19), the derivatives are restored at any point of the segment. Multiplying (19) by and adding with (18), we obtain

ε u + u = R h 1 , (20)

were

R h 1 = x i + 1 + x i 1 2 x 2 ε u i + 1 u i 1 x i + 1 x i 1 .

Equation (20) can be called a differential analog of the difference Equation (16); difference Equation (16) is a collocation-type scheme.

Using (19), the approximation error can be written as

R h 1 = x i + 1 + x i 1 2 x 2 u .

Equation (20) takes the form

( ε + x i + 1 + x i 1 2 x 2 ) u + u = 0. (21)

Thus, difference Equation (16) exactly approximates differential Equation (21) on the segment [ x i 1 , x i + 1 ] .

Comparison of Equations (15) and (21) shows that when Equation (15) is approximated by scheme (16), scheme diffusion appears with a variable coefficient ( x i 1 + x i + 1 2 x ) / 2 .

3.2.2. Upwind Scheme

Let us consider the difference analog of Equation (15), in which the convective term is approximated by the one-sided difference relation

2 ε x i + 1 x i 1... ( u i + 1 u x i + 1 x u u i 1 x x i 1 ) + ( u i + 1 u x i + 1 x ) , (22)

from here we get

u = ( x x i 1 ) ( 2 ε + x i + 1 x i 1 ) u i + 1 + 2 ε ( x i + 1 x ) u i 1 ( 2 ε + x x i 1 ) ( x i + 1 x i 1 ) , (23)

determine the first and second derivatives:

u = 2 ε ( 2 ε + x i + 1 + x i 1 ) ( 2 ε + x x i 1 ) 2 u i + 1 u i i x i + 1 x i 1 , (24)

u = 4 ε ( 2 ε + x i + 1 x i 1 ) ( 2 ε + x x i 1 ) 3 u i + 1 u i i x i + 1 x i 1 , (25)

let us calculate the approximation error

R h 2 = 2 ε ( x x i 1 ) ( 2 ε + x i + 1 x i 1 ) ( 2 ε + x x i 1 ) 3 u i + 1 u i 1 x i + 1 x i 1 .

The differential analog of scheme (22) has the form

( ε + x x i 1 2 ) u + u = 0 , (26)

those. with a scheme against the flow, we have a scheme diffusion with a coefficient ( x x i 1 ) / 2 . Based on (23)—is a hyperbola, which is monotone on the segment, i.e. scheme (22) is monotonic.

Based on the form of the differential analogue (26), we can conclude that the differential equation

( ε + x 2 ) u + u = 0 (27)

is exactly approximated by the scheme

2 ε ( u b u 1 x + u u a x ) + u b u 1 x = 0 (28)

Those. solving (28) with respect to u, we obtain the exact solution of differential Equation (27).

Example. Consider an equation with boundary conditions.

ε 1 v + v = 0 , v ( 0 ) = 0 , v ( 1 ) = 1.

Here

ε 1 = { ε + x 2 , if x 1 / 2 ε + x 1 / 2 2 , if x > 0 .

For the solution, we use a scheme with the number of nodal points N = 5. Figure 2 shows a comparison of the exact and numerical solutions on a uniform grid. The solid lines correspond to the exact, and the circles to the numerical.

In the case of a non-uniform grid, we will get the same result: the exact and numerical solutions coincide (Figure 3).

Figure 2. Comparison of the exact and numerical solution: on the left ε = 0.01; right ε = 0.001.

Figure 3. Comparison of exact and numerical solution in non-uniform grid: on the left ε = 0.01; right ε = 0.001.

4. Conclusions

The method of moving nodes allows the calculation of an explicit expression for the approximation error when replacing differential equations with difference schemes.

Based on the method of moving nodes, it is possible to construct a differential analogue of the difference scheme

The differential analogue of the difference scheme in simple cases allows the construction of an exact difference scheme

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Okereke, R., Maliki, O. and Oruh, B. (2021) A Novel Method for Solving Ordinary Differential Equations with Artificial Neural Networks. Applied Mathematics, 12, 900-918.
https://doi.org/10.4236/am.2021.1210059
[2] Yousif, A. and Qasim, A. (2020) A Novel Iterative Method Based on Bernstein-Adomian Polynomials to Solve Non-Linear Differential Equations. Open Access Library Journal, 7, 1-12.
https://doi.org/10.4236/oalib.1106267
[3] Dalabaev, U. (2016) Difference-Analytical Method of The One-Dimensional Convection-Diffusion equation. International Journal of Innovative Science, Engineering & Technology, 3, 234-239.
[4] Dalabaev, U. (2021) Recent Advancement of Computing Technology of a Method of Control Volume for Obtaining of the Approximate Analytical Solution One-Dimensional Convection-Diffusion Problems, New Ideas Concerning Science and Technology.
https://bp.bookpi.org/index.php/bpi/catalog/book/320
[5] Dalabaev, U. (2020) Increasing the Accuracy of the Difference Scheme Using the Richardson Extrapolation Based on the Movable Node Method. Academic Journal of Applied Mathematical Sciences, 6, 204-212.
https://doi.org/10.32861/ajams.68.204.212
https://arpgweb.com/journal/journal/17
[6] Dalabaev, U. (2019) Application of the Moving Node Method to the Study of the Monotonicity of a Difference Scheme and Its Improvement for a One-Dimensional Convective-Diffusion Problem. Problems of Computational and Applied Mathematics, 6, 44-52.
[7] Dalabaev, U. (2018) Application of the Method of Moving Nodes to the Solution of Applied Boundary Problems. Bulletin of the Institute of Mathematics, 5-9.
[8] Patankar, S.V. (1980) Numerical Heat Transfer and Fluid Flow. McGrаw-Hill Hemisphere Publishing Corporation, p. 197.
[9] Samarskiy, A.A. (1971) Introduction to the Theory of Difference Schemes. Nauka, Moskov, p. 553.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.