The method of orthogonal projection in potential theory