[en] The method of optimized expansions of the basis has been applied to the calculation of the dynamic polarizability of molecules in a Gaussian basis. The question of the form of the functions expanding the original basis has been examined in detail. A program has been compiled, and calculations are carried out for the molecules H2+, H2, He2++, and HeH+. The results show good agreement with the data obtained by other authors. It has been concluded that the method examined can be applied to large molecules