### Ideal Gas Law with Mole Fractions and Multiple Gases (Ex2)

A mixture of only \({O_2}\) and \({N_2}\) has a density of 1.185 g/L at \({25^o}C\) and 101.3 kPa. Using the ideal gas law, find the mole fraction of \({O_2}\) in the two-species mixture.

101.3 kPa is the same as 1 atm.

The way to solve this problem is to assume a quantity of gas. Assume there is 1 L of the gas mixture. The density given was 1.185 g/L, meaning that the total mass is 1.185 g if we assume there is 1 L of it. So,

\[{m_{total}} = 1.185g = {m_{{O_2}}} + {m_{{N_2}}}\]

We can work with this equation in terms of moles instead of masses. To get the amount of moles in 1 L, use PV=nRT, and I will use n to represent quantity of moles. As always, keep all decimals in your calculator, I will round here for simplicity.

\[{m_{total}} = 1.185g = {m_{{O_2}}} + {m_{{N_2}}}\]

\[{n_{total}} = \frac{{(1atm)(1L)}}{{\left( {0.08206\frac{{Latm}}{{molK}}} \right)(298K)}}\]

\[{n_{total}} = 0.041mol\]

And remember that moles is just the mass divided by the molar mass, so we found mass total = mass oxygen + mass nitrogen before, so divide everything by molar mass.

BUT, the trick here is that the mixture is binary - it only has two parts. So if the total mass is 1.185g, then a part of that will be the mass of N2, and another part of that will be 1.185 - mass of N2. That way we will only have one variable to solve for!

\[{n_{total}} = 0.041mol = \frac{{{m_{{N_2}}}}}{{28.01g/mol}} + \frac{{(1.185 - {m_{{N_2}}})}}{{32g/mol}}\]

You can do it the other way around as well, but here I let the mass of oxygen be represented by the mass of nitrogen using that trick since there are only two components in the gaseous mixture. And by dividing throughout by molar masses we can use moles instead.

Now you just need to solve the equation above for the mass of nitrogen, it will be a little messy. Solving you get,

\[{m_{{N_2}}} = 0.862g\]

And we let

\[{m_{{O_2}}} = 1.185 - {m_{{N_2}}}\]

So substituting our mass of nitrogen result in we obtain:

\[{m_{{O_2}}} = 0.323g\]

Now, to get the mole fraction of a species in a mixture, it needs to be the amount of moles of that species divided by the total moles in the mixture. We usually let the variable x be the mole fraction. So divide the mass of O2 found by 32g/mol to get the amount of O2 moles.

\[{n_{{O_2}}} = \frac{{0.323g}}{{32g/mol}} = 0.0101mol\]

And just do that over the total moles in the mixture, which was found previously.

\[{x_{{O_2}}} = \frac{{0.0101mol}}{{0.041mol}}\]

\[{x_{{O_2}}} = 0.247\]

And the mole fraction is unitless.

Please see our other worked-out examples of the ideal gas law below:

Ideal Gas Law with Molecules (Ex1)

Ideal Gas Law Two Gases Combined (Ex3)

Ideal Gas Law Partial Pressures and Mole Fractions (Ex4)

Ideal Gas Law Mixing Two Gas Vessels Together (Ex5)

Alternatively, return to the Ideal Gas Law hubpage below:

Ideal Gas Law Examples (Mixing Gases, Molecules, Partial Pressure)