A variational approach to Bogoliubov excitations and dynamics of dipolar Bose–Einstein condensates