In this problem I'm asked to calculate the electrode potential of the magnesium electrode ($E_{Mg^{2+}/Mg}$) given the red-ox reaction:$$\text{Mg(s)}+2\text{Ag}^+(10^{-2}\text{M})\leftrightarrow 2\text{Ag(s)}+\text{Mg}^{2+}(10^{-2}\text{M})$$
The information I'm given is:
- Temperature equal to $278\,K$ (the standard).
- The molar concentration of the $\text{Mg}^{2+}$ ions is of $0.01\,\text{M}$.
- The standard reduction potential of the $Mg$ electrode is: $E^{º}_{Mg^{2+}/Mg}=-2.34\,V$.
I know I have to use the Nernst Equation, but my solution and the book's answer are very different.
My solution:
$$E_{Mg^{2+}/Mg}=E^{º}_{Mg^{2+}/Mg}-\dfrac{0.059}{n}\,\color{#ff3300}{\mathbf{\log\frac{\left[\text{Mg}^{2+}\right]}{1}}}=\ldots=\boxed{-2.28\,V}$$
My book's solution: $$E_{Mg^{2+}/Mg}=E^{º}_{Mg^{2+}/Mg}-\dfrac{0.059}{n}\,\color{#00ff00}{\mathbf{\log\frac{1}{\left[\text{Mg}^{2+}\right]}}}=\ldots=\boxed{-2.40\,V}$$
($n=2$ because 2 moles of electrons where exchanged per 1 mole of reaction)
I've colored the part where I go wrong (basically the logarithm). I don't know exactly why the book put the concentration in the denominator, since $\text{Mg}^{2+}$ is a product (not a reactant), therefore following what I studied, its concentration should be in the numerator.
Any help? Sorry for asking such an elementary question, but I'm still learning the basic stuff in Chemistry!