  We develop a perturbation theory that describes bound states of solitons
localized in a confined area. External forces and influence of inhomogeneities
are taken into account as perturbations to exact solutions of the sine-Gordon
equation. We have investigated two special cases of fluxon trapped by a
microresistor and decay of a breather under dissipation. Also, we have carried
out numerical simulations with dissipative sine-Gordon equation and made
comparison with the McLaughlin-Scott theory. Significant distinction between
the McLaughlin-Scott calculation for a breather decay and our numerical result
indicates that the history dependence of the breather evolution can not be
neglected even for small damping parameter.
