Free energy functional and Bogolubov equations