DOING PHYSICS WITH MATLAB

MECHANICS

  VIBRATION OF A SPRING

      CONSERVATION OF ENERGY

 

Ian Cooper

School of Physics, University of Sydney

ian.cooper@sydney.edu.au

 

DOWNLOAD DIRECTORY FOR MATLAB SCRIPTS

 

mec_spring_energy.m

The mscript is used to create an animated gif of a vibrating spring. The animation shows the spring, and the time evolution of the kinetic energy of the object; the potential energy of the system and the total energy of the system.

 

 

Energy in Simple Harmonic Motion

 

Consider a system of an object of mass m vibrating at the end of a spring with a spring constant k. Ignoring any frictional effects, the total energy E of the system is conserved.

 

The kinetic energy K of the object is

 

          

 

and the potential energy EP of the system is

 

          

 

Total energy E of the system is

 

        

 

At the equilibrium position, x = 0, the objects moves with its maximum speed vmax and its kinetic energy is a maximum  and the potential energy of the system is zero .

 

At the points of extreme motion, the amplitude of the motion is x = ± A = ± xmax, the kinetic energy of the object is zero  and the potential energy of the system has its maximum value .

 

Therefore, we can write the statement of conservation of energy as

 

        

 

The kinetic energy EK and potential energy EP vary with time while the total energy E is time independent. The animated gif shows the time evolution of the energies. The animated gif was created with the mscript mec_spring_energy.m.