The scattering factor describes the amplitude of scattered rays from a single atom.

The presence or absence of an intensity peak depends on the interference of scattered X-rays at the detector of the powder X-ray diffractometer. Since the interference of scattered X-rays is the sum of the amplitudes of X-ray waves from many atoms in a sample, we must begin with the analysis of the resultant amplitude of scattered rays from a single atom (scattering factor), which is, in turn, the sum of amplitudes of waves scattered by the electrons in the atom.
The amplitude of a travelling wave is expressed by the equation:
$$y=Acos(kx-\omega t+\phi )$$
We can also expressed the general wave equation in its complex form:
$$y=Ae^{i(kx-\omega t+\phi )}\; \; \; \; \; \; \; (25)$$
The complex form of the wave equation is equivalent to the travelling wave equation if we consider only the real part of it: Re(y), which is the value that is physically observed in an X-ray diffraction experiment. The reason eq25 is preferred over the travelling wave equation is that it is easier to manipulate mathematically to derive the scattering factor. Recall that ω = 2π/T (angular frequency), k = 2π/λ (wave number) and Φ is the phase difference. If we assume that the scattering of X-rays by an atom is elastic, i.e. there is no change in frequency of the X-ray between the incident and scattered rays, the term kx–ωt becomes a constant and we can simplify eq25 to:
$$y=A^{\prime}e^{i\phi }\; \; \; \; \; \; \; (26)$$
where A’ = Aei(kx-ωt).
The amplitudes of the scattered X-rays not only differ in terms of their phase as suggested by eq26 but are also proportional to the number of electrons in the atom, ρdV, where ρ and V are electron density and volume of the atom respectively. If we define A’ as the number of electrons in the atom, eq26 becomes
$$df=\rho e^{i\phi }dV\; \; \; \; \; \; \; (27)$$
where the amplitude of the scattered X-rays from an atom is denoted by f, the scattering factor of an atom.
To determine an expression for Φ, we note that the ratio of path difference δ and wavelength is equal to the ratio of phase difference and 2π, i.e.
$$\frac{\delta }{\lambda }=\frac{\phi }{2\pi }\; \; \; \; \; \; \; (28)$$
Substitute eq19 in eq28,
$$\phi =2\pi\textbf{a}\cdot (\textbf{s}-\textbf{s}_0)\; \; \; \; \; \; \; (29)$$
Since \(\textbf{a}\cdot (\textbf{s}-\textbf{s}_0)=\left |\textbf{a} \right |\left | \textbf{s}-\textbf{s}_0\right |cos\mu\) and from eq23, \(\left | \textbf{s}-\textbf{s}_0\right |=\frac{2sin\theta }{\lambda }\), eq29 becomes:
$$\phi =\frac{4\pi }{\lambda }\left | \textbf{a}\right |sin\theta cos\mu$$
In three dimensions, we let a = r and IaI = IrI = r,
$$\phi =\frac{4\pi }{\lambda }rsin\theta cos\mu\; \; \; \; \; \; \; (30)$$
Substitute eq30 in eq27
$$df=\rho e^{ikrcos\mu }dV\; \; \; \; \; \; \; (31)$$
where \(k=\frac{4\pi }{\lambda }sin\theta\)

Since ρ is spherically symmetrical, we can represent the volume element dV in eq31 in spherical coordinates where dV = r2sinμdrdμdΦ (see above diagram). Eq31 becomes:
$$df=\rho e^{ikrcos\mu }r^2sin\mu drd\mu d\phi$$
Integrating both sides,
$$f=\int_{0}^{\infty }\int_{0}^{\pi }\int_{0}^{2\pi }\rho e^{ikrcos\mu }r^2sin\mu drd\mu d\phi$$
$$f=2\pi \int_{0}^{\infty }\rho r^2dr\int_{0}^{\pi }e^{ikrcos\mu }sin\mu d\mu \; \; \; \; \; \; \; (32)$$
Note that d(cosμ) = -sinμdμ; when μ = π, cosμ = -1; when μ = 0, cosμ = 1. So the second integral in eq32 becomes
$$\int_{0}^{\pi }e^{ikrcos\mu }sin\mu d\mu =-\int_{1}^{-1 }e^{ikrcos\mu } d(cos\mu)=\int_{-1}^{1 }e^{ikrcos\mu }d(cos\mu)$$
$$=\left [ \frac{1}{ikr}e^{ikrcos\mu } \right ]_{-1}^{1}=\frac{e^{ikr}-e^{-ikr}}{ikr}$$
Eq32 now becomes
$$f=2\pi \int_{0}^{\infty }\rho r^2 \frac{e^{ikr}-e^{-ikr}}{ikr}dr$$
Since \(e^{ikr}-e^{-ikr}=coskr+isinkr-(coskr-isinkr)=2isinkr\)
$$f=4\pi \int_{0}^{\infty }\rho \frac{sinkr}{kr}r^2dr\; \; \; \; \; \; \; (33)$$
where \(k=\frac{4\pi }{\lambda }sin\theta\). ρ is a function of r and remains within the integral.
So far, we have developed an expression (eq33) that describes the resultant amplitude of scattered rays from a single atom. To further analyse the interference of scattered X-rays from multiple atoms in a sample, we have to derive another expression called the structure factor.
