Density functional calculations on the (non)linear optical properties of conjugated molecular chains using currently popular exchange-correlation (xc) potentials give overestimations of several orders of magnitude. By analyzing "exact" and Krieger-Li-Iafrate xc potentials, the error is traced back to an incorrect electric field dependence of the "response part" of the xc potential in local and gradientcorrected density approximations, which lack a linear term counteracting the applied electric field.PACS numbers: 31.15. Ew, 42.65.An, 71.15.Mb, 77.22.Ej The nonlinear optical (NLO) properties of molecules are of considerable current interest, both from the fundamental and technological points of view [1][2][3]. Prototype systems exhibiting large NLO responses like the polyacetylene (PA) chains have been studied intensively with conventional, ab initio Hartree-Fock (HF) based theoretical techniques [2]. Because density functional theory (DFT) [4,5] usually provides clearly improved accuracy with respect to HF at similar or lower computational cost, it seems tempting to apply DFT to the prediction of the NLO properties of large, conjugated molecular chains.Our calculations on static hyperpolarizabilities (determining the NLO response in the static limit) of such chains show, both here and in Ref. [6], that the local density approximation (LDA) and generalized gradient approximations (GGAs) in DFT provide very poor results. Whereas previously reported LDA errors are typically 10% for dielectric constants, we find overestimations of several orders of magnitude for the second hyperpolarizability g. In view of the respectable accuracy which is usually obtained in DFT calculations, this is highly surprising and deserves a detailed analysis, as this error may be among the largest in the history of DFT calculations. Our analysis allows us to pinpoint the weakness of the LDA. It will be shown below that, if an electric field, E, is applied, the so-called response part of the exact exchange-correlation (xc) potential develops a global behavior counteracting the applied field. Such behavior is not present in the LDA or GGA potentials. Our results substantiate and further elucidate the findings of Gonze, Ghosez, and Godby [7] and others [8][9][10][11][12][13], who pointed out the existence of such a counteracting linear potential in the exact y xc and provided the first physical interpretation for it [10,13].Description of the problem.-For this work, extensive calculations have been performed on PA and hydrogen chains. The LDA results described below have been obtained in the same manner as earlier calculations on the polarizability (a) and second hyperpolarizability (g) of C 60 [14]. Details of the computational procedure, the geometries, etc., have been given in another paper [6], where several aspects of the LDA problem (size of electron correlation correction, effect of bond length alternation) are described more fully.From the HF-based ab initio studies [15] on the NLO properties of PA chains, it is known that even sim...