# Introduction
In this note, we discuss smearing in the context of density functional theory, and why it is needed from a computational perspective, as well as its physical implications.
# Computational Aspects of Smearing
## Why use smearing?
In Kohn-Sham DFT, we can compute the charge density as follows:
==finish this==
$
n =
$
These integrals are very difficult to compute numerically in metals due to the discontinuous integrand. More specifically, the occupation numbers $f(\epsilon_{i \pmb{k}})$ suddnely drop from 1 to 0 as the Kohn-Sham eigenvalues $\epsilon_{i\pmb{k}}$ crosses the Fermi energy $\epsilon_F$. These integrals require extremely fine k-grids to be computed accurately.
This sudden drop in $f(\epsilon_{i \pmb{k}})$ is only characteristic of a Fermi gas at $T = 0$, the Fermi-Dirac distribution broadens as temperature increases and this issue with the integration is circumvented. Thus, we introduce smearing: we make the occupations continuous near the Fermi level as if the temperature is finite. The higher the smearing temperature $\sigma$, the coarser the required $\pmb{k}$-point sampling to achieve convergence.
## Crossing Instabilities
==To be continued==
**Resources**
* [A nice short answer on the physicsSE](https://physics.stackexchange.com/questions/360037/what-do-we-physically-mean-by-smearing-in-condensed-matter)
* [Lecture notes on smearing and metals](http://cmt.dur.ac.uk/sjc/Castep_Lectures2/lecture16.PDF)
* [QuantumATK documentation gives a quick note on the matter](https://docs.quantumatk.com/manual/technicalnotes/occupation_methods/occupation_methods.html)
* [A note by Nicola Marzari to his students and postdocs](http://theossrv1.epfl.ch/Main/ElectronicTemperature)
* [Nicola Marzari's thesis (read Ch.4 and maybe Ch. 3)](http://theossrv1.epfl.ch/Main/Theses?action=download&upname=Marzari_thesis_1996.pdf)