Principle of Conservation of Energy and Rayleigh's Principle