The given compound `(X)` sweels on heating due to evolution of water molecules. It also, gives violet coloured flame due to the presence of potassium salt.
The givem compound `(X)` is potash alum.
`K_(2) SO_(4) .Al_(2) (SO_(4))_(3) .24 H_(2) O` which gives the following reactions :
(a) With `BaCl_(2)` in presence of `HCl`, a white precipitate is formed. The aqueous solution contains `SO_(4)^(2-)` ions, which react with `Ba^(2+)` ions the give white precipitate of `BaSO_(4)`, which is insoluble in conc `HCl`.
`Ba_((aq))^(+2)+ So_(4(aq))^(2-)rarr underset("White ppt.") (BaSO_(4) darr)`.
(b) With excess of `NH_(4) OH`, white geletinous precipitate
`Al_(2)(SO_(4))_(3) + 6NH_(4) OH rarr underset("White gelatinous precipitate") (2Al (OH)_(3) darr) + 3(NH_(4))_(2) SO_(4)`
of aluminium hydroxide, `Al(OH)_(3)`, is formed. `Al(OH)_(3)` dissolves in `NaOH` forming sodium meta-aliminate.
`Al(OH)_(3) + NaOH rarr underset("Sodium meta-aluminate (soluble)") (NaAlO_(2)) + 2H_(2) O`
The white precipitate reappears when teh above soluble is boiled with concentrated soluble of `NH_(4) Cl`, due to the formation of white precipitate of aluminium hydroxide, `Al(OH)_(3)`.
`NaAlO_(2) + NH_(4) Cl + H_(2) O rarr Al(OH)_(3) darr + NH_(3) + NaCl`
( c) Potassium salts give yellow precipitate of potassium cobaltinitrite with cobaltinitrite soluble.
`2K_(2) SO_(4) + Na(4)[Co(NO_(4))_(6)] rarr underset ("Yellow ppt")(K_(4)[Co(NO_(2))_(6)]) darr + 2Na_(2) SO_(4)`
or
`4K^(oplus) +[Co(NO_(2))_(6)]^(4-) rarr underset("Potassium cobaltinitrite") (K_(4)[Co(NO_(2))_(6)] darr)`.