Journal of Scientific Research, Education, and Technology
Vol. 5 No. 3 (2026): Vol. 5 No. 3 2026

Solving Lagrangian Dynamics of Coupled Oscillators Using Python

Munzir Absa (Universitas Malikussaleh Lhokseumawe, Indonesia)



Article Info

Publish Date
15 Aug 2026

Abstract

The aim of this study is to comprehensively analyze the complex dynamics of coupled oscillator systems utilizing the analytical Lagrangian formalism paired with advanced computational numerical methods in the Python programming environment. To achieve this objective, a quantitative computational research design was rigorously implemented, focusing on the numerical evaluation of theoretical mathematical models. The analytical models were derived using the Euler-Lagrange equations, and the resulting second-order ordinary differential equations were solved numerically utilizing Python's SciPy and NumPy libraries. The simulated physical system consisted of two identical masses connected by a central spring, moving in a one-dimensional frictionless environment. The process of data analysis evaluated the accuracy of the numerical solutions against established theoretical predictions by continuously monitoring total mechanical energy conservation across the temporal domain. As a result, the computational approach demonstrated an exceptionally high degree of precision in predicting the phase space trajectories and the time-evolution of the system, maintaining energy conservation with a numerical error margin of less than 10^-6 Joules over thousands of integration steps. The Python-based simulation effectively visualized the normal modes of the coupled oscillators. This study implies that integrating Python programming with analytical Lagrangian mechanics provides a robust, interactive framework for physics education.

Copyrights © 2026






Journal Info

Abbrev

jrest

Publisher

Subject

Computer Science & IT Economics, Econometrics & Finance Education Engineering Social Sciences

Description

FOCUS AND SCOPE JSRET (Journal of Scientific Research, Education, and Technology) encourages scientific and technological research, particularly with regard to Indonesia, but not just in terms of authorship or regional coverage of current issues. Scientists, instructors, senior researchers, project ...