Dirichlet's principle for Poisson's equation