In 1887, Walther Nernst, a German chemist, developed the Nernst equation, which describes the relationship between an electrochemical reaction’s potential and its standard electrode potential under standard and non-standard conditions.

The derivation of the Nernst equation involves the following steps:
-
- Derive the formula for the reversible open circuit potential , Eo, of an electrochemical cell at constant temperature and pressure under standard conditions.
- Derive the expression for Eo in terms of chemical potentials of the reaction species at constant temperature and pressure.
- Derive a ‘correction factor’ for Eo in step2. This final expression, the Nernst equation, describes how the resultant Eo varies with activities of chemical species.
Step 1
From the definition of enthalpy, H = U + pV, we have
$$dH=dU+d(pV)\; \; \; \; \; \; \; \; 1$$
Substitute the definition of the internal energy of a system undergoing reversible change, dU = dqrev + dwrev in eq1
$$dH=dq_{rev}+dw_{rev}+d(pV)\; \; \; \; \; \; \; \;2$$
Substitute the definition of the change in Gibbs energy of a system, dG = dH – d(TS) in eq2
$$dG+TdS+SdT=dq_{rev}+dw_{rev}+pdV+Vdp$$
At constant temperature and pressure, dT = dp = 0
$$dG=dq_{rev}+dw_{rev}+pdV-TdS\; \; \; \; \; \; \; \; 3$$
Substitute the definition of the change in entropy of a system, dS = dqrev/T in eq3
$$dG=dw_{rev}+pdV\; \; \; \; \; \; \; \; 4$$
Substitute the definition of total reversible work, wrev = wex + wadd, where wex is reversible expansion work and wadd is reversible additional work other than reversible expansion work, in eq4
$$dG=dw_{ex}+dw_{add}+pdV\; \; \; \; \; \; \; \; 5$$
Substitute the definition of the change in reversible expansion work, dwex = –pdV in eq5
$$dG=dw_{add}\; \; \; \; \; \; \; \; 6$$
Substitute the definition of the reversible electrical work between two points in an electric circuit, dwadd = –nFEdξ in eq6
$$\Delta _rG=-nFE\; \; \; \; \; \; \; \; 7$$
where n is the number of moles of electrons, F is the Faraday constant, E is the open circuit potential of the electrochemical cell and ΔrG = dG/dξ is the Gibbs energy of the electrochemical cell reaction.
When the open circuit potential of an electrochemical cell is measured at standard conditions (1 bar, 298K, 1M), we write eq7 as:
$$\Delta _rG^{\, o}=-nFE^{\, o}\; \; \; \; \; \; \; \; 8$$
Step 2
The chemical potential of the j-th species, in a multi-component system is
$$\mu_j=\left (\frac{\partial G}{\partial n_j} \right )_{T,p,n^{\prime}}\; \; \; \; \; \; \; 9$$
where n‘ is all n other than nj.
The total differential of the Gibbs energy of the system at constant temperature and pressure is
$$dG=\left (\frac{\partial G}{\partial n_a} \right )_{T,p,n^{\prime}}dn_a+\left (\frac{\partial G}{\partial n_b} \right )_{T,p,n^{\prime}}dn_b+...\; \; \; \; \; \; \; 10$$
Substituting eq9 in eq10
$$dG=\mu_adn_a+\mu_bdn_b+...=\sum_{j}\mu_jdn_j\; \; \; \; \; \; \; \; 11$$
Eq11 can be expressed in another way by considering the reversible reaction
$$v_aa+v_bb+...\rightleftharpoons v_{\alpha}\alpha+v_{\beta}\beta+...$$
with the change in Gibbs energy at constant temperature and pressure of the system given by eq11. Next, let’s define
$$dn_j=v_jd\xi\; \; \; \; \; \; \; \; 12$$
where vj is the stoichiometric number of the j-th species in the reversible reaction and dξ is the amount of substance that is being changed in the reaction.
ξ is called the extent of a reaction and has units of amount in moles. Note that the stoichiometric numbers for reactants are negative by convention and those for products are positive. Substituting eq12 in eq11
$$\left ( \frac{\partial G}{\partial \xi} \right )_{T,p}= \sum_{j}\mu_jv_j\; \; \; \; \; \; \; \; 13$$
Substitute the definition of the Gibbs energy of an electrochemical cell reaction, \(\Delta _rG=\left ( \frac{\partial G}{\partial \xi} \right )_{T,p}\) , into eq13
$$\Delta _rG=\sum_{j}\mu_jv_j\; \; \; \; \; \; \; \; 14$$
Substitute eq7 from Step1 in eq14
$$E=-\frac{1}{nF}\sum_{j}\mu_jv_j\; \; \; \; \; \; \; \; 15$$
When the open circuit potential of an electrochemical cell is measured at standard conditions (1 bar, 298K, 1M), we write eq15 as:
$$E^{\, o}=-\frac{1}{nF}\sum_{j}\mu^o_{\, j}v_j\; \; \; \; \; \; \; \; 16$$
Step 3
Firstly, let’s consider a system with a single pure substance. Substitute the definition of the change in Gibbs energy of a system, dG = dH – d(TS), in the change of enthalpy of the system dH = dU + d(pV)
$$dG+SdT+TdS=dU+pdV+Vdp\; \; \; \; \; \; \; \; 17$$
The reversible change in internal energy of a pure substance (a system with a single pure substance only does expansion work) can be expressed as
$$dU=dq_{rev}+dw_{ex}\; \; \; \; \; \; \; \; 18$$
Substitute the definitions of entropy, dS = dqrev/T, and expansion work, –pdV, in eq18
$$dU=TdS-pdV\; \; \; \; \; \; \; \; 19$$
Substitute eq19 in eq17
$$dG=Vdp-SdT\; \; \; \; \; \; \; \; 20$$
At constant temperature, dT = 0 and eq20 becomes dG = Vdp. Integrating this new expression on both sides from \(p_i\) to \(p_f\),
$$G\left ( p_f \right )=G\left ( p_i \right )+nRTln\frac{p_f}{p_i}$$
Let pi = 1 bar = po (i.e. standard conditions) and pf = p
$$G=G^{\, o}+nRTln\frac{p}{p^{\, o}}$$
Secondly, we extend the above working to a multi-component system of ideal gases. Since G is an extensive property, we add the Gibbs energies of all components to give the total Gibbs energy of the system:
$$G_{total}=\left ( G_a^{\: o}+n_aRTln\frac{p_a}{p_a^{\, o}} \right )+\left ( G_b^{\: o}+n_bRTln\frac{p_b}{p_b^{\, o}} \right )+...$$
Let’s assume the reference pressures of the component gases are the same since they are all ideal gases, i.e. pao = pbo = po
$$G_{total}=\left ( G_a^{\, o}+G_b^{\, o}+...\right )+\left ( n_aRTln\frac{p_a}{p^o}+n_bRTln\frac{p_b}{p^o}+...\right )$$
$$G_{total}=G_{total}^{\, o}+\left ( n_aRTln\frac{p_a}{p^o}+n_bRTln\frac{p_b}{p^o}+...\right )$$
For simplicity, let GTotal and GoTotal be G and Go respectively.
$$G=G^{\, o}+\left ( n_aRTln\frac{p_a}{p^o}+n_bRTln\frac{p_b}{p^o}+...\right )$$
Taking the partial derivative of the above with respect to nj, at constant temperature, pressure and the amount of the other components, n‘, we have
$$\left ( \frac{\partial G}{\partial n_j} \right )_{T,p,n^{\prime}}=\left ( \frac{\partial G^{\, o}}{\partial n_j} \right )_{T,p,n^{\prime}}+\left [ \frac{\partial \left ( n_aRTln\frac{p_a}{p^{\, o}}+ n_bRTln\frac{p_b}{p^{\, o}}+...\right )}{\partial n_j} \right ]_{T,p,n^{\prime}}$$
For the last partial derivative of the above equation, only the j-th term survives.
$$\left ( \frac{\partial G}{\partial n_j} \right )_{T,p,n^{\prime}}=\left ( \frac{\partial G^{\, o}}{\partial n_j} \right )_{T,p,n^{\prime}}+RTln\frac{p_j}{p^{\, o}}\; \; \; \; \; \; \; \; 21$$
Substitute eq9 from Step 2 in eq21
$$\mu_j=\mu_j^{\, o}+RTln\frac{p_j}{p^{\, o}}\; \; \; \; \; \; \; \; 22$$
Similarly, for a solute in a dilute solution satisfying Henry’s law, we can write
$$\mu_j=\mu_j^{\, o}+RTln\frac{c_j}{c^{\, o}}\; \; \; \; \; \; \; \; 23$$
where cj and co are the j-th solute’s concentration and molar concentration respectively.
We can fine-tune eq22 and eq23 by replacing pj/po and cj/co with γj(pj/po) and γj(cj/co) where γj is a factor called the activity coefficient that can account for both ideal and non-ideal fluids (γ = 1 and γ < 1 for ideal and non-ideal fluids respectively). Next, we combine the modified equations into a single equation by letting aj = γj(pj/po) and aj = γj(cj/co), where aj is the activity of species j.
$$\mu_j=\mu_j^{\, o}+RTlna_j\; \; \; \; \; \; \; \; 24$$
Substituting eq24 in eq15 from Step 2,
$$E=-\frac{1}{nF}\sum_{j}\left ( \mu_j^{\, o}+RTlna_j \right )v_j=-\frac{1}{nF}\sum_{j} \mu_j^{\, o}v_j-\frac{RT}{nF}\sum_{j}v_jlna_j \; \; \; \; \; \; \; \; 25$$
Substituting eq16 from Step 2 in eq25
$$E=E^{\, o}-\frac{RT}{nF}\sum_{j}ln\, a_j^{\, v_j}=E^{\, o}-\frac{RT}{nF}ln\prod_{j}a_j^{\, v_j}$$
$$E=E^{\, o}-\frac{RT}{nF}lnQ\; \; \; \; \; \; \; \; 26$$
where Q is the reaction quotient with Q = \(\prod _{j}a_j^{\, v_j}\).
Hence, \(\frac{RT}{nF}lnQ\) is the ‘correction factor’ for Eo, as the activities of reaction species vary. Eq26 is the Nernst equation.
For an electrochemical equation of the form \(Ox+ne^-\rightleftharpoons Red\), the Nernst equation can be written as:
$$E=E^{\, o}-\frac{RT}{nF}ln\frac{a_{ Red}}{a_{ Ox}}\; \; \; \; \; \; \; \; 27$$
Note that since Eo is by definition a reduction potential, the reference equation is always \(Ox+ne^-\rightleftharpoons Red\) and hence eq27.