Suppose we attach a charge on a simple harmonic oscillator. The oscillator should oscillate forever, but a charge attached would also lose energy so how would energy be conserved?
1 Answer
The attached charge will radiate energy (as you correctly assumed), because it is periodically accelerated. Therefore it acts as damping for the oscillator, and the once ideal harmonic becomes a damped motion.
Energy in the motion is not conserved (because of the damping). If you mean the conservation of total energy, you need to add the energy of all the emitted photons to the energy in the pendulum, then the energy is conserved.
Maybe also a word on the kind of damping. Usually in a classical damped pendulum, the damping is proportional to the velocity (e.g. air resistance). In this case, it is proportional to the squared acceleration, as given by the Larmor formula.