Casimir versus Helmholtz forces: Exact results