An expression to derive the definition of activity

Definition of symbolic variables

Definition of gibbs energy of the olivine solid solution

(1)RT(2yfolog⁡(yfo)+(2−2yfo)log⁡(1−yfo))+Wyfo(1−yfo)+gfao(1−yfo)+gfooyfo

Definition of the gibss energy of forsterite in the olivine solid solution

(2)2RTlog⁡(yfo)+Wyfo2−2Wyfo+W+gfoo

Definition of activity

Activity of forsterite is defined as the gibbs energy of the endmember in the solid solution (g_fo_ss gfo) relative to the gibbs energy of the pure endmember forsterite gfoo

(3)afo=exp(gfo−gfooRT)
(4)yfo2eW(yfo2−2yfo+1)RT

being awkwards the expression is usually expressed as RTln⁡afo

(5)RTlog⁡(yfo2eWyfo2−2Wyfo+W+gfo−gfooRT)

Just note that

(6)2RTlog⁡(yfo)+Wyfo2−2Wyfo+W
(7)W(yfo2−2yfo+1)

and that

(8)W(yfo−1)2

so ,

(9)RTln⁡(afo)=2RTln⁡(yfo)+W(yfo−1)2