The energy carried by a wave has two components, namely kinetic energy and potential energy. In a sinusoidal wave formed in a string, consider an element with mass Δm. If the string has a constant linear density, the mass of each element equals density times the string’s length. Using the linear mass density relation, the kinetic energy of each mass element can be calculated. Since the wave is sinusoidal, the position of each mass element can be described by the wave function. The wave function velocity is then substituted in the kinetic energy expression. Integrating this equation over the wavelength gives the kinetic energy of the wave. The potential energy of each mass element oscillating in a simple harmonic motion can be calculated by considering the string's restoring force. Replacing the spring constant by the expression for angular frequency and integrating over the wavelength gives the wave's potential energy.