  Phonon energies at finite temperatures shift away from their harmonic values
due to anharmonicity. In this paper, we have realized the rigorous calculation
of phonon energy shifts of silicon by three and four-phonon scattering from
first principles. The anharmonic fourth-order force constants are calculated by
considering up to the fifth nearest neighbors. The results agree reasonably
well with available data from inelastic neutron scattering throughout the
Brillouin zone. Surprisingly, the frequency shifts of optical phonon modes near
the $\Gamma$ point are sensitive to the cutoff radius of the fourth-order force
constants, in contrast to the four-phonon scattering rates, which nearly
saturate when considering the second nearest neighbors. We have also compared
the results with ab initio molecular dynamics simulations and found that the
higher order of anharmonicity is important for optical phonons. Our work
provides critical insight into the anharmonic phonon frequency shift and will
have significant impact on the thermal and optical applications.
