Статьи и обзоры nachodki.ru

UDC:323.3.015.31.51

AUTOMATION OF RUNGE-KUTT METHOD FOR APPROXIMATE SOLUTION OF DIFFERENTIAL EQUATIONS

Karomatulloi M., Saidzoda I.M.

Tajik State University of Finance and Economics,

Tajik National University

Introduction. After the collapse of the Soviet Union, the unified education system was destroyed and almost all post-Soviet republics changed their education system. Today, the education system of the Republic of Tajikistan needs international educational standards requires the use of active teaching methods, new approaches to education, knowledge, skills, abilities and high competence in the use of computer technology and modern information and communication technologies [1].

The analysis shows that the current state of the country's education system, including higher education institutions using computer programs, modern achievements in the field of computer technology, mobile phones, network technologies and multimedia in the field of education, has a great influence on the thinking of pupils and students, especially in the minds of the younger generation, their interest in learning about the world has increased.

When using programming languages ​​and creating computer programs for mathematical methods in the classroom, a real environment for communication between the teacher and students is created. In such an environment, students and pupils learn lessons very interestingly and effectively, freely express their thoughts and opinions, and complete teachers' assignments with full enthusiasm.

The development and emergence of information technology as a science dates back to the second half of the 20th century. Information technology studies the structure and general characteristics of information, as well as the processes of searching, collecting, storing, transforming, transmitting and using information at various levels of our daily activities [1].

The use of information technologies in solving mathematical problems and methods of teaching computer science was studied and analyzed by domestic and foreign researchers R.N. Abaluev, S.V. Harutyunyan, O.S. Gazman, V.M. Grigoriev, Yu.A. Ivanov, F.S. Komilyan, N.V. Matveeva, A.V. Mogilev, Yu.A. Pervin, A.L. Semenov, S.N. Tour, A. Weil, E.E. Homburger, I.Yu. Gorokhova, K. Groos, R.J. Davlatov, V.P. Demkin, A.S. Karpova, E.V. Klimenko, A.A. Kuznetsova, V. Levin, A.N. Leontyev, I.Ya. Lerner, A.R. Mirzoev, G.V. Mozhaeva, M.N. Perova, Tagaev, G.M. Troyan, B.F. Faizalizoda, F.F. Sharipov.

Despite the diversity and number of studies and works carried out in the direction of approximate solution of differential equations by the Euler, Runge-Kutta and Adams methods, it has not been fully solved in the form a set of practical applications.

Суть метода. Определение 1. Дифференциальным уравнением называется уравнение, включающее в себя производные неизвестной функции, а также может включать в себя саму неизвестную функцию и независимую переменную [3-4].

Differential equations are the main tool of mathematics for modeling various processes in science and technology.

Solutions are mainly divided into two classes:

1) analytical solution, where the solution is obtained as an analytical function;

2) approximate solution is obtained as a result of the integral of the curve in tabular form.

As is known from the course of differential equations, it is not always possible to find an analytical solution to a differential equation. Naturally, in such cases the question arises of how to solve the Cauchy problem. Computational mathematics includes methods of approximating differential equations - Euler's method, Runge-Kuta, Adams, Runge-Kuta-Merson method.

In our paper we explain the Runge-Kutta approximation method for solving differential equations.

One of the most popular methods for finding an approximate numerical solution to the Cauchy problem is the Runge-Kutta method, which was developed in 1900 by German mathematicians Karl David Tolme Runge (1856-1927) and processed by Martin Wilhelm Kutta (1867-1944).

This method occupies a special position among numerical methods. Some methods require a lot of time to solve large problems due to the increase in the number of steps and, as a result, take up a lot of computer memory. One of the features of the Runge-Kutta method is that the choice of steps is not mandatory, and its program is easy to create on a computer. In addition, the error of this method is smaller. This method can be used to solve a variety of problems.

To find an approximate numerical solution of the Cauchy problem for the first-order equation (1), we usually divide the fragment [a, b] into n equal parts, resulting in the following distribution points:    (Fig. 1.) [5-6].

Figure 1. Dividing a part into units

Let the function  have n-fold continuous derivative. In this case y(x) has continuous derivative with n+1 according to Taylor's formula [7-8]:

 

Using the right side of the equation , we can count -    For example,

Substituting them into (2), discarding the remaining terms of the formula, we calculate  as an approximation.

Instead of the sum on the right side of (2), Runge-Kutta assumed that the sum

                              (3)

that here

and ,  ,      are unknown constants and must be chosen in such a way that for any function  on the right-hand side of (2) and (3) they are the same as the parametric functions h (for the highest possible parameter levels). That is, the function

                       (4)

has the following properties.

                                       (5)

When (5) is fulfilled, using the Maclaurin formula we obtain [9-10]:

                                 (6)

This equality shows that if we accept this,

                                                                       (7)

then the procedure is incorrect. From the formula (7), each  finding  is called the Runge-Kutta method.

