energy of shm problems