  We present a self-similar solution to describe the propagation of a shock
wave whose energy is deposited or lost at the front. Both of the propagation of
the shock wave in a medium having a power-law density profile and the expansion
of the medium to a vacuum after the shock breakout are described with a
Lagrangian coordinate. The Chapman-Jouguet detonation is found to accelerate
the medium most effectively. The results are compared with some numerical
simulations in the literature. We derive the fractions of the deposited/lost
energy at the shock front in some specific cases, which will be useful when
applying this solution to actual phenomena.
