Comparative Convergence Analysis of Runge- Kutta Fourth Order and Runge-Kutta-Fehlberge Methods Implementation in Matlab and Python Applied to a Series RLC Circuit


Authors : Igwe, Chijioke Godswill; Jackreece, P. C; George, Isobeye

Volume/Issue : Volume 10 - 2025, Issue 3 - March


Google Scholar : https://tinyurl.com/53my3kct

Scribd : https://tinyurl.com/yvkybyyt

DOI : https://doi.org/10.38124/ijisrt/25mar599

Google Scholar

Note : A published paper may take 4-5 working days from the publication date to appear in PlumX Metrics, Semantic Scholar, and ResearchGate.

Note : Google Scholar may take 15 to 20 days to display the article.


Abstract : This research investigates the comparative convergence properties and computational efficiency of the Runge- Kutta Fourth Order (RK4) and Runge-Kutta Fehlberg (RKF) methods in solving a second-order differential equation modeling a series RLC circuit. The study is conducted using MATLAB and Python, focusing on the convergence properties of the Runge-Kutta fourth-order method and the Runge-Kutta Fehlberg method in approximating the solution of the given ODE. Key findings indicate that both RK4 and RKF methods are highly efficient in solving second-order differential equations, with the RKF method demonstrating superior efficiency. MATLAB and Python both provide robust environments for implementing the RK4 and RKF methods. MATLAB's built-in functions facilitate straightforward implementation, while Python’s libraries like SciPy, SymPy, Matplotlib, and Pandas offer additional flexibility and simplicity. Performance analysis shows that MATLAB establishes convergence in approximately ten seconds, whereas Python takes about two minutes. MATLAB generally offers faster computation for vectorized operations, which is advantageous for large-scale problems. Python, however, provides comparable performance with better integration capabilities for other software and tools. This research underscores the importance of choosing appropriate numerical methods for solving differential equations in electrical circuits, contributing valuable insights for students, researchers, and academicians in computational mathematics and engineering fields.

Keywords : Runge-Kutta 4th-Order Method, RK4, Runge-Kutta-Fehlberg Method RKF45, MATLAB, Python, Numerical Analysis, ODE Solvers

