X-ray fluorescence (XRF) and x-ray diffraction (XRD) are analytical techniques used to identify substances by examining the amount of energy given off from a substance during an x-ray. The most common errors in XRF analysis and XRD usually occur during preparation of the specimen.