Simulation of Spring Oscillations in Second-Order Differential Equations Using the Finite Difference Method - Muhammad Imam Al Paqih; Rida Al Kausar Hardi; Nuzla Af'idatur Robbaniyyah (University of Mataram, 2025)
This study aims to simulate the motion of a damped spring oscillation, modeled by a second-order ordinary differential equation, using the Finite Difference Method (FDM). The main focus is on implementing the central finite difference scheme to discretize the equation, deriving an explicit iterative formula, and analyzing the oscillation dynamics and the accuracy of the numerical solution. The simulation was conducted with specific parameters (mass m = 1.0 kg, spring constant k = 10.0 N/m, damping coefficient c = 0.5 Ns/m) and various time steps (Δ t = 0.5 s, 0.1 s, 0.01 s). The simulation results qualitatively show damped oscillatory behavior consistent with physical theory, where the amplitude decreases over time. The accuracy of the numerical solution, measured by the Symmetric Mean Absolute Percentage Error (SMAPE) against the analytical solution, was significantly influenced by Δ t; the smallest time step (0.01 s) yielded the highest accuracy with a SMAPE of 0.4495%. The Finite Difference Method proved effective in analyzing the spring oscillation system, demonstrating that the proper selection of Δ t is crucial for balancing accuracy and computational efficiency.