Responsive Navbar with Google Search
Ordinary Differential Equation-1: Motion of a Harmonic Oscillator
Python runs in your browser. Heavy or infinite loops may freeze your browser tab. Use "Stop" if needed; for heavy jobs, run locally.
Program 1

Motion of a Harmonic Oscillator

This Python program simulates the motion of a one-dimensional harmonic oscillator using numerical integration (Euler's method). The harmonic oscillator follows Hooke's Law, where the force acting on the object is proportional to its displacement and is given by:

\[ F = -kx \]

Where:

  • \( F \) is the force acting on the object
  • \( k \) is the spring constant
  • \( x \) is the displacement of the object from the equilibrium position
Output 1