Chemistry - How to differentiate between iron and sodium flames?
Sodium flame is yellow, but all the light is due to two lines in the yellow region. If you look a sodium flame through a purple glass (cobalt glass), the yellow color is absorbed, and you do not see the sodium flame any more. The flame looks dark and colorless through a cobalt glass.
On the contrary iron flame looks yellow, but it is made of a huge number of lines belonging to all regions of the spectrum. The sum of these colors look yellow, but it's a visual effect. The flame contains all colors. If you look at such an iron flame through a cobalt glass, the flame is visible. It looks purple or violet, but it is visible.
Very good question. I believe you are talking about ordinary Bunsen burner flame which is considered a low temperature flame by atomic standards. Good temperatures for atomic emissions are on the order of the temperature of the surface of the Sun (around 10,000 K).
So you are right, it is very "difficult" to visually distinguish the apparent flame color of the two elements. Also keep in mind, that there is no 100% pure iron salt. Sodium is everywhere!! So even iron flame is contaminated with sodium flame. The yellow color of sodium atoms comes from atomic emission at 589 nm.
The yellow color of iron flame comes from its oxide FeO which emits exactly at 579 nm. Our eyes are extremely sensitive to yellow light range, because is a very small range in the visible spectrum. There are no huge number of lines in the visible spectrum in such low temperature flame of Bunsen burner.
Reference: Analytica Chimica Acta, 115 (1980) 121
A real emission spectrum of iron has literally thousands of lines but you need to create temperature close to the Sun's surface with a plasma or an electrical arc.