On the theory of thin ferroelectric films