Analytical formulae for the optimization of the process of low-power phase modulation in a quadratic nonlinear medium