References :

  1. Agam, S. A., & Yahaya, Y. A. (2014). A highly efficient implicit Runge-Kutta method for first order ordinary differential equations. African Journal of Mathematics and Computer Science Research, 7(5), 55-60.       https://doi.org/10.5897/AJMCSR2014.0551
  2. Ahamad, N., & Charan, S. (2019). Study of numerical solution of fourth order ordinary differential equations by fifth order Runge-Kutta method. International Journal of Scientific Research in Science and Technology (IJSRSET), 6(1), 230-237. https://doi.org/10.32628/IJSRSET196142
  3. Afham, M. (2019). Numerical solution to RLC series circuit with constant and varying source. https://medium.com/@afhamaflal9/numerical-solution-to-rlc-series-circuit-with-constant-and-varying-source-
  4. Alizadeh, S., Baleanu, D., & Rezapour, S. (2020). Analyzing transient response of the parallel RCL circuit by using the Caputo–Fabrizio fractional derivative. Advances in Continuous and Discrete Models, (55).
  5. Anthony, A. O., Pius, F., Onyinyechi, F. A., & Ahmed, A. D. (2019). Analysis and comparative study of numerical solutions of initial value problems in ordinary differential equations with Euler and Runge-Kutta methods. American Journal of Engineering (AJER), 8(8), 40-53.
  6. Ascher, U. M., & Greif, C. (2011). A first course in numerical methods. Society for Industrial and Applied Mathematics (SIAM), 7(1). https://doi.org/10.1137/9780898719987
  7. Ashgi, R., Pratama, M. A. A., & Purwani, S. (2021). Comparison of numerical simulation of epidemiological model between Euler method with 4th order Runge Kutta method. International Journal of Global Operations Research, 2(1), 37-44.
  8. Ascher, U. M., & Petzold, L. R. (1998). Computer methods for ordinary differential equations and differential-algebraic equations. Society for Industrial and Applied Mathematics.
  9. Ascher, U. M., & Greif, C. (2011). A first course in numerical methods. SIAM.         https://books.google.com.ng/books/about/A_First_Course_in_Numerical_Methods.html?id=eGDMSIqPYdYC&redir_esc=y
  10. Attaway, D. C. (2022). MATLAB: A practical introduction to programming and problem solving (6thed.). Butterworth-Heinemann. https://www.mathworks.com/academia/books/matlab-attaway.html
  11. Balac, S. (2013). High order embedded Runge-Kutta scheme for adaptive step-size control in the interaction picture method. Journal of the Korean Society for Industrial and Applied Mathematics (J.KSIAM), 17(4), 238–266. https://doi.org/10.12941/jksiam.2013.17.238
  12. Balagopalan, S., & EEE Department. (2014). Fundamental concepts of electric circuits. VAST. http://www.vidyaacademy.ac.in
  13. Bartoldson, B. R., Kailkhura, B., & Blalock, D. (2022). Compute-efficient deep learning: Algorithmic trends and opportunities. arXiv. https://arxiv.org/abs/2210.06640
  14. Banu, M. S., Raju, I., Zaman, U. H. M., & Zaman, M. (2021). A study on numerical solution of initial value problem by using Euler's method, Runge-Kutta 2nd order, Runge-Kutta 4th order, and Runge-Kutta Fehlberg method with MATLAB. International Journal of Scientific & Engineering Research, 12(3), 61.
  15. Bellen, A., & Zennaro, M. (2013). Numerical methods for delay differential equations. OUP Oxford.                 https://books.google.com.ng/books?id=C_CLxpHQbY8C&printsec=frontcover&dq=eitions
  16. Bhanu Prakash, S., Chandan, K., Karthik, K., Devanathan, S., Varun Kumar, R. S., Nagaraja, K. V., & Prasannakumara, B. C. (2024). Investigation of the thermal analysis of a wavy fin with radiation impact: an application of extreme learning machine. Physica Scripta, 99(1), 015225. https://doi.org/10.1088/1402-4896/ad131f
  17. Bhogendra, K. T., Kafle, J., & Bhandari, I. B. (2021). Visualization, formulation, and intuitive explanation of iterative methods for transient analysis of RLC circuit. BIBECHANA, 18(2), 9–17. https://doi.org/10.3126/bibechana.v18i2.31208
  18. Bocharov, G. A., & Rihan, F. A. (2000). Numerical modelling in biosciences using delay differential equations. Journal of Computational and Applied Mathematics, 125(1–2), 183–199. https://doi.org/10.1016/S0377-0427(00)00468-4
  19. Breit, D., & Dodgson, A. (2021). Convergence rates for the numerical approximation of the 2D stochastic Navier–Stokes equations. Numerische Mathematik, 147, 553–578. https://doi.org/10.1007/s00211-021-01181-z
  20. Burden, R. L., & Faires, J. D. (2015). Numerical analysis (10th ed.). Cengage Learning. https://www.amazon.com/Numerical-Analysis-Richard-L-Burden/dp/1305253663
  21. Butcher, J. C. (2016). Numerical methods for ordinary differential equations, (3rd ed.). John Wiley & Sons.
  22. Clayton, S. L., Lemma, M., & Chowdhury, A. (2019). Numerical solutions of nonlinear ordinary differential equations by using adaptive Runge-Kutta method. Journal of Advances in Mathematics, 17, 147-154. https://doi.org/10.24297/jam.v17i0.8408

23. Mondal, S. Banu, M. S., & Raju, I. (2016). A comparative study on classical fourth order and Butcher sixth order Runge-Kutta methods with initial and boundary value problems. International Journal of Material and Mathematical Sciences, 5(3), 45-57. DOI: https://doi.org/10.34104/ijmms.021.08021.

This research investigates the comparative convergence properties and computational efficiency of the Runge- Kutta Fourth Order (RK4) and Runge-Kutta Fehlberg (RKF) methods in solving a second-order differential equation modeling a series RLC circuit. The study is conducted using MATLAB and Python, focusing on the convergence properties of the Runge-Kutta fourth-order method and the Runge-Kutta Fehlberg method in approximating the solution of the given ODE. Key findings indicate that both RK4 and RKF methods are highly efficient in solving second-order differential equations, with the RKF method demonstrating superior efficiency. MATLAB and Python both provide robust environments for implementing the RK4 and RKF methods. MATLAB's built-in functions facilitate straightforward implementation, while Python’s libraries like SciPy, SymPy, Matplotlib, and Pandas offer additional flexibility and simplicity. Performance analysis shows that MATLAB establishes convergence in approximately ten seconds, whereas Python takes about two minutes. MATLAB generally offers faster computation for vectorized operations, which is advantageous for large-scale problems. Python, however, provides comparable performance with better integration capabilities for other software and tools. This research underscores the importance of choosing appropriate numerical methods for solving differential equations in electrical circuits, contributing valuable insights for students, researchers, and academicians in computational mathematics and engineering fields.

Keywords : Runge-Kutta 4th-Order Method, RK4, Runge-Kutta-Fehlberg Method RKF45, MATLAB, Python, Numerical Analysis, ODE Solvers

Never miss an update from Papermashup

Get notified about the latest tutorials and downloads.

Subscribe by Email

Get alerts directly into your inbox after each post and stay updated.
Subscribe
OR

Subscribe by RSS

Add our RSS to your feedreader to get regular updates from us.
Subscribe