In spectroscopic studies of nuclei (muonic x-ray spectroscopy and muon conversion), layered solid hydrogen
targets are of key importance. The paper develops a mathematical model to optimize the dimension of solid
deuterium (degrader) layer in a layered hydrogen structure of H2/T2 + sD2 to prepare muon for the creation of
muonic atoms. Muonic object balance equations have been constructed and solved. All muonic molecular
resonances have been taken into account. The results show good accordance with muon experiments.