I will consider natural Hamiltonian systems with two degrees of freedom and speak about the existence and nonexistence of integrals that are polynomial in momenta.This problem can be reformulates as the existence and construction of solutions of a certain system of PDE. I will mostly discuss the following questions: given a metric, how to prove the (non)existence of an integral of a given degree, and how to find it explicitly? I will explain the classical and modern methods to study this question. As an application, I will present new systems admitting an integral of degree 3 in momenta and a solution of a problem explicitly stated by J. Brink