In the qualitative analysis scheme, magnesium and nickel precipitate from solution upon the addition of sodium hydroxide. Once separated from the remaining cations by filtration or decanting, the solid mixture is acidified and warmed to dissolve magnesium and nickel cations back into solution. Adding ammonia creates a buffer solution. (Remember, HCl and NH3 makes for NH4+ cation.) The buffered solution should just be basic (say, pH = 8). Adding sodium hydrogen phosphate (Na2HPO4) precipitates magnesium as MgNH4PO4 (Ksp = 3 x 10-13).
Ksp = [Mg2+]*[NH3]*[HPO42-] = 3 x 10-13
Molar solubility = 6.7 x 10-5 M
a) Calculate the [NH4+] in a pH of 8.
b) Calculate the molar solubility of MgNH4PO4 in a solution with pH of 8.