$A$ beat is a phenomenon produced by the interference of two harmonic waves with slightly different frequencies.
The phenomenon of the wavering of sound intensity when two waves of nearly the same frequencies and amplitudes,traveling in the same direction,are superimposed on each other is called beats.
$A$ beat is produced due to the periodic increase and decrease in the intensity of sound.
The number of beats produced in one second (unit time) is called the beat frequency. The beat frequency is the difference between the two individual frequencies.
Mathematical derivation of beats:
The equation of a harmonic wave is $y(x, t) = a \sin(kx - \omega t + \phi)$.
For beats,we consider two waves at $x = 0$ with phase $\phi = 0$. The displacements are:
$s_1 = a \cos(\omega_1 t)$
$s_2 = a \cos(\omega_2 t)$
where $\omega_1 > \omega_2$.
By the principle of superposition,the resultant displacement $s$ is:
$s = s_1 + s_2 = a(\cos \omega_1 t + \cos \omega_2 t)$
Using the trigonometric identity $\cos C + \cos D = 2 \cos(\frac{C-D}{2}) \cos(\frac{C+D}{2})$:
$s = 2a \cos(\frac{\omega_1 - \omega_2}{2} t) \cos(\frac{\omega_1 + \omega_2}{2} t)$
Let $\omega_b = \frac{\omega_1 - \omega_2}{2}$ and $\omega_a = \frac{\omega_1 + \omega_2}{2}$.
$s = [2a \cos(\omega_b t)] \cos(\omega_a t)$
The intensity is proportional to the square of the amplitude. The amplitude of the resultant wave is $A(t) = 2a \cos(\omega_b t)$.
Intensity is maximum when $\cos(\omega_b t) = \pm 1$,which happens twice in one cycle of $\cos(\omega_b t)$.
The beat frequency $f_b = f_1 - f_2$.