Free energy by integration