Application of the virial theorem to the interelectronic Coulomb repul
sion shows that the virial of the exchange potential yields the exchan
ge energy. However, the virial of the correlation potential does not y
ield the correlation energy. We have recently constructed a ''hyyercor
related'' potential whose virial is the correlation energy. We apply t
hese ideas to a system which contains two interacting electrons in an
external harmonic potential, Hooke's atom. This system can be solved a
nalytically for a set of spring constants and numerically for any spri
ng constant. By inverting the Kohn-Sham equations, the exact exchange
and correlation potentials can be found. These exact values are compar
ed with several popular approximate functionals, namely local spin den
sity (LSD), Perdew, Burke, and Ernzerhof (PBE), and Becke and Lee-Yang
-Parr (BLYP). We illustrate our results for two values of the spring c
onstant. At a moderate value, the density is comparable to the He atom
, while for a low spring constant, we explore extremely low densities.
(C) 1998 John Wiley & Sons, Inc. Int J Quant Chem 69: 533-540, 1998.