When beats are formed by two waves of frequencies n1 and n2, the amplitude varies with frequency equal to