The Nernst equation just corrects the standard potential for the fact that your concentrations aren't the standard $\displaystyle 1$ M / $\displaystyle 1$ bar — get the cell reaction and the electron count \(\displaystyle n\) right first, and the correction term follows on its own.At $\displaystyle 298$ K the Nernst equation is
\[E_{cell} = E^{\circ}_{cell} - \frac{0.0591}{n}\log Q \]
where \(\displaystyle E^{\circ}_{cell} = E^{\circ}_{cathode} - E^{\circ}_{anode}\) (cathode is always the right-hand electrode in the cell notation, anode the left), \(\displaystyle n\) is the number of electrons in the balanced overall cell reaction, and \(\displaystyle Q\) is the reaction quotient — products over reactants, each raised to its stoichiometric coefficient, with pure solids and liquids left out (activity $\displaystyle 1$) and gas pressures used in bar.
The standard reduction potentials needed here (from the standard electrode potential table) are:
\(\displaystyle E^{\circ}(Mg^{2+}/Mg) = -2.36\ V\), \(\displaystyle E^{\circ}(Cu^{2+}/Cu) = +0.34\ V\), \(\displaystyle E^{\circ}(Fe^{2+}/Fe) = -0.44\ V\), \(\displaystyle E^{\circ}(2H^{+}/H_2) = 0.00\ V\), \(\displaystyle E^{\circ}(Sn^{2+}/Sn) = -0.14\ V\), \(\displaystyle E^{\circ}(Br_2/Br^{-}) = +1.09\ V\).
(i) Mg(s) | Mg\(\displaystyle ^{2+}\)($\displaystyle 0.001$ M) || Cu\(\displaystyle ^{2+}\)($\displaystyle 0.0001$ M) | Cu(s)Mg is the anode (oxidation), Cu is the cathode (reduction). The overall reaction is
\[Mg(s) + Cu^{2+}(aq) \rightarrow Mg^{2+}(aq) + Cu(s), \qquad n = 2 \]
\[E^{\circ}_{cell} = E^{\circ}(Cu^{2+}/Cu) - E^{\circ}(Mg^{2+}/Mg) = 0.34 - (-2.36) = 2.70\ V \]
Solid Mg and solid Cu don't appear in \(\displaystyle Q\):
\[E_{cell} = E^{\circ}_{cell} - \frac{0.0591}{2}\log\frac{[Mg^{2+}]}{[Cu^{2+}]} = 2.70 - \frac{0.0591}{2}\log\frac{0.001}{0.0001} \]
\[= 2.70 - 0.02955\times\log(10) = 2.70 - 0.02955(1) = 2.6705\ V \]
Rounding to three significant figures, \(\displaystyle E_{cell} = 2.67\ V\).
(ii) Fe(s) | Fe\(\displaystyle ^{2+}\)($\displaystyle 0.001$ M) || H\(\displaystyle ^{+}\)($\displaystyle 1$ M) | H\(\displaystyle _2\)(g)($\displaystyle 1$ bar) | Pt(s)Fe is oxidised at the anode; H\(\displaystyle ^+\) is reduced to H\(\displaystyle _2\) at the Pt cathode.
\[Fe(s) + 2H^{+}(aq) \rightarrow Fe^{2+}(aq) + H_2(g), \qquad n = 2 \]
\[E^{\circ}_{cell} = E^{\circ}(H^{+}/H_2) - E^{\circ}(Fe^{2+}/Fe) = 0 - (-0.44) = 0.44\ V \]
This is the step people get wrong: because $\displaystyle 2$ mol of H\(\displaystyle ^+\) are consumed, \(\displaystyle [H^+]\) enters \(\displaystyle Q\) squared, not to the first power.\[E_{cell} = E^{\circ}_{cell} - \frac{0.0591}{2}\log\frac{[Fe^{2+}]\,p_{H_2}}{[H^{+}]^{2}} = 0.44 - \frac{0.0591}{2}\log\frac{(0.001)(1)}{(1)^{2}} \]
\[= 0.44 - 0.02955\times\log(10^{-3}) = 0.44 - 0.02955\times(-3) = 0.44 + 0.08865 = 0.5287\ V \]
Rounded to three significant figures, \(\displaystyle E_{cell} = 0.529\ V\).
(iii) Sn(s) | Sn\(\displaystyle ^{2+}\)($\displaystyle 0.050$ M) || H\(\displaystyle ^{+}\)($\displaystyle 0.020$ M) | H\(\displaystyle _2\)(g)($\displaystyle 1$ bar) | Pt(s)Same skeleton reaction as (ii), with Sn in place of Fe:
\[Sn(s) + 2H^{+}(aq) \rightarrow Sn^{2+}(aq) + H_2(g), \qquad n = 2 \]
\[E^{\circ}_{cell} = E^{\circ}(H^{+}/H_2) - E^{\circ}(Sn^{2+}/Sn) = 0 - (-0.14) = 0.14\ V \]
\[Q = \frac{[Sn^{2+}]\,p_{H_2}}{[H^{+}]^{2}} = \frac{(0.050)(1)}{(0.020)^{2}} = \frac{0.050}{4\times10^{-4}} = 125 \]
\[E_{cell} = 0.14 - \frac{0.0591}{2}\log(125) = 0.14 - 0.02955\times2.0969 = 0.14 - 0.06196 = 0.07804\ V \]
Rounded to three significant figures, \(\displaystyle E_{cell} = 0.0780\ V\).
(iv) Pt(s) | Br\(\displaystyle ^{-}\)($\displaystyle 0.010$ M) | Br\(\displaystyle _2\)(l) || H\(\displaystyle ^{+}\)($\displaystyle 0.030$ M) | H\(\displaystyle _2\)(g)($\displaystyle 1$ bar) | Pt(s)Reading the cell notation left to right, the left half-cell is written as the oxidation: \(\displaystyle 2Br^{-} \rightarrow Br_2 + 2e^{-}\). The right half-cell is the reduction \(\displaystyle 2H^{+} + 2e^{-} \rightarrow H_2\). Adding them:
\[2Br^{-}(aq) + 2H^{+}(aq) \rightarrow Br_2(l) + H_2(g), \qquad n = 2 \]
The half-cell here is being run as an oxidation, so the anode potential going into \(\displaystyle E^{\circ}_{cell} = E^{\circ}_{cathode} - E^{\circ}_{anode}\) is still the reduction potential of \(\displaystyle Br_2/Br^{-}\) — don't flip its sign by hand, the formula already does that.\[E^{\circ}_{cell} = E^{\circ}(H^{+}/H_2) - E^{\circ}(Br_2/Br^{-}) = 0 - 1.09 = -1.09\ V \]
\(\displaystyle Br_2\) is a pure liquid and \(\displaystyle H_2\) is at $\displaystyle 1$ bar, so both have activity $\displaystyle 1$ and drop out of \(\displaystyle Q\), leaving only the two ions — each squared, since $\displaystyle 2$ mol of each appear in the balanced equation:
\[Q = \frac{[Br_2][H_2]}{[Br^{-}]^{2}[H^{+}]^{2}} = \frac{1}{(0.010)^{2}(0.030)^{2}} = \frac{1}{(1\times10^{-4})(9\times10^{-4})} = \frac{1}{9\times10^{-8}} = 1.111\times10^{7} \]
\[E_{cell} = -1.09 - \frac{0.0591}{2}\log(1.111\times10^{7}) = -1.09 - 0.02955\times7.0458 = -1.09 - 0.2082 = -1.2982\ V \]
Rounded to three significant figures, \(\displaystyle E_{cell} = -1.30\ V\). The negative sign says this cell reaction is not spontaneous as written at these concentrations — that is a legitimate result of the calculation, not a sign to go back and flip anything.
Answer: (i) \(\displaystyle E_{cell} = 2.70 - \dfrac{0.0591}{2}\log\dfrac{[Mg^{2+}]}{[Cu^{2+}]} = 2.67\ V\); (ii) \(\displaystyle E_{cell} = 0.44 - \dfrac{0.0591}{2}\log\dfrac{[Fe^{2+}]}{[H^{+}]^{2}} = 0.529\ V\); (iii) \(\displaystyle E_{cell} = 0.14 - \dfrac{0.0591}{2}\log\dfrac{[Sn^{2+}]}{[H^{+}]^{2}} = 0.0780\ V\); (iv) \(\displaystyle E_{cell} = -1.09 - \dfrac{0.0591}{2}\log\dfrac{1}{[Br^{-}]^{2}[H^{+}]^{2}} = -1.30\ V\).