Why is spectrum obtained by sunlight, said to be continuous?

My sir spoke about atomic spectra today. Sir said that, unlike the spectrum obtained by analyzing the sunlight, the spectra of atoms are not continuous.

I got a doubt here, i,e even the sunlight has the radiations emitted by the atoms of the elements which compose the sun, still spectra is continuous, which is in opposition to the statement that atomic spectra is discontinuous. So, spectrum obtained by sunlight is continuous even though it atomic spectra. In order to account for spectrum obtained by the sunlight to be continuous and atomic spectra to be discontinuous, can we confirm that sun consists of all those elements (sodium, helium, neon, mercury, etc) which emit the colors of frequency belonging to visible region?

-
Possible duplicates: physics.stackexchange.com/q/46080/2451 and links therein. –  Qmechanic Dec 16 '13 at 12:02

The sun's spectrum is very complex, and indeed there are a lot of "lines" both light and dark (emission and absorption) amidst a sea of what looks to be continuous frequencies.

Note that the atoms you study in a textbook are idealizations. In a hot object such as the sun, some photons come to us by way of atomic emissions, but the speeds of the atoms that emitted them is distributed continuously (something like the Maxwell Boltzmann distribution), so there is a doppler shift to each emitted photon. This "broadens" the spectral line, i.e., turns a discrete frequency into a continuum. This is called Doppler broadening or thermal broadening. However, this is not sufficient to produce a near-completely thermal black body spectrum (thanks to gigacyan for pointing out that this wasn't clear).

Other photons were emitted by nuclear processes and have been bouncing around inside the sun for many years (an astrophysicist could probably tell you how many), and each of these collisions has shifted it's energy in a somewhat random fashion. Furthermore, this energy from fusion, along with gravitational effects, leave most of the sun in the plasma state, where ions and electrons are separate from one another. Because this plasma is extremely hot collisions and recombinations produce even more radiation which is the primary source of the light that reaches us. What we see is called the photosphere, which is the region of this plasma from which light can escape.

The overall effect is called thermalization, where the energy gets moved around in bits and pieces until everything is in thermal equilibrium. In the case of the sun it is only approximate, as different parts have different temperatures, so it is merely a tendency.

-
an astrophysicist could probably tell you how many - A few tens of thousands of years at least, maybe upwards of a hundred thousand depending on how you estimate things :) –  Chris White Dec 6 '13 at 0:10
While this is true what you say, it has nothing to do with continuous spectrum of the Sun which is close to the black body spectrum. (tungsten lamp has continuous spectrum even thought tungsten atoms are hardly moving and photons do not bounce inside the filament for years). –  gigacyan Dec 6 '13 at 20:59
The point is that knowing what atoms do in isolation is not enough to predict the spectrum for a many-body system. A tungsten lamp's spectrum also looks nothing like the spectrum of a single tungsten atom in isolation. –  lionelbrits Dec 7 '13 at 0:17
@gigacyan, I've edited my answer to make this more clear. –  lionelbrits Dec 7 '13 at 0:27

This is quite a natural confusion. You are correct, were the Solar spectrum purely due to the spectral output of the atoms composing it, we would not be able to get a continuous spectrum. However, the light emitted by the Sun is due to its temperature. All objects that are above $-273.15^{\circ}C$ (so, all objects) emit radiation at a continuous spectrum that relates to their temperature, we call the temperature dependent spectrum a "blackbody" spectrum. The Solar spectrum is practically a perfect fit for this relation for a blackbody temperature of about $5250^{\circ}C$.

If your interested in a bit more information including how we are able to see a continuous spectrum, check out a previous post of mine here.

-

Certain wavelengths of electromagnetic spectrum is emitted when the electrons in an atom to move from a higher level to a lower. The wavelength that is emitted depends upon the number of shells the electrons move down. When an electron/electrons move into certain number shells, white light is emitted i.e. when two hydrogen atoms fuse into an Helium atom, visible light is produced. As we know, visible light contains of all the wavelengths of colours from red to Blue. When a spectrometer is used, we are able to see a range of frequencies and therefore, calling it "Continuous Spectrum".

However, spectrometer is used only to analyze the light that is visible to us. You can't analyze the frequency that aren't visible to us. As you said, sodium, neon and mercury do exist in sun but, they don't emit light that is visible to us. Since only we see white light, you just see that light split apart into a continuous range of colours

-
'You can't analyze the frequesncy that aren't visible to us' This sounds very wrong to me, and not just grammatically. –  Danu Dec 5 '13 at 23:33
When hydrogen atoms fuse, gamma rays are produced. The visible light is really just along for the ride... –  lionelbrits Dec 6 '13 at 0:45
Sorry for any grammar mistakes. I was typing the answer in a hurry. –  The DON Dec 6 '13 at 1:17