When magnesium carbonate ($MgCO_3$) is dissolved in dilute hydrochloric acid (HCl), it reacts to form magnesium chloride (MgCl₂) and carbonic acid (H₂CO₃):
$MgCO_3 + 2HCl \rightarrow MgCl_2 + H_2CO_3$ The carbonic acid then decomposes into water and carbon dioxide:
$H_2CO_3 \rightarrow H_2O + CO_2$ After this reaction, magnesium chloride (MgCl₂) remains in solution.
Next, the solution is neutralized with ammonia (NH₃) and buffered with NH₄Cl/NH₄OH. This creates a slightly alkaline medium.
When disodium hydrogen phosphate (Na₂HPO₄) is added to the solution, it reacts with magnesium ions (Mg²⁺) to form a precipitate. The reaction leads to the formation of magnesium ammonium phosphate (Mg(NH₄)PO₄), which is a white precipitate.
The formula of the precipitate is:
Answer: Mg(NH₄)PO₄