fig sketch of one-dimensionaloscillating dynamic system (without frictionof the body on the axisalong which the body moves the spring is not stretched when so the force is zeroand is hence the equilibrium position of the body the spring force is kxwhere is constant to be measured we assume that there are no other forces ( no frictionnewton' nd law of motion ma then has kx and xr kx mxr ( which can be rewritten as xr ( by introducing = (which is very commonequation ( is second-order differential equationand therefore we need two initial conditionsone on the position and one on the velocity here we choose the body to be at restbut moved away from its equilibrium positionx the exact solution of ( with these initial conditions is td cos ! this can easily be verified by substituting into ( and checking the initial conditions the solution tells that such spring-mass system oscillates back and forth as described by cosine curve the differential equation ( appears in numerous other contexts classical example is simple pendulum that oscillates back and forth physics books derivefrom newton' second law of motionthat ml mg sin where is the mass of the body at the end of pendulum with length lg is the acceleration of gravityand is the angle the pendulum makes with the vertical considering small angles sin and we get ( with  =lx and if is the initial angle and the pendulum is at rest at