  For exchange-correlation functionals that depend explicitly on the Kohn-Sham
orbitals, the potential $V_{\mathrm{xc}\sigma}(\re)$ must be obtained as the
solution of the optimized effective potential (OEP) integral equation. This is
very demanding and has limited the use of orbital functionals like exact
exchange. We demonstrate that the OEP can be obtained iteratively by solving a
system of partial differential equations instead of an integral equation. This
amounts to calculating the orbital shifts that exactify the Krieger-Li-Iafrate
(KLI) approximation. Unoccupied orbitals do not need to be calculated. Accuracy
and efficiency of the method are shown for atoms and clusters using the exact
exchange energy. Counter-intuitive asymptotic limits of the exact OEP, not
accessible from previous constructions, are presented.
