A derivation formula for integral functionals defined on BV(?)