On two problems of optimal scalar control of harmonic oscillatorстатья