The value  according to (6) relative to  the order  is called the error of the method in one step and the m-order is called the error of the method. Conditions (5) allow us to find the values of       . In the general case (with desired r and m), it is to write down equations open (5) and finding the desired values from them is very difficult. Therefore, we will consider special cases.

1)

In this case it will be

From this equality we obtain the double derivative relatively to h [11-12]:

      

Here

     .

From these equations it follows that for the desired      it is if it will be .

So in this case  and . Now, using (7) and (6), we get

                                     (8)

  

The calculation formula (8) shows that the Runge-Kutta method in this case is similar to the Euler method.

2)  . 

In this case

Calculations show:

   .

Requirement (5) is fulfilled when m=2, if

     ,                                        (9).

This system of equations consists of three equations with four unknowns. So, the number of its solutions is infinite, because one of these unknowns can be considered desirable, and the other three can be easily found from (9). Usually, one of these unknowns is chosen in such a way that it is convenient to find  the obtained formula. Now we present the obvious form of 2 such formulas.

а) we will get  from  (9) ,    and  we produce . Now we will put     find from (7) and (6) [13]:

                 

              

The derived formulas are the Runge-Kutta method of the second order, and the error order in one step is equal to 3. This formula is identical to Euler's improved method.

  1. b) Let it be , then the solution of system (9) in this case is equal to and . From (7) we get:

   ;

        

This is the Runge-Kuttro method and is similar to the enhanced Euler-Cauchy method. The error rate of this method is 3 in one step.

  3) Let it be . Conditions (5) in this case lead to a system that consists of eleven equations and thirteen unknowns. We derive it using one of the Runge-Kutta formulas [14]:

    ;

 

               (10).

We note that the Runge-Kutta method of the fourth order (10) is mostly used in solving practical problems. To find a numerical solution to the Cauchy problem, standard computer programs are prepared for this method.

Example. Using the Runge-Kutt method, find the solution  of the equation with the initial condition  in the segment  with step  [14].

The solution. Using the Runge-Kutty method of order 4, which is expressed by formula (10), we find an approximate numerical solution. As (10) shows, to use the method once, it is necessary to calculate the values of the function  four times with the arguments  and  and    and    and . We present the results of calculations in the form of a table.

Table 1.

i

xi

ki1,2,3,4

yi

0

0

 

1

1

0.2

 

0,2

0,198

0,1978

0,1916

1,1972

2

0.4

0,1915

0,1810

0,1802

0,1653

1,3771

3

0.6

0,1652

0,1459

0,1450

0,1217

1,5219

4

0.8

0,1217

0,0949

0,0941

0,0646

1,6160

5

1

0,0646

0,0329

0,0326

0

1,6487

 Note 3. It is easy to see that the exact solution of the Cauchy problem is . A comparison of the values of the exact solution (keeping four digits after the comma) in the nodes  with the approximate numerical solution using the Runge-Kutt method shows that they differ from each other only in their nodes , and this difference is not significant . This shows that even for a large step  the method gives results that are practically the same as the exact solution.

The algorithm for solving the differential equation using the Runge-Kutt method [15]:

  • The beginning
  • Insertion
  • i=0
  • ,
  • If it is not then go to 9)

+

f (

          

9)         The end

Program code and output

#include <iostream>

using namespace std;

float f(float x,float y){

return y*(1-x);}

int main()

{float x0,y0,n,h,x[100],y[100],k1[100],k2[100],k3[100],k4[100];

    cout << "x0=";

    cin>>x0;

    cout << "y0=";

    cin>>y0;

    cout << "n=";

    cin>>n;

    cout << "h=";

    cin>>h;

    x[0]=x0,y[0]=y0;

    for(int i=0;i<n; i++){

        k1[i+1]=h*f(x[i],y[i]);

        k2[i+1]=h*f(x[i]+h/2,y[i]+k1[i+1]/2);

        k3[i+1]=h*f(x[i]+h/2,y[i]+k2[i+1]/2);

        k4[i+1]=h*f(x[i]+h,y[i]+k3[i+1]);

        y[i+1]=y[i]+(k1[i+1]+2*k2[i+1]+2*k3[i+1]+k4[i+1])/6;

        x[i+1]=x[i]+h;

        cout<<"k1="<<k1[i+1]<<"    "<<"x["<<i+1<<"]="<<x[i+1]<<"    "<<"y["<<i+1<<"]="<<y[i+1]<<endl<<"k2="<<k2[i+1]<<endl<<"k3="<<k3[i+1]<<endl<<"k4="<<k4[i+1]<<endl<<endl;

    }

    return 0;

}

The result of the program

Figure 2. The result of the program

Conclusion. The use of information technologies will give an impetus to the formation of new forms and contents of the traditional activity of teachers and will lead to their implementation at a higher level. It is necessary to organize work with the computer in such a way that from the first lessons of the primary level of education, it becomes a powerful psychological and pedagogical tool for the formation of a need-motivational plan of schoolchildren's activities. Computers develop students' interest in the subject being studied.

Automation of the solution of differential equations by the Runge-Kutta method allows students of higher schools, while studying the subjects of higher mathematics, differential equations and calculation methods, to automatically find the solution of such equations and compare them with analytical solutions

REVIEWER: Mirzoev S.Kh.,

Doctor of Technical Sciences,

Professor

REFERENCES

  1. Karomatullo, M. The use of information technologies in the approximate solution of differential equations by the Euler method / M. Karomatulloi / Shahid Beheshti University Department of Pedagogical Sciences, Dushanbe, 2024. №1(56). – Pp. 169-176.
  2. Mirzoev, S. H. Methods of learning programming languages in educational institutions / Mirzoev S.H. I. Fernando. M. V. I. Khayetova. // In this verse, Allah Almighty revealed that the Prophet Muhammad (peace and blessings of Allah be upon him) was one of the companions of the prophet. The section of pedagogy and psychology, methods of humanities and natural sciences. (Printed). №3-4(7-8). - Dushanbe, 2021. – Рp.208-214.
  3. Krasnov, M.L. Ordinary differential equations: a textbook / M. L. Krasnova // -M.: Higher School, 1983. –128 р.
  4. Matveev, N.M. Methods of integration of ordinary differential equations: textbook / N. M. Matveev //– 3rd ed., ispr. and add. - M.: Higher School, 1967. –564 р.
  5. Barysheva, V. K. Ordinary differential equations: textbook. Ch. 1,2 / V. K. Barysheva // – Tomsk: TPU Publishing House, 2003. –112 р.
  6. Ponomarev, K.K. Compilation of differential equations: a textbook / K. K. Ponomarev // – Minsk: Higher School, 1973. – 252 р.
  7. Stepanov, V.V. Course of differential equations: textbook for universities / V. V. Stepanov // – 9th ed., ster. – M.: Unified URSS, 2004. – 472 р.
  8. Fedoryuk, M.V. Ordinary differential equations: textbook for universities / M. V. Fedoryuk // – M.: Higher School, 1985. – 372 р.
  9. Kulakova, S.V. Numerical methods / Kulakova S.V. // Textbook, Ivanovo, 2018. – Р. 124.
  10. Demidovich, B. P. Fundamentals of computational mathematics: textbook. the manual / B. P. Demidovich // – St. Petersburg: Publishing house "Lan", 2009. – 665 р.
  11. Berezin, I.S., Methods of calculations [Text], Vol.2. / Berezin, I.S., Zhidkov N.P. // M.:GIFML, 1959. – 620 р.
  12. Rybkov, M.V. First–order Runge-Kutta methods with consistent stability domains / M.V. Rybkov // – [Text]: direct // Young scientist. – 2016. – №11 (115). – Pp. 64-69
  13. Gevorkyan M.N. Application of Runge–Kutty–Nystrom methods for solving the Hill equation [Text] / Gevorkyan M.N. // T-Comm – Telecommunications and Transport. Vol. 7. №10, 2013. – Рp.41-43.
  14. Filippov, A.F. Collection of problems on differential equations: a textbook / A. F. Filippov // – 2nd – M.: Publishing House of LKI, 2008. –240 р.
  15. Mirzoev, S.H. Pascal programming language / Mirzaev S.H., Raupov I., Odinaev R.N., Kasimov Sh.N., Saiodov.M. // Textbook, Dushanbe, 2014. – 126 р.

 

AUTOMATION OF THE RUNGE-KUTTA METHOD FOR APPROXIMATE SOLUTION OF DIFFERENTIAL EQUATIONS

                The transition of the education system of Tajikistan to international education standards requires the use of active teaching methods, new approaches to education, requires knowledge, skills, abilities and high competence in the use of computer technology and modern information and communication technologies. In this regard, it is necessary that higher education institutions should use computer programs and implement modern advances in the field of computer technology and network technologies when studying exact subjects, especially when studying mathematics. The article focuses on the approximate solution of examples and problems in the field of differential equations, higher mathematics and computational methods. Among the approximate methods for solving differential equations, a simple method is Runge-Kutt's method.  The article presents the algorithm, program and computer result. A set of practical programs created in the high-level programming language C++  allows students and readers to solve any example of a differential equation problem using the Runge-Kutta famous  method.

Keywords: information technology, higher mathematics, differential equation, analytical solution, approximate solution, Euler's method, program.

 

Information about authors: Karomatulloi Mahmadullo – Tajik State University of Finance and Economics, assistant of the department of higher mathematics. Address: 734025, Dushanbe, Tajikistan, street Makhinov 64/14. Phone: (+992)985-42-41-43. E-mail:zuhurovkaromatullo1 @gmil.com.

Saidzoda Isroil Mahmad – Tajik National University, dotsent of the Department of Informatics Address: 734025, Dushanbe, Tajikistan, street Makhinov 64/14. Phone: 904485555. E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.

 

Article received 08.04.2024

Approved after review 24.06.2024

Accepted for publication 19.09.2024

   
© Tajik National University