Energy calculation for Parametric forced ODE