Consider a body of mass m able to move along the x axis, and suppose an equilibrium point exists at the position x = 0 . That is, at x = 0 , the net force upon the body is the zero vector, and by Newton's second law, the body will not accelerate. If the force upon the body is proportional to the displacement from the equilibrium point, and directed to the equilibrium point, then the body will perform simple harmonic motion. Writing the force as F = − − k x , Newton's second law becomes m d 2 x d t 2 = − − k x . This differential equation has the solution x ( t ) = A cos ⁡ ⁡ ω ω t + B sin ⁡ ⁡ ω ω t where the frequency ω ω is equal to k / m , and the constants A and B can be calculated knowing, for example, the position and velocity the body has at a given time, like t = 0 .