  We derive the expression for the residual interaction to be used in the
framework of the Second RPA with density-dependent forces. The adopted
procedure is based on a variational approach. It is found that the residual
interaction to be used in RPA and beyond RPA matrix elements is not the same as
far as the rearrangement terms are concerned. A detailed derivation of the
matrix elements coupling 1 particle-1 hole with 2 particle-2 hole and 2
particle-2 hole among themselves has been done and the corresponding
rearrangement terms are shown here. This formal result indicates that both the
currently used prescriptions, namely (i) using the same type of rearrangement
terms in RPA and beyond RPA matrix elements or (ii) neglecting the
rearrangement terms in beyond RPA matrix elements, are not correct